Loading lib/default.nix +2 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,8 @@ let inherit (self.derivations) lazyDerivation optionalDrvAttr; inherit (self.meta) addMetaAttrs dontDistribute setName updateName appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio hiPrioSet getLicenseFromSpdxId getLicenseFromSpdxIdOr getExe getExe'; hiPrioSet licensesSpdx getLicenseFromSpdxId getLicenseFromSpdxIdOr getExe getExe'; inherit (self.filesystem) pathType pathIsDirectory pathIsRegularFile packagesFromDirectoryRecursive; inherit (self.sources) cleanSourceFilter Loading lib/meta.nix +37 −5 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ let inherit (lib) matchAttrs any all isDerivation getBin assertMsg; inherit (lib.attrsets) mapAttrs' filterAttrs; inherit (builtins) isString match typeOf; in Loading Loading @@ -286,11 +287,39 @@ rec { ((!pkg?meta.platforms) || any (platformMatch platform) pkg.meta.platforms) && all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []); /** Mapping of SPDX ID to the attributes in lib.licenses. For SPDX IDs, see https://spdx.org/licenses. Note that some SPDX licenses might be missing. # Examples :::{.example} ## `lib.meta.licensesSpdx` usage example ```nix lib.licensesSpdx.MIT == lib.licenses.mit => true lib.licensesSpdx."MY LICENSE" => error: attribute 'MY LICENSE' missing ``` ::: */ licensesSpdx = mapAttrs' (_key: license: { name = license.spdxId; value = license; }) (filterAttrs (_key: license: license ? spdxId) lib.licenses); /** Get the corresponding attribute in lib.licenses from the SPDX ID or warn and fallback to `{ shortName = <license string>; }`. For SPDX IDs, see https://spdx.org/licenses For SPDX IDs, see https://spdx.org/licenses. Note that some SPDX licenses might be missing. # Type Loading Loading @@ -325,7 +354,8 @@ rec { Get the corresponding attribute in lib.licenses from the SPDX ID or fallback to the given default value. For SPDX IDs, see https://spdx.org/licenses For SPDX IDs, see https://spdx.org/licenses. Note that some SPDX licenses might be missing. # Inputs Loading Loading @@ -361,10 +391,12 @@ rec { */ getLicenseFromSpdxIdOr = let spdxLicenses = lib.mapAttrs (id: ls: assert lib.length ls == 1; builtins.head ls) (lib.groupBy (l: lib.toLower l.spdxId) (lib.filter (l: l ? spdxId) (lib.attrValues lib.licenses))); lowercaseLicenses = lib.mapAttrs' (name: value: { name = lib.toLower name; inherit value; }) licensesSpdx; in licstr: default: spdxLicenses.${ lib.toLower licstr } or default; lowercaseLicenses.${ lib.toLower licstr } or default; /** Get the path to the main program of a package based on meta.mainProgram Loading maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -17418,6 +17418,12 @@ githubId = 5265630; name = "Michael Köppl"; }; returntoreality = { email = "linus@lotz.li"; github = "retuntoreality"; githubId = 255667; name = "Linus Karl"; }; revol-xut = { email = "revol-xut@protonmail.com"; name = "Tassilo Tanneberger"; Loading nixos/doc/manual/release-notes/rl-2411.section.md +4 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,10 @@ - `programs.vim.defaultEditor` now only works if `programs.vim.enable` is enabled. - The `indi-full` package no longer contains non-free drivers. To get the old collection of drivers use `indi-full-nonfree` or create your own collection of drivers by overriding indi-with-drivers. E.g.: `pkgs.indi-with-drivers.override {extraDrivers = with pkgs.indi-3rdparty; [indi-gphoto];}` - `/share/vim-plugins` now only gets linked if `programs.vim.enable` is enabled - The `tracy` package no longer works on X11, since it's moved to Wayland Loading nixos/modules/services/hardware/libinput.nix +78 −3 Original line number Diff line number Diff line Loading @@ -18,18 +18,21 @@ let cfg = config.services.libinput; }; accelProfile = mkOption { type = types.enum [ "flat" "adaptive" ]; type = types.enum [ "flat" "adaptive" "custom" ]; default = "adaptive"; example = "flat"; description = '' Sets the pointer acceleration profile to the given profile. Permitted values are `adaptive`, `flat`. Permitted values are `adaptive`, `flat`, `custom`. Not all devices support this option or all profiles. If a profile is unsupported, the default profile for this is used. `flat`: Pointer motion is accelerated by a constant (device-specific) factor, depending on the current speed. `adaptive`: Pointer acceleration depends on the input speed. This is the default profile for most devices. `custom`: Allows the user to define a custom acceleration function. To define custom functions use the accelPoints<Fallback/Motion/Scroll> and accelStep<Fallback/Motion/Scroll> options. ''; }; Loading @@ -37,7 +40,73 @@ let cfg = config.services.libinput; type = types.nullOr types.str; default = null; example = "-0.5"; description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed)."; description = '' Cursor acceleration (how fast speed increases from minSpeed to maxSpeed). This only applies to the flat or adaptive profile. ''; }; accelPointsFallback = mkOption { type = types.nullOr (types.listOf types.number); default = null; example = [ 0.0 1.0 2.4 2.5 ]; description = '' Sets the points of the fallback acceleration function. The value must be a list of floating point non-negative numbers. This only applies to the custom profile. ''; }; accelPointsMotion = mkOption { type = types.nullOr (types.listOf types.number); default = null; example = [ 0.0 1.0 2.4 2.5 ]; description = '' Sets the points of the (pointer) motion acceleration function. The value must be a list of floating point non-negative numbers. This only applies to the custom profile. ''; }; accelPointsScroll = mkOption { type = types.nullOr (types.listOf types.number); default = null; example = [ 0.0 1.0 2.4 2.5 ]; description = '' Sets the points of the scroll acceleration function. The value must be a list of floating point non-negative numbers. This only applies to the custom profile. ''; }; accelStepFallback = mkOption { type = types.nullOr types.number; default = null; example = 0.1; description = '' Sets the step between the points of the fallback acceleration function. When a step of 0.0 is provided, libinput's Fallback acceleration function is used. This only applies to the custom profile. ''; }; accelStepMotion = mkOption { type = types.nullOr types.number; default = null; example = 0.1; description = '' Sets the step between the points of the (pointer) motion acceleration function. When a step of 0.0 is provided, libinput's Fallback acceleration function is used. This only applies to the custom profile. ''; }; accelStepScroll = mkOption { type = types.nullOr types.number; default = null; example = 0.1; description = '' Sets the step between the points of the scroll acceleration function. When a step of 0.0 is provided, libinput's Fallback acceleration function is used. This only applies to the custom profile. ''; }; buttonMapping = mkOption { Loading Loading @@ -203,6 +272,12 @@ let cfg = config.services.libinput; ${optionalString (cfg.${deviceType}.dev != null) ''MatchDevicePath "${cfg.${deviceType}.dev}"''} Option "AccelProfile" "${cfg.${deviceType}.accelProfile}" ${optionalString (cfg.${deviceType}.accelSpeed != null) ''Option "AccelSpeed" "${cfg.${deviceType}.accelSpeed}"''} ${optionalString (cfg.${deviceType}.accelPointsFallback != null) ''Option "AccelPointsFallback" "${toString cfg.${deviceType}.accelPointsFallback}"''} ${optionalString (cfg.${deviceType}.accelPointsMotion != null) ''Option "AccelPointsMotion" "${toString cfg.${deviceType}.accelPointsMotion}"''} ${optionalString (cfg.${deviceType}.accelPointsScroll != null) ''Option "AccelPointsScroll" "${toString cfg.${deviceType}.accelPointsScroll}"''} ${optionalString (cfg.${deviceType}.accelStepFallback != null) ''Option "AccelStepFallback" "${toString cfg.${deviceType}.accelStepFallback}"''} ${optionalString (cfg.${deviceType}.accelStepMotion != null) ''Option "AccelStepMotion" "${toString cfg.${deviceType}.accelStepMotion}"''} ${optionalString (cfg.${deviceType}.accelStepScroll != null) ''Option "AccelStepScroll" "${toString cfg.${deviceType}.accelStepScroll}"''} ${optionalString (cfg.${deviceType}.buttonMapping != null) ''Option "ButtonMapping" "${cfg.${deviceType}.buttonMapping}"''} ${optionalString (cfg.${deviceType}.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.${deviceType}.calibrationMatrix}"''} ${optionalString (cfg.${deviceType}.transformationMatrix != null) ''Option "TransformationMatrix" "${cfg.${deviceType}.transformationMatrix}"''} Loading Loading
lib/default.nix +2 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,8 @@ let inherit (self.derivations) lazyDerivation optionalDrvAttr; inherit (self.meta) addMetaAttrs dontDistribute setName updateName appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio hiPrioSet getLicenseFromSpdxId getLicenseFromSpdxIdOr getExe getExe'; hiPrioSet licensesSpdx getLicenseFromSpdxId getLicenseFromSpdxIdOr getExe getExe'; inherit (self.filesystem) pathType pathIsDirectory pathIsRegularFile packagesFromDirectoryRecursive; inherit (self.sources) cleanSourceFilter Loading
lib/meta.nix +37 −5 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ let inherit (lib) matchAttrs any all isDerivation getBin assertMsg; inherit (lib.attrsets) mapAttrs' filterAttrs; inherit (builtins) isString match typeOf; in Loading Loading @@ -286,11 +287,39 @@ rec { ((!pkg?meta.platforms) || any (platformMatch platform) pkg.meta.platforms) && all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []); /** Mapping of SPDX ID to the attributes in lib.licenses. For SPDX IDs, see https://spdx.org/licenses. Note that some SPDX licenses might be missing. # Examples :::{.example} ## `lib.meta.licensesSpdx` usage example ```nix lib.licensesSpdx.MIT == lib.licenses.mit => true lib.licensesSpdx."MY LICENSE" => error: attribute 'MY LICENSE' missing ``` ::: */ licensesSpdx = mapAttrs' (_key: license: { name = license.spdxId; value = license; }) (filterAttrs (_key: license: license ? spdxId) lib.licenses); /** Get the corresponding attribute in lib.licenses from the SPDX ID or warn and fallback to `{ shortName = <license string>; }`. For SPDX IDs, see https://spdx.org/licenses For SPDX IDs, see https://spdx.org/licenses. Note that some SPDX licenses might be missing. # Type Loading Loading @@ -325,7 +354,8 @@ rec { Get the corresponding attribute in lib.licenses from the SPDX ID or fallback to the given default value. For SPDX IDs, see https://spdx.org/licenses For SPDX IDs, see https://spdx.org/licenses. Note that some SPDX licenses might be missing. # Inputs Loading Loading @@ -361,10 +391,12 @@ rec { */ getLicenseFromSpdxIdOr = let spdxLicenses = lib.mapAttrs (id: ls: assert lib.length ls == 1; builtins.head ls) (lib.groupBy (l: lib.toLower l.spdxId) (lib.filter (l: l ? spdxId) (lib.attrValues lib.licenses))); lowercaseLicenses = lib.mapAttrs' (name: value: { name = lib.toLower name; inherit value; }) licensesSpdx; in licstr: default: spdxLicenses.${ lib.toLower licstr } or default; lowercaseLicenses.${ lib.toLower licstr } or default; /** Get the path to the main program of a package based on meta.mainProgram Loading
maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -17418,6 +17418,12 @@ githubId = 5265630; name = "Michael Köppl"; }; returntoreality = { email = "linus@lotz.li"; github = "retuntoreality"; githubId = 255667; name = "Linus Karl"; }; revol-xut = { email = "revol-xut@protonmail.com"; name = "Tassilo Tanneberger"; Loading
nixos/doc/manual/release-notes/rl-2411.section.md +4 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,10 @@ - `programs.vim.defaultEditor` now only works if `programs.vim.enable` is enabled. - The `indi-full` package no longer contains non-free drivers. To get the old collection of drivers use `indi-full-nonfree` or create your own collection of drivers by overriding indi-with-drivers. E.g.: `pkgs.indi-with-drivers.override {extraDrivers = with pkgs.indi-3rdparty; [indi-gphoto];}` - `/share/vim-plugins` now only gets linked if `programs.vim.enable` is enabled - The `tracy` package no longer works on X11, since it's moved to Wayland Loading
nixos/modules/services/hardware/libinput.nix +78 −3 Original line number Diff line number Diff line Loading @@ -18,18 +18,21 @@ let cfg = config.services.libinput; }; accelProfile = mkOption { type = types.enum [ "flat" "adaptive" ]; type = types.enum [ "flat" "adaptive" "custom" ]; default = "adaptive"; example = "flat"; description = '' Sets the pointer acceleration profile to the given profile. Permitted values are `adaptive`, `flat`. Permitted values are `adaptive`, `flat`, `custom`. Not all devices support this option or all profiles. If a profile is unsupported, the default profile for this is used. `flat`: Pointer motion is accelerated by a constant (device-specific) factor, depending on the current speed. `adaptive`: Pointer acceleration depends on the input speed. This is the default profile for most devices. `custom`: Allows the user to define a custom acceleration function. To define custom functions use the accelPoints<Fallback/Motion/Scroll> and accelStep<Fallback/Motion/Scroll> options. ''; }; Loading @@ -37,7 +40,73 @@ let cfg = config.services.libinput; type = types.nullOr types.str; default = null; example = "-0.5"; description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed)."; description = '' Cursor acceleration (how fast speed increases from minSpeed to maxSpeed). This only applies to the flat or adaptive profile. ''; }; accelPointsFallback = mkOption { type = types.nullOr (types.listOf types.number); default = null; example = [ 0.0 1.0 2.4 2.5 ]; description = '' Sets the points of the fallback acceleration function. The value must be a list of floating point non-negative numbers. This only applies to the custom profile. ''; }; accelPointsMotion = mkOption { type = types.nullOr (types.listOf types.number); default = null; example = [ 0.0 1.0 2.4 2.5 ]; description = '' Sets the points of the (pointer) motion acceleration function. The value must be a list of floating point non-negative numbers. This only applies to the custom profile. ''; }; accelPointsScroll = mkOption { type = types.nullOr (types.listOf types.number); default = null; example = [ 0.0 1.0 2.4 2.5 ]; description = '' Sets the points of the scroll acceleration function. The value must be a list of floating point non-negative numbers. This only applies to the custom profile. ''; }; accelStepFallback = mkOption { type = types.nullOr types.number; default = null; example = 0.1; description = '' Sets the step between the points of the fallback acceleration function. When a step of 0.0 is provided, libinput's Fallback acceleration function is used. This only applies to the custom profile. ''; }; accelStepMotion = mkOption { type = types.nullOr types.number; default = null; example = 0.1; description = '' Sets the step between the points of the (pointer) motion acceleration function. When a step of 0.0 is provided, libinput's Fallback acceleration function is used. This only applies to the custom profile. ''; }; accelStepScroll = mkOption { type = types.nullOr types.number; default = null; example = 0.1; description = '' Sets the step between the points of the scroll acceleration function. When a step of 0.0 is provided, libinput's Fallback acceleration function is used. This only applies to the custom profile. ''; }; buttonMapping = mkOption { Loading Loading @@ -203,6 +272,12 @@ let cfg = config.services.libinput; ${optionalString (cfg.${deviceType}.dev != null) ''MatchDevicePath "${cfg.${deviceType}.dev}"''} Option "AccelProfile" "${cfg.${deviceType}.accelProfile}" ${optionalString (cfg.${deviceType}.accelSpeed != null) ''Option "AccelSpeed" "${cfg.${deviceType}.accelSpeed}"''} ${optionalString (cfg.${deviceType}.accelPointsFallback != null) ''Option "AccelPointsFallback" "${toString cfg.${deviceType}.accelPointsFallback}"''} ${optionalString (cfg.${deviceType}.accelPointsMotion != null) ''Option "AccelPointsMotion" "${toString cfg.${deviceType}.accelPointsMotion}"''} ${optionalString (cfg.${deviceType}.accelPointsScroll != null) ''Option "AccelPointsScroll" "${toString cfg.${deviceType}.accelPointsScroll}"''} ${optionalString (cfg.${deviceType}.accelStepFallback != null) ''Option "AccelStepFallback" "${toString cfg.${deviceType}.accelStepFallback}"''} ${optionalString (cfg.${deviceType}.accelStepMotion != null) ''Option "AccelStepMotion" "${toString cfg.${deviceType}.accelStepMotion}"''} ${optionalString (cfg.${deviceType}.accelStepScroll != null) ''Option "AccelStepScroll" "${toString cfg.${deviceType}.accelStepScroll}"''} ${optionalString (cfg.${deviceType}.buttonMapping != null) ''Option "ButtonMapping" "${cfg.${deviceType}.buttonMapping}"''} ${optionalString (cfg.${deviceType}.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.${deviceType}.calibrationMatrix}"''} ${optionalString (cfg.${deviceType}.transformationMatrix != null) ''Option "TransformationMatrix" "${cfg.${deviceType}.transformationMatrix}"''} Loading