diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index 835354f7f..e7c752919 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -9,7 +9,7 @@ let ; cfg = config.accounts.email; - enabledAccounts = lib.filterAttrs (n: v: v.enable) cfg.accounts; + enabledAccounts = lib.filterAttrs (_n: v: v.enable) cfg.accounts; gpgModule = types.submodule { options = { diff --git a/modules/files.nix b/modules/files.nix index a43dbfca0..ba7a46451 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -100,7 +100,7 @@ in ( let dups = lib.attrNames ( - lib.filterAttrs (n: v: v > 1) ( + lib.filterAttrs (_n: v: v > 1) ( lib.foldAttrs (acc: v: acc + v) 0 (map (v: { ${v.target} = 1; }) cfg) ) ); diff --git a/modules/launchd/default.nix b/modules/launchd/default.nix index 8754daa1a..eb526091b 100644 --- a/modules/launchd/default.nix +++ b/modules/launchd/default.nix @@ -69,9 +69,9 @@ let toAgent = config: pkgs.writeText "${config.Label}.plist" (toPlist { escape = true; } (mutateConfig config)); - agentPlists = lib.mapAttrs' (n: v: lib.nameValuePair "${v.config.Label}.plist" (toAgent v.config)) ( - lib.filterAttrs (n: v: v.enable) cfg.agents - ); + agentPlists = lib.mapAttrs' ( + _n: v: lib.nameValuePair "${v.config.Label}.plist" (toAgent v.config) + ) (lib.filterAttrs (_n: v: v.enable) cfg.agents); agentsDrv = pkgs.runCommand "home-manager-agents" { } '' mkdir -p "$out" diff --git a/modules/lib/dag.nix b/modules/lib/dag.nix index a4c40b707..5259e2dee 100644 --- a/modules/lib/dag.nix +++ b/modules/lib/dag.nix @@ -86,7 +86,7 @@ in topoSort = dag: let - dagBefore = dag: name: builtins.attrNames (filterAttrs (n: v: builtins.elem name v.before) dag); + dagBefore = dag: name: builtins.attrNames (filterAttrs (_n: v: builtins.elem name v.before) dag); normalizedDag = mapAttrs (n: v: { name = n; inherit (v) data; diff --git a/modules/lib/generators.nix b/modules/lib/generators.nix index d242727f9..f3993c323 100644 --- a/modules/lib/generators.nix +++ b/modules/lib/generators.nix @@ -34,7 +34,7 @@ importantFields = filterAttrs isImportantField attrs; withoutImportantFields = fields: removeAttrs fields (attrNames importantFields); - allSections = filterAttrs (n: v: isAttrs v || isList v) attrs; + allSections = filterAttrs (_n: v: isAttrs v || isList v) attrs; sections = withoutImportantFields allSections; mkSection = @@ -57,7 +57,7 @@ inherit indent; }; - allFields = filterAttrs (n: v: !(isAttrs v || isList v)) attrs; + allFields = filterAttrs (_n: v: !(isAttrs v || isList v)) attrs; fields = withoutImportantFields allFields; in mkFields importantFields diff --git a/modules/lib/strings.nix b/modules/lib/strings.nix index b8dd6baa4..e8e700c51 100644 --- a/modules/lib/strings.nix +++ b/modules/lib/strings.nix @@ -29,7 +29,7 @@ rec { ++ upperChars ++ stringToCharacters "0123456789"; - empties = l: genList (x: "") (length l); + empties = l: genList (_x: "") (length l); unsafeInName = stringToCharacters (replaceStrings safeChars (empties safeChars) path); diff --git a/modules/misc/fontconfig.nix b/modules/misc/fontconfig.nix index 716b6f4d3..4a600dd1e 100644 --- a/modules/misc/fontconfig.nix +++ b/modules/misc/fontconfig.nix @@ -337,7 +337,7 @@ in }; xdg.configFile = lib.mapAttrs' ( - name: config: + _name: config: lib.nameValuePair "fontconfig/conf.d/${toString config.priority}-hm-${config.label}.conf" { inherit (config) enable text; source = lib.mkIf (config.source != null) config.source; diff --git a/modules/misc/news.nix b/modules/misc/news.nix index c44269910..8f97ad698 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -53,7 +53,7 @@ let ); isNixFile = n: v: v == "regular" && lib.hasSuffix ".nix" n; - isDirectory = n: v: v == "directory"; + isDirectory = _n: v: v == "directory"; # Recursively collect all .nix files from a directory collectNixFiles = diff --git a/modules/misc/nix.nix b/modules/misc/nix.nix index 11b222966..023258bc9 100644 --- a/modules/misc/nix.nix +++ b/modules/misc/nix.nix @@ -269,7 +269,7 @@ in path = config.flake.outPath; } // lib.filterAttrs ( - n: v: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash" + n: _v: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash" ) config.flake ); }; @@ -398,7 +398,7 @@ in (mkIf (cfg.registry != { }) { xdg.configFile."nix/registry.json".source = jsonFormat.generate "registry.json" { version = cfg.registryVersion; - flakes = mapAttrsToList (n: v: { inherit (v) from to exact; }) cfg.registry; + flakes = mapAttrsToList (_n: v: { inherit (v) from to exact; }) cfg.registry; }; }) diff --git a/modules/misc/nixpkgs-disabled.nix b/modules/misc/nixpkgs-disabled.nix index 628c2ee06..e924759b9 100644 --- a/modules/misc/nixpkgs-disabled.nix +++ b/modules/misc/nixpkgs-disabled.nix @@ -46,7 +46,7 @@ let traceXIfNot = c: if c x then true else lib.traceSeqN 1 x false; in traceXIfNot isConfig; - merge = args: lib.foldr (def: mergeConfig def.value) { }; + merge = _args: lib.foldr (def: mergeConfig def.value) { }; }; # Copied from nixpkgs.nix. diff --git a/modules/misc/nixpkgs.nix b/modules/misc/nixpkgs.nix index 9f9eb0ee3..95c03213b 100644 --- a/modules/misc/nixpkgs.nix +++ b/modules/misc/nixpkgs.nix @@ -45,7 +45,7 @@ let traceXIfNot = c: if c x then true else lib.traceSeqN 1 x false; in traceXIfNot isConfig; - merge = args: lib.foldr (def: mergeConfig def.value) { }; + merge = _args: lib.foldr (def: mergeConfig def.value) { }; }; overlayType = lib.mkOptionType { @@ -55,7 +55,7 @@ let merge = lib.mergeOneOption; }; - _pkgs = import pkgsPath (lib.filterAttrs (n: v: v != null) config.nixpkgs); + _pkgs = import pkgsPath (lib.filterAttrs (_n: v: v != null) config.nixpkgs); in { diff --git a/modules/misc/qt.nix b/modules/misc/qt.nix index 514ada6a6..f6b906a55 100644 --- a/modules/misc/qt.nix +++ b/modules/misc/qt.nix @@ -353,7 +353,7 @@ in }; # Necessary because home.sessionVariables doesn't support mkIf - envVars = lib.filterAttrs (n: v: v != null) { + envVars = lib.filterAttrs (_n: v: v != null) { QT_QPA_PLATFORMTHEME = if (platformTheme.name != null) then styleNames.${platformTheme.name} or platformTheme.name diff --git a/modules/misc/xdg-mime-apps.nix b/modules/misc/xdg-mime-apps.nix index 1750a787e..3c6b8b214 100644 --- a/modules/misc/xdg-mime-apps.nix +++ b/modules/misc/xdg-mime-apps.nix @@ -149,7 +149,7 @@ in xdg.configFile."mimeapps.list".source = let - joinValues = lib.mapAttrs (n: lib.concatStringsSep ";"); + joinValues = lib.mapAttrs (_n: lib.concatStringsSep ";"); baseFile = (pkgs.formats.ini { }).generate "mimeapps.list" { "Added Associations" = joinValues cfg.associations.added; diff --git a/modules/misc/xdg-user-dirs.nix b/modules/misc/xdg-user-dirs.nix index 181d6c10b..ae4223f46 100644 --- a/modules/misc/xdg-user-dirs.nix +++ b/modules/misc/xdg-user-dirs.nix @@ -169,7 +169,7 @@ in config = let directories = - (lib.filterAttrs (n: v: !isNull v) { + (lib.filterAttrs (_n: v: !isNull v) { DESKTOP = cfg.desktop; DOCUMENTS = cfg.documents; DOWNLOAD = cfg.download; diff --git a/modules/programs/aerc/accounts.nix b/modules/programs/aerc/accounts.nix index 1d7b3f09e..9910fb3fb 100644 --- a/modules/programs/aerc/accounts.nix +++ b/modules/programs/aerc/accounts.nix @@ -145,7 +145,7 @@ in }; mkAccount = - name: account: + _name: account: let nullOrMap = f: v: if v == null then v else f v; @@ -168,7 +168,7 @@ in "?" + builtins.concatStringsSep "&" ( lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) ( - lib.attrsets.filterAttrs (k: v: v != null) params + lib.attrsets.filterAttrs (_k: v: v != null) params ) ) else @@ -249,7 +249,7 @@ in } // optPwCmd "outgoing" passwordCommand; - msmtp = cfg: { + msmtp = _cfg: { outgoing = "msmtpq --read-envelope-from --read-recipients"; }; diff --git a/modules/programs/alacritty.nix b/modules/programs/alacritty.nix index 714ddc97a..1ec655754 100644 --- a/modules/programs/alacritty.nix +++ b/modules/programs/alacritty.nix @@ -99,7 +99,7 @@ in xdg.configFile."alacritty/alacritty.toml" = lib.mkIf (cfg.settings != { }) { source = (tomlFormat.generate "alacritty.toml" cfg.settings).overrideAttrs ( - finalAttrs: prevAttrs: { + _finalAttrs: prevAttrs: { buildCommand = lib.concatStringsSep "\n" [ prevAttrs.buildCommand # TODO: why is this needed? Is there a better way to retain escape sequences? diff --git a/modules/programs/alot/default.nix b/modules/programs/alot/default.nix index aac517064..134006aea 100644 --- a/modules/programs/alot/default.nix +++ b/modules/programs/alot/default.nix @@ -138,7 +138,7 @@ let submoduleToAttrs = m: lib.filterAttrs (name: v: name != "_module" && v != null) m; in lib.generators.toINI { mkSectionName = mk2ndLevelSectionName; } ( - lib.mapAttrs (name: submoduleToAttrs) cfg.tags + lib.mapAttrs (_name: submoduleToAttrs) cfg.tags ) ) + '' diff --git a/modules/programs/astroid/default.nix b/modules/programs/astroid/default.nix index ccda5628d..69168e0ee 100644 --- a/modules/programs/astroid/default.nix +++ b/modules/programs/astroid/default.nix @@ -12,7 +12,7 @@ let jsonFormat = pkgs.formats.json { }; astroidAccounts = lib.filterAttrs ( - n: v: v.enable && v.astroid.enable + _n: v: v.enable && v.astroid.enable ) config.accounts.email.accounts; boolOpt = b: if b then "true" else "false"; @@ -51,7 +51,7 @@ let astroidConfig = lib.foldl' lib.recursiveUpdate template [ { astroid.notmuch_config = "${config.xdg.configHome}/notmuch/default/config"; - accounts = lib.mapAttrs (n: accountAttr) astroidAccounts; + accounts = lib.mapAttrs (_n: accountAttr) astroidAccounts; crypto.gpg.path = "${pkgs.gnupg}/bin/gpg"; } cfg.extraConfig diff --git a/modules/programs/borgmatic.nix b/modules/programs/borgmatic.nix index d8c4f7e09..24595fc53 100644 --- a/modules/programs/borgmatic.nix +++ b/modules/programs/borgmatic.nix @@ -232,7 +232,7 @@ let } ); - removeNullValues = attrSet: lib.filterAttrs (key: value: value != null) attrSet; + removeNullValues = attrSet: lib.filterAttrs (_key: value: value != null) attrSet; hmFiles = builtins.attrValues config.home.file; hmSymlinks = (lib.filter (file: !file.recursive) hmFiles); diff --git a/modules/programs/claude-code.nix b/modules/programs/claude-code.nix index 143a2a36c..e6e6fc886 100644 --- a/modules/programs/claude-code.nix +++ b/modules/programs/claude-code.nix @@ -548,7 +548,7 @@ in if isPathLikeContent content then { source = content; } else { text = content; } ); - mkMarketplaceEntry = name: content: { + mkMarketplaceEntry = _name: content: { source = { source = "directory"; path = content; diff --git a/modules/programs/docker-cli.nix b/modules/programs/docker-cli.nix index e16edc7dd..7d2c3c90b 100644 --- a/modules/programs/docker-cli.nix +++ b/modules/programs/docker-cli.nix @@ -106,7 +106,7 @@ in }; } // lib.mapAttrs' ( - n: ctx: + _n: ctx: let path = "${cfg.configDir}/contexts/meta/${builtins.hashString "sha256" ctx.Name}/meta.json"; in diff --git a/modules/programs/element-desktop.nix b/modules/programs/element-desktop.nix index 62ba5621d..4a69a75d6 100644 --- a/modules/programs/element-desktop.nix +++ b/modules/programs/element-desktop.nix @@ -112,7 +112,7 @@ in in defaultConfig // (lib.mapAttrs' ( - name: value: + name: _value: lib.nameValuePair "${prefix}/Element-${name}/config.json" { source = (formatter.generate "element-desktop-${name}" cfg.profiles."${name}"); } diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix index 3dc2c8fd6..329ec5b61 100644 --- a/modules/programs/emacs.nix +++ b/modules/programs/emacs.nix @@ -69,7 +69,7 @@ in }; extraPackages = mkOption { - default = self: [ ]; + default = _self: [ ]; type = lib.hm.types.selectorFunction; defaultText = "epkgs: []"; example = literalExpression "epkgs: [ epkgs.emms epkgs.magit ]"; @@ -81,7 +81,7 @@ in }; overrides = mkOption { - default = self: super: { }; + default = _self: _super: { }; type = lib.hm.types.overlayFunction; defaultText = "self: super: {}"; example = literalExpression '' diff --git a/modules/programs/feh.nix b/modules/programs/feh.nix index 26b1a6bc8..0c495a87c 100644 --- a/modules/programs/feh.nix +++ b/modules/programs/feh.nix @@ -26,8 +26,8 @@ let renderBindings = bindings: let - enabled = filterAttrs (n: v: v != null) bindings; - disabled = filterAttrs (n: v: v == null) bindings; + enabled = filterAttrs (_n: v: v != null) bindings; + disabled = filterAttrs (_n: v: v == null) bindings; render = mapAttrsToList renderBinding; in lib.concatStringsSep "\n" (render disabled ++ render enabled); @@ -139,7 +139,7 @@ in config = lib.mkIf cfg.enable { assertions = [ { - assertion = ((filterAttrs (n: v: v == "") cfg.keybindings) == { }); + assertion = ((filterAttrs (_n: v: v == "") cfg.keybindings) == { }); message = "To disable a keybinding, use `null` instead of an empty string."; } ]; diff --git a/modules/programs/firefox/profiles/search.nix b/modules/programs/firefox/profiles/search.nix index 84fca1109..088cd0c19 100644 --- a/modules/programs/firefox/profiles/search.nix +++ b/modules/programs/firefox/profiles/search.nix @@ -49,7 +49,7 @@ let } // (removeAttrs input [ "icon" ]) // optionalAttrs (input ? icon || input ? iconMapObj) { - iconMapObj = mapAttrs (name: iconUrl) ( + iconMapObj = mapAttrs (_name: iconUrl) ( (optionalAttrs (input ? icon) { # Convenience to specify single icon instead of map "16" = input.icon; diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 88164685a..da40ffdaa 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -420,9 +420,9 @@ let "onSignal" "onEvent" ]; - isHandler = name: def: isAttrs def && builtins.any (attr: builtins.hasAttr attr def) handlerAttrs; + isHandler = _name: def: isAttrs def && builtins.any (attr: builtins.hasAttr attr def) handlerAttrs; handlerFunctions = lib.filterAttrs isHandler cfg.functions; - sourceFunction = name: def: "source ${config.xdg.configHome}/fish/functions/${name}.fish"; + sourceFunction = name: _def: "source ${config.xdg.configHome}/fish/functions/${name}.fish"; in builtins.concatStringsSep "\n" (lib.mapAttrsToList sourceFunction handlerFunctions); diff --git a/modules/programs/fzf.nix b/modules/programs/fzf.nix index 61f0e9ecb..2ef4f48e4 100644 --- a/modules/programs/fzf.nix +++ b/modules/programs/fzf.nix @@ -193,8 +193,8 @@ in config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.sessionVariables = lib.mapAttrs (n: toString) ( - lib.filterAttrs (n: v: v != [ ] && v != null) { + home.sessionVariables = lib.mapAttrs (_n: toString) ( + lib.filterAttrs (_n: v: v != [ ] && v != null) { FZF_ALT_C_COMMAND = cfg.changeDirWidgetCommand; FZF_ALT_C_OPTS = cfg.changeDirWidgetOptions; FZF_CTRL_R_OPTS = cfg.historyWidgetOptions; diff --git a/modules/programs/gnome-terminal.nix b/modules/programs/gnome-terminal.nix index d67e1c215..df364c2b1 100644 --- a/modules/programs/gnome-terminal.nix +++ b/modules/programs/gnome-terminal.nix @@ -394,7 +394,7 @@ in }; "${dconfPath}/profiles:" = { - default = lib.head (lib.attrNames (lib.filterAttrs (n: v: v.default) cfg.profile)); + default = lib.head (lib.attrNames (lib.filterAttrs (_n: v: v.default) cfg.profile)); list = lib.attrNames cfg.profile; }; } diff --git a/modules/programs/i3status.nix b/modules/programs/i3status.nix index d717937a3..1bc4bcbc4 100644 --- a/modules/programs/i3status.nix +++ b/modules/programs/i3status.nix @@ -14,7 +14,7 @@ let cfg = config.programs.i3status; - enabledModules = lib.filterAttrs (n: v: v.enable) cfg.modules; + enabledModules = lib.filterAttrs (_n: v: v.enable) cfg.modules; formatOrder = n: ''order += "${n}"''; @@ -231,7 +231,7 @@ in xdg.configFile."i3status/config".text = lib.concatStringsSep "\n" ( lib.optional (cfg.general != { }) (formatModule "general" cfg.general) ++ map formatOrder (sortAttrNamesByPosition lib.lessThan enabledModules) - ++ lib.mapAttrsToList formatModule (lib.mapAttrs (n: v: v.settings) enabledModules) + ++ lib.mapAttrsToList formatModule (lib.mapAttrs (_n: v: v.settings) enabledModules) ); }; } diff --git a/modules/programs/joplin-desktop.nix b/modules/programs/joplin-desktop.nix index bae2b60ad..d5b173b53 100644 --- a/modules/programs/joplin-desktop.nix +++ b/modules/programs/joplin-desktop.nix @@ -98,7 +98,7 @@ in activateJoplinDesktopConfig = let newConfig = jsonFormat.generate "joplin-settings.json" ( - lib.attrsets.filterAttrs (n: v: (v != null) && (v != "")) ( + lib.attrsets.filterAttrs (_n: v: (v != null) && (v != "")) ( { # TODO: find a better way to convert nix attribute names to strings: # sync.interval = ... -> "sync.interval" = ... diff --git a/modules/programs/lutris.nix b/modules/programs/lutris.nix index 3a0b1b969..f29f55392 100644 --- a/modules/programs/lutris.nix +++ b/modules/programs/lutris.nix @@ -190,7 +190,7 @@ in lutris-overrides = { # This only adds pkgs.steam to the extraPkgs, I see no reason to ever enable it. steamSupport = false; - extraPkgs = (prev: cfg.extraPackages ++ optional (cfg.steamPackage != null) cfg.steamPackage); + extraPkgs = (_prev: cfg.extraPackages ++ optional (cfg.steamPackage != null) cfg.steamPackage); }; in [ (cfg.package.override lutris-overrides) ]; @@ -200,7 +200,7 @@ in buildRunnerConfig = ( runner_name: runner_config: # Remove the unset values so they don't end up on the final config. - filterAttrsRecursive (name: value: value != { } && value != null && value != "") { + filterAttrsRecursive (_name: value: value != { } && value != null && value != "") { "${runner_name}" = runner_config.settings.runner # If set translate .package to runner_executable diff --git a/modules/programs/mbsync/default.nix b/modules/programs/mbsync/default.nix index 00b31d44b..0a47726bb 100644 --- a/modules/programs/mbsync/default.nix +++ b/modules/programs/mbsync/default.nix @@ -27,20 +27,20 @@ let # Given a SINGLE group's channels attribute set, return true if ANY of the channel's # patterns use the invalidOption attribute set value name. channelInvalidOption = - channels: invalidOption: any (c: c) (mapAttrsToList (c: lib.hasAttr invalidOption) channels); + channels: invalidOption: any (c: c) (mapAttrsToList (_c: lib.hasAttr invalidOption) channels); # Given a SINGLE account's groups attribute set, return true if ANY of the account's group's channel's patterns use the invalidOption attribute set value name. groupInvalidOption = groups: invalidOption: any (g: g) ( - mapAttrsToList (groupName: groupVals: channelInvalidOption groupVals.channels invalidOption) groups + mapAttrsToList (_groupName: groupVals: channelInvalidOption groupVals.channels invalidOption) groups ); # Given all accounts (ensure that accounts passed in here ARE mbsync-using accounts) # return true if ANY of the account's groups' channels' patterns use the # invalidOption attribute set value name. accountInvalidOption = - accounts: invalidOption: + _accounts: invalidOption: any (a: a) (map (account: groupInvalidOption account.mbsync.groups invalidOption) mbsyncAccounts); genTlsConfig = @@ -203,14 +203,14 @@ let genChannelStrings = groupName: channels: lib.optionals (channels != { }) ( - mapAttrsToList (channelName: info: genChannelString groupName info) channels + mapAttrsToList (_channelName: info: genChannelString groupName info) channels ); # Given a group, return a string that configures all the channels within # the group. genGroupsChannels = group: concatStringsSep "\n" (genChannelStrings group.name group.channels); # Generate all channel configurations for all groups for this account. in - concatStringsSep "\n" (lib.remove "" (mapAttrsToList (name: genGroupsChannels) groups)); + concatStringsSep "\n" (lib.remove "" (mapAttrsToList (_name: genGroupsChannels) groups)); # Given the attr set of groups, return a string which maps channels to groups genAccountGroups = @@ -219,7 +219,7 @@ let # Given the name of the group and the attribute set of channels, make # make "Channel -" for each channel to list os strings genChannelStrings = - groupName: channels: mapAttrsToList (name: info: "Channel ${groupName}-${name}") channels; + groupName: channels: mapAttrsToList (name: _info: "Channel ${groupName}-${name}") channels; # Take in 1 group, if the group has channels specified, construct the # "Group " header and each of the channels. genGroupChannelString = @@ -232,7 +232,7 @@ let # Given set of groups, generates list of strings, where each string is one # of the groups and its constituent channels. genGroupsStrings = mapAttrsToList ( - name: info: concatStringsSep "\n" (genGroupChannelString groups.${name}) + name: _info: concatStringsSep "\n" (genGroupChannelString groups.${name}) ) groups; # Join all non-empty groups. combined = concatStringsSep "\n\n" (lib.remove "" genGroupsStrings) + "\n"; diff --git a/modules/programs/meli.nix b/modules/programs/meli.nix index 9791e4751..9c424c572 100644 --- a/modules/programs/meli.nix +++ b/modules/programs/meli.nix @@ -18,13 +18,13 @@ let tomlFormat = pkgs.formats.toml { }; enabledAccounts = lib.attrsets.filterAttrs ( - name: value: value.enable && (value.meli.enable or false) + _name: value: value.enable && (value.meli.enable or false) ) config.accounts.email.accounts; meliAccounts = (lib.attrsets.mapAttrs (name: value: (mkMeliAccounts name value)) enabledAccounts); mkMeliAccounts = ( - name: account: + _name: account: { root_mailbox = "${config.accounts.email.maildirBasePath}/${account.maildir.path}"; format = "Maildir"; diff --git a/modules/programs/mujmap.nix b/modules/programs/mujmap.nix index b31bfb2d0..c258584f5 100644 --- a/modules/programs/mujmap.nix +++ b/modules/programs/mujmap.nix @@ -23,7 +23,7 @@ let settingsFormat = pkgs.formats.toml { }; - filterNull = attrs: lib.attrsets.filterAttrs (n: v: v != null) attrs; + filterNull = attrs: lib.attrsets.filterAttrs (_n: v: v != null) attrs; configFile = account: diff --git a/modules/programs/neomutt/default.nix b/modules/programs/neomutt/default.nix index 5c8fe8a92..80a7f8ad8 100644 --- a/modules/programs/neomutt/default.nix +++ b/modules/programs/neomutt/default.nix @@ -21,7 +21,7 @@ let cfg = config.programs.neomutt; neomuttAccountsCfg = filterAttrs ( - n: a: a.enable && a.neomutt.enable + _n: a: a.enable && a.neomutt.enable ) config.accounts.email.accounts; neomuttAccounts = attrValues neomuttAccountsCfg; diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index bedf0cb73..2d2d28735 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -481,7 +481,7 @@ in suppressIncompatibleConfig = p: lib.filterAttrs ( - n: v: + n: _v: builtins.elem n [ "plugin" "optional" diff --git a/modules/programs/papis.nix b/modules/programs/papis.nix index c1adf7670..ae1490f0f 100644 --- a/modules/programs/papis.nix +++ b/modules/programs/papis.nix @@ -13,7 +13,7 @@ let lib.mapAttrsToList (n: v: if v.isDefault then n else null) cfg.libraries ); - settingsIni = (lib.mapAttrs (n: v: v.settings) cfg.libraries) // { + settingsIni = (lib.mapAttrs (_n: v: v.settings) cfg.libraries) // { settings = cfg.settings // lib.optionalAttrs (cfg.libraries != { }) { diff --git a/modules/programs/pimsync/default.nix b/modules/programs/pimsync/default.nix index e90695cb9..32cfce305 100644 --- a/modules/programs/pimsync/default.nix +++ b/modules/programs/pimsync/default.nix @@ -113,7 +113,7 @@ accountSettings = calendarConfig ++ contactConfig; - localStorageDir = name: acc: lib.attrsets.getAttrFromPath [ "local" "path" ] acc; + localStorageDir = _name: acc: lib.attrsets.getAttrFromPath [ "local" "path" ] acc; calendarLocalStorageDirs = lib.mapAttrsToList localStorageDir calendarAccounts; contactLocalStorageDirs = lib.mapAttrsToList localStorageDir contactAccounts; diff --git a/modules/programs/radio-active.nix b/modules/programs/radio-active.nix index 455f5ced6..00223f332 100644 --- a/modules/programs/radio-active.nix +++ b/modules/programs/radio-active.nix @@ -104,7 +104,7 @@ in radio-active = if player == "mpv" then pkgs.radio-active.overrideAttrs ( - finalAttrs: previousAttrs: { + _finalAttrs: previousAttrs: { postPatch = '' ${previousAttrs.postPatch} @@ -116,7 +116,7 @@ in ) else if player == "vlc" then pkgs.radio-active.overrideAttrs ( - finalAttrs: previousAttrs: { + _finalAttrs: previousAttrs: { postPatch = '' ${previousAttrs.postPatch} diff --git a/modules/programs/ripgrep-all.nix b/modules/programs/ripgrep-all.nix index 9a24b5bfb..93a220adb 100644 --- a/modules/programs/ripgrep-all.nix +++ b/modules/programs/ripgrep-all.nix @@ -94,7 +94,7 @@ in file."${configPath}" = lib.mkIf (cfg.custom_adapters != [ ]) { source = (pkgs.formats.json { }).generate "ripgrep-all" { "$schema" = "./config.schema.json"; - custom_adapters = map (lib.filterAttrs (n: v: v != null)) cfg.custom_adapters; + custom_adapters = map (lib.filterAttrs (_n: v: v != null)) cfg.custom_adapters; }; }; }; diff --git a/modules/programs/sbt.nix b/modules/programs/sbt.nix index 9395ecf8e..e102e231a 100644 --- a/modules/programs/sbt.nix +++ b/modules/programs/sbt.nix @@ -43,7 +43,7 @@ let ${concatStrings (lib.mapAttrsToList (name: value: "${name}: ${value}") value)} ''; - renderRepositories = repos: '' + renderRepositories = _repos: '' [repositories] ${concatStrings (map renderRepository cfg.repositories)}''; diff --git a/modules/programs/skim.nix b/modules/programs/skim.nix index 015dc11fc..eb0aa5511 100644 --- a/modules/programs/skim.nix +++ b/modules/programs/skim.nix @@ -98,8 +98,8 @@ in config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.sessionVariables = lib.mapAttrs (n: toString) ( - lib.filterAttrs (n: v: v != [ ] && v != null) { + home.sessionVariables = lib.mapAttrs (_n: toString) ( + lib.filterAttrs (_n: v: v != [ ] && v != null) { SKIM_ALT_C_COMMAND = cfg.changeDirWidgetCommand; SKIM_ALT_C_OPTS = cfg.changeDirWidgetOptions; SKIM_CTRL_R_OPTS = cfg.historyWidgetOptions; diff --git a/modules/programs/smug.nix b/modules/programs/smug.nix index 20029a1f1..ebfa8c96a 100644 --- a/modules/programs/smug.nix +++ b/modules/programs/smug.nix @@ -156,7 +156,7 @@ in config = let - cleanedProjects = lib.filterAttrsRecursive (name: value: value != null) cfg.projects; + cleanedProjects = lib.filterAttrsRecursive (_name: value: value != null) cfg.projects; mkProjects = lib.attrsets.mapAttrs' ( k: v: { @@ -171,7 +171,7 @@ in // { inherit (v) session; windows = lib.lists.forEach v.windows ( - winprop: (lib.filterAttrsRecursive (name: value: value != null) winprop) + winprop: (lib.filterAttrsRecursive (_name: value: value != null) winprop) ); }; in diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index 42710139c..8ba67beb3 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -635,10 +635,10 @@ in warnings = mapAttrsToList - (n: v: '' + (n: _v: '' The SSH config match block `programs.ssh.matchBlocks.${n}` sets both of the host and match options. The match option takes precedence.'') - (lib.filterAttrs (n: v: v.data.host != null && v.data.match != null) cfg.matchBlocks); + (lib.filterAttrs (_n: v: v.data.host != null && v.data.match != null) cfg.matchBlocks); } (lib.mkIf cfg.enableDefaultConfig { warnings = [ diff --git a/modules/programs/thunderbird.nix b/modules/programs/thunderbird.nix index db06b38e7..39e8a15ad 100644 --- a/modules/programs/thunderbird.nix +++ b/modules/programs/thunderbird.nix @@ -251,7 +251,7 @@ let let inherit (contact) id; in - lib.filterAttrs (n: v: v != null) ( + lib.filterAttrs (_n: v: v != null) ( { "ldap_2.servers.contact_${id}.description" = contact.name; "ldap_2.servers.contact_${id}.filename" = "contact_${id}.sqlite"; # this is needed for carddav to work @@ -970,7 +970,7 @@ in # Append the default local folder name "account1". # See https://github.com/nix-community/home-manager/issues/5031. - enabledAccountsIds = (lib.attrsets.mapAttrsToList (name: value: value) accountNameToId) ++ [ + enabledAccountsIds = (lib.attrsets.mapAttrsToList (_name: value: value) accountNameToId) ++ [ "account1" ]; in @@ -989,7 +989,7 @@ in accountsOrderIds = map (a: accountNameToId."${a}" or a) profile.calendarAccountsOrder; - enabledAccountsIds = (lib.attrsets.mapAttrsToList (name: value: value) accountNameToId); + enabledAccountsIds = (lib.attrsets.mapAttrsToList (_name: value: value) accountNameToId); in lib.optionals (calendarAccounts != [ ]) ( accountsOrderIds ++ (lib.lists.subtractLists accountsOrderIds enabledAccountsIds) @@ -1045,7 +1045,7 @@ in } ) ++ (mapAttrsToList ( - name: profile: + name: _profile: let emailAccountsWithFilters = ( filter (a: a.thunderbird.messageFilters != [ ]) ( diff --git a/modules/programs/vdirsyncer/default.nix b/modules/programs/vdirsyncer/default.nix index a15164d99..755f1de62 100644 --- a/modules/programs/vdirsyncer/default.nix +++ b/modules/programs/vdirsyncer/default.nix @@ -300,7 +300,7 @@ in in mapAttrsToList ( - a: v': + a: _v': [ { assertion = (lib.elem a allowed); @@ -327,7 +327,7 @@ in ++ map ( attrs: let - defined = lib.attrNames (filterAttrs (n: v: v != null) (lib.genAttrs attrs (a: v.${a} or null))); + defined = lib.attrNames (filterAttrs (_n: v: v != null) (lib.genAttrs attrs (a: v.${a} or null))); in { assertion = lib.length defined <= 1; diff --git a/modules/programs/vim.nix b/modules/programs/vim.nix index 5f919dfae..b8b2ed09d 100644 --- a/modules/programs/vim.nix +++ b/modules/programs/vim.nix @@ -57,7 +57,7 @@ let options = let opt = - name: type: + _name: type: mkOption { type = types.nullOr type; default = null; diff --git a/modules/programs/vscode/default.nix b/modules/programs/vscode/default.nix index bc3e7f813..863a1e415 100644 --- a/modules/programs/vscode/default.nix +++ b/modules/programs/vscode/default.nix @@ -129,7 +129,7 @@ let name: server: let # Remove the disabled field from the server config - cleanServer = lib.filterAttrs (n: v: n != "disabled") server; + cleanServer = lib.filterAttrs (n: _v: n != "disabled") server; in { inherit name; @@ -478,7 +478,7 @@ in (mkIf ( (lib.filterAttrs ( - n: v: + _n: v: (v ? enableExtensionUpdateCheck || v ? enableUpdateCheck) && (v.enableExtensionUpdateCheck != null || v.enableUpdateCheck != null) ) allProfilesExceptDefault) != { } @@ -501,7 +501,7 @@ in PATH=${lib.makeBinPath [ pkgs.jq ]}''${PATH:+:}$PATH file="${userDir}/globalStorage/storage.json" file_write="" - profiles=(${lib.escapeShellArgs (flatten (mapAttrsToList (n: v: n) allProfilesExceptDefault))}) + profiles=(${lib.escapeShellArgs (flatten (mapAttrsToList (n: _v: n) allProfilesExceptDefault))}) if [ -f "$file" ]; then existing_profiles=$(jq '.userDataProfiles // [] | map({ (.name): .location }) | add // {}' "$file") @@ -635,7 +635,7 @@ in # causes VSCode to create the extensions.json with all the extensions # in the extension directory, which includes extensions from other profiles. lib.mkMerge ( - lib.concatMap toPaths (flatten (mapAttrsToList (n: v: v.extensions) cfg.profiles)) + lib.concatMap toPaths (flatten (mapAttrsToList (_n: v: v.extensions) cfg.profiles)) ++ lib.optional ( @@ -669,7 +669,7 @@ in combinedExtensionsDrv = pkgs.buildEnv { name = "vscode-extensions"; paths = - (flatten (mapAttrsToList (n: v: v.extensions) cfg.profiles)) + (flatten (mapAttrsToList (_n: v: v.extensions) cfg.profiles)) ++ lib.optional ( ( lib.versionAtLeast vscodeVersion "1.74.0" diff --git a/modules/programs/w3m.nix b/modules/programs/w3m.nix index 8536dcbad..8dd83a99f 100644 --- a/modules/programs/w3m.nix +++ b/modules/programs/w3m.nix @@ -350,7 +350,7 @@ in mkIf cfg.enable { assertions = [ { - assertion = (lib.filterAttrs (k: v: !isNull v.text && !isNull v.source) cfg.cgiBin) == { }; + assertion = (lib.filterAttrs (_k: v: !isNull v.text && !isNull v.source) cfg.cgiBin) == { }; message = "Cannot specify both `.text` and `.source` options for `programs.w3m.cgiBin` scripts."; } ]; diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index 5d2b2236a..10f585caf 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -24,7 +24,7 @@ let jsonFormat = pkgs.formats.json { }; mkMargin = - name: + _name: mkOption { type = types.nullOr types.int; default = null; diff --git a/modules/programs/wofi.nix b/modules/programs/wofi.nix index 699445ec6..760be9ba5 100644 --- a/modules/programs/wofi.nix +++ b/modules/programs/wofi.nix @@ -14,7 +14,7 @@ let '' # Generated by Home Manager. '' - + lib.generators.toKeyValue { } (lib.filterAttrs (name: value: value != null) attrs); + + lib.generators.toKeyValue { } (lib.filterAttrs (_name: value: value != null) attrs); in { meta.maintainers = [ lib.maintainers.christoph-heiss ]; diff --git a/modules/services/activitywatch.nix b/modules/services/activitywatch.nix index c1529d3fa..f60a17f79 100644 --- a/modules/services/activitywatch.nix +++ b/modules/services/activitywatch.nix @@ -12,7 +12,7 @@ let cfg = config.services.activitywatch; mkWatcherService = - name: cfg: + _name: cfg: let jobName = "activitywatch-watcher-${cfg.name}"; in @@ -122,7 +122,7 @@ let }; generateWatchersConfig = - name: cfg: + _name: cfg: let # We're only assuming the generated filepath this since most watchers # uses the ActivityWatch client library which has `load_config_toml` diff --git a/modules/services/colima.nix b/modules/services/colima.nix index f21f7227b..63665d9ed 100644 --- a/modules/services/colima.nix +++ b/modules/services/colima.nix @@ -245,7 +245,7 @@ in "${cfg.colimaHomeDir}/${profileName}/colima.yaml" = { source = yamlFormat.generate "colima.yaml" profile.settings; }; - }) (lib.filterAttrs (name: profile: profile.settings != { }) cfg.profiles) + }) (lib.filterAttrs (_name: profile: profile.settings != { }) cfg.profiles) ); sessionVariables = { diff --git a/modules/services/git-sync.nix b/modules/services/git-sync.nix index 7dd99f1d0..579012808 100644 --- a/modules/services/git-sync.nix +++ b/modules/services/git-sync.nix @@ -106,7 +106,7 @@ in config = mkIf cfg.enable { launchd.agents = services ( - name: repo: { + _name: repo: { enable = true; config = { StartInterval = repo.interval; diff --git a/modules/services/macos-remap-keys/keytables.nix b/modules/services/macos-remap-keys/keytables.nix index f035e96ec..738168eea 100644 --- a/modules/services/macos-remap-keys/keytables.nix +++ b/modules/services/macos-remap-keys/keytables.nix @@ -137,7 +137,7 @@ let mapToInt = keyPage: attrs: lib.mapAttrs ( - name: value: + _name: value: let keycode = lib.fromHexString (lib.removePrefix "0x" value); in diff --git a/modules/services/mako.nix b/modules/services/mako.nix index cca30a2ed..c1ef584eb 100644 --- a/modules/services/mako.nix +++ b/modules/services/mako.nix @@ -19,8 +19,8 @@ let let formatValue = v: if builtins.isBool v then if v then "true" else "false" else toString v; - globalSettings = lib.filterAttrs (n: v: !(lib.isAttrs v)) config; - sectionSettings = lib.filterAttrs (n: v: lib.isAttrs v) config; + globalSettings = lib.filterAttrs (_n: v: !(lib.isAttrs v)) config; + sectionSettings = lib.filterAttrs (_n: v: lib.isAttrs v) config; globalLines = lib.concatStringsSep "\n" ( lib.mapAttrsToList (k: v: "${k}=${formatValue v}") globalSettings diff --git a/modules/services/picom.nix b/modules/services/picom.nix index 61e132d59..fcc022174 100644 --- a/modules/services/picom.nix +++ b/modules/services/picom.nix @@ -41,7 +41,7 @@ let description = "pair of ${x.description}"; }; - mkDefaultAttrs = mapAttrs (n: mkDefault); + mkDefaultAttrs = mapAttrs (_n: mkDefault); # Basically a tinkered lib.generators.mkKeyValueDefault # It either serializes a top-level definition "key: { values };" diff --git a/modules/services/podman/default.nix b/modules/services/podman/default.nix index adab38768..ea35f1c30 100644 --- a/modules/services/podman/default.nix +++ b/modules/services/podman/default.nix @@ -107,7 +107,7 @@ in else "${pkgs.skopeo.policy}/default-policy.json"; "containers/registries.conf".source = toml.generate "registries.conf" { - registries = lib.mapAttrs (n: v: { registries = v; }) cfg.settings.registries; + registries = lib.mapAttrs (_n: v: { registries = v; }) cfg.settings.registries; }; "containers/storage.conf".source = toml.generate "storage.conf" cfg.settings.storage; "containers/containers.conf".source = toml.generate "containers.conf" cfg.settings.containers; diff --git a/modules/services/podman/linux/containers.nix b/modules/services/podman/linux/containers.nix index 6aac7805d..34e6ea104 100644 --- a/modules/services/podman/linux/containers.nix +++ b/modules/services/podman/linux/containers.nix @@ -69,7 +69,7 @@ let let quadletName = extractQuadletReference type value; quadletsOfType = lib.filterAttrs ( - n: v: v.quadletData.resourceType == type + _n: v: v.quadletData.resourceType == type ) cfg.internal.builtQuadlets; in if (lib.hasAttr quadletName quadletsOfType) then diff --git a/modules/services/recoll.nix b/modules/services/recoll.nix index 53a9a7901..1b7d38e0e 100644 --- a/modules/services/recoll.nix +++ b/modules/services/recoll.nix @@ -64,8 +64,8 @@ let # There's a possibility of attributes with attrsets overriding other # top-level attributes with non-attrsets so we're forcing the attrsets to # come last. - _config = lib.mapAttrsToList convert (lib.filterAttrs (k: v: !isAttrs v) attr); - _config' = lib.mapAttrsToList convert (lib.filterAttrs (k: isAttrs) attr); + _config = lib.mapAttrsToList convert (lib.filterAttrs (_k: v: !isAttrs v) attr); + _config' = lib.mapAttrsToList convert (lib.filterAttrs (_k: isAttrs) attr); config = _config ++ _config'; in lib.concatStringsSep "\n" config; diff --git a/modules/services/restic.nix b/modules/services/restic.nix index 16aeca01f..7a3e1671f 100644 --- a/modules/services/restic.nix +++ b/modules/services/restic.nix @@ -417,12 +417,12 @@ in }) cfg.backups; mustSetRepository = assertBackup { - assertion = n: v: lib.xor (v.repository == null) (v.repositoryFile == null); + assertion = _n: v: lib.xor (v.repository == null) (v.repositoryFile == null); message = "exactly one of repository or repositoryFile should be set"; }; mustSetPassword = assertBackup { - assertion = n: v: lib.xor (v.passwordCommand == null) (v.passwordFile == null); + assertion = _n: v: lib.xor (v.passwordCommand == null) (v.passwordFile == null); message = "exactly one of passwordCommand or passwordFile should be set"; }; in diff --git a/modules/services/swayidle.nix b/modules/services/swayidle.nix index 381300e36..79da15c80 100644 --- a/modules/services/swayidle.nix +++ b/modules/services/swayidle.nix @@ -184,7 +184,7 @@ in command ]; - nonemptyEvents = lib.filterAttrs (event: command: command != null) cfg.events; + nonemptyEvents = lib.filterAttrs (_event: command: command != null) cfg.events; args = cfg.extraArgs diff --git a/modules/services/unison.nix b/modules/services/unison.nix index 3b81a36fa..8c3560f0e 100644 --- a/modules/services/unison.nix +++ b/modules/services/unison.nix @@ -144,7 +144,7 @@ in ); systemd.user.timers = makeDefs ( - name: pairCfg: { + name: _pairCfg: { Unit.Description = "Unison pair sync auto-restart (${name})"; Install.WantedBy = [ "timers.target" ]; Timer = { diff --git a/modules/services/way-displays.nix b/modules/services/way-displays.nix index 9e759b951..265730c56 100644 --- a/modules/services/way-displays.nix +++ b/modules/services/way-displays.nix @@ -88,7 +88,7 @@ in home.packages = [ cfg.package ]; - wayland.windowManager = lib.mapAttrs (name: _: { + wayland.windowManager = lib.mapAttrs (_name: _: { systemd.variables = lib.mkOptionDefault [ "XDG_VTNR" ]; }) options.wayland.windowManager; diff --git a/modules/services/window-managers/bspwm/default.nix b/modules/services/window-managers/bspwm/default.nix index 6c5f64f65..7640edd74 100644 --- a/modules/services/window-managers/bspwm/default.nix +++ b/modules/services/window-managers/bspwm/default.nix @@ -59,7 +59,7 @@ let formatDirective = n: v: "${camelToSnake n}=${formatValue v}"; directivesStr = escapeShellArgs ( - mapAttrsToList formatDirective (lib.filterAttrs (n: v: v != null) directives) + mapAttrsToList formatDirective (lib.filterAttrs (_n: v: v != null) directives) ); in "bspc rule -a ${escapeShellArg target} ${directivesStr}"; diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index 88eb16ce1..9de09a07d 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -367,12 +367,12 @@ in # attrset of { = ; } for all submaps submapWarningsAttrset = builtins.mapAttrs ( - name: submap: filterNonBinds submap.settings + _name: submap: filterNonBinds submap.settings ) cfg.submaps; submapWarnings = lib.mapAttrsToList (submapName: nonBinds: '' wayland.windowManager.hyprland.submaps."${submapName}".settings: found non-bind entries: [${toString nonBinds}], which will have no effect in a submap - '') (lib.filterAttrs (n: v: v != [ ]) submapWarningsAttrset); + '') (lib.filterAttrs (_n: v: v != [ ]) submapWarningsAttrset); in submapWarnings ++ lib.optional inconsistent warning; @@ -388,7 +388,7 @@ in importantPrefixes = cfg.importantPrefixes ++ lib.optional cfg.sourceFirst "source"; pluginsToHyprconf = - plugins: + _plugins: lib.hm.generators.toHyprconf { attrs = { "exec-once" = diff --git a/modules/services/window-managers/i3-sway/i3.nix b/modules/services/window-managers/i3-sway/i3.nix index 7fba897a7..fa270f22f 100644 --- a/modules/services/window-managers/i3-sway/i3.nix +++ b/modules/services/window-managers/i3-sway/i3.nix @@ -43,7 +43,7 @@ let keybindings = mkOption { type = types.attrsOf (types.nullOr types.str); - default = lib.mapAttrs (n: lib.mkOptionDefault) { + default = lib.mapAttrs (_n: lib.mkOptionDefault) { "${cfg.config.modifier}+Return" = "exec ${cfg.config.terminal}"; "${cfg.config.modifier}+Shift+q" = "kill"; "${cfg.config.modifier}+d" = "exec ${cfg.config.menu}"; diff --git a/modules/services/window-managers/i3-sway/lib/functions.nix b/modules/services/window-managers/i3-sway/lib/functions.nix index 14880c4c8..2b58cd863 100644 --- a/modules/services/window-managers/i3-sway/lib/functions.nix +++ b/modules/services/window-managers/i3-sway/lib/functions.nix @@ -16,11 +16,11 @@ rec { "[${concatStringsSep " " (mapAttrsToList toCriteria criteria)}]"; keybindingDefaultWorkspace = lib.filterAttrs ( - n: v: cfg.config.defaultWorkspace != null && v == cfg.config.defaultWorkspace + _n: v: cfg.config.defaultWorkspace != null && v == cfg.config.defaultWorkspace ) cfg.config.keybindings; keybindingsRest = lib.filterAttrs ( - n: v: cfg.config.defaultWorkspace == null || v != cfg.config.defaultWorkspace + _n: v: cfg.config.defaultWorkspace == null || v != cfg.config.defaultWorkspace ) cfg.config.keybindings; keybindingsStr = @@ -120,7 +120,7 @@ rec { ... }: let - colorsNotNull = lib.filterAttrs (n: v: v != null) colors != { }; + colorsNotNull = lib.filterAttrs (_n: v: v != null) colors != { }; in lib.concatMapStrings (x: x + "\n") ( indent (lib.lists.subtractLists [ "" null ] ( @@ -221,7 +221,7 @@ rec { level ? 1, }: let - prefix = concatStringsSep "" (lib.genList (x: " ") (level * 2)); + prefix = concatStringsSep "" (lib.genList (_x: " ") (level * 2)); in (lib.imap1 ( diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix index c20ff4113..c3b1821d9 100644 --- a/modules/services/window-managers/i3-sway/sway.nix +++ b/modules/services/window-managers/i3-sway/sway.nix @@ -77,7 +77,7 @@ let keybindings = mkOption { type = types.attrsOf (types.nullOr types.str); - default = lib.mapAttrs (n: lib.mkOptionDefault) { + default = lib.mapAttrs (_n: lib.mkOptionDefault) { "${cfg.config.modifier}+Return" = "exec ${cfg.config.terminal}"; "${cfg.config.modifier}+Shift+q" = "kill"; "${cfg.config.modifier}+d" = "exec ${cfg.config.menu}"; @@ -478,9 +478,9 @@ let (keycodebindingsStr keycodebindings) ] ++ optional (builtins.attrNames bindswitches != [ ]) (bindswitchesStr bindswitches) - ++ mapAttrsToList inputStr (filterAttrs (n: v: n == "*") input) - ++ mapAttrsToList inputStr (filterAttrs (n: v: hasPrefix "type:" n) input) - ++ mapAttrsToList inputStr (filterAttrs (n: v: n != "*" && !(hasPrefix "type:" n)) input) + ++ mapAttrsToList inputStr (filterAttrs (n: _v: n == "*") input) + ++ mapAttrsToList inputStr (filterAttrs (n: _v: hasPrefix "type:" n) input) + ++ mapAttrsToList inputStr (filterAttrs (n: _v: n != "*" && !(hasPrefix "type:" n)) input) ++ mapAttrsToList outputStr output # outputs ++ mapAttrsToList seatStr seat # seats ++ mapAttrsToList (modeStr cfg.config.bindkeysToCode) modes # modes diff --git a/modules/services/window-managers/xmonad.nix b/modules/services/window-managers/xmonad.nix index dfe9d57b9..c3de5be72 100644 --- a/modules/services/window-managers/xmonad.nix +++ b/modules/services/window-managers/xmonad.nix @@ -48,7 +48,7 @@ in }; extraPackages = mkOption { - default = self: [ ]; + default = _self: [ ]; defaultText = "self: []"; example = literalExpression '' haskellPackages: [ diff --git a/modules/systemd.nix b/modules/systemd.nix index af4071c7d..76a5b94d8 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -51,7 +51,7 @@ let let # Filters out fields that are set to `null` or empty list. shouldKeepField = - section: key: value: + _section: _key: value: value != null && value != [ ]; # Filters out empty sections. diff --git a/modules/targets/darwin/user-defaults/default.nix b/modules/targets/darwin/user-defaults/default.nix index 153f0d164..b4493ae28 100644 --- a/modules/targets/darwin/user-defaults/default.nix +++ b/modules/targets/darwin/user-defaults/default.nix @@ -20,9 +20,11 @@ let domain: attrs: "run /usr/bin/defaults ${cliFlags} import ${lib.escapeShellArg domain} ${toDefaultsFile domain attrs}"; - nonNullDefaults = lib.mapAttrs (domain: attrs: (lib.filterAttrs (n: v: v != null) attrs)) settings; + nonNullDefaults = lib.mapAttrs ( + _domain: attrs: (lib.filterAttrs (_n: v: v != null) attrs) + ) settings; - writableDefaults = lib.filterAttrs (domain: attrs: attrs != { }) nonNullDefaults; + writableDefaults = lib.filterAttrs (_domain: attrs: attrs != { }) nonNullDefaults; in lib.mapAttrsToList toActivationCmd writableDefaults; diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 49415ef7a..cd3ceae71 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -18,7 +18,7 @@ in (lib.mkIf (cfg.users != { }) { system.activationScripts.postActivation.text = lib.concatStringsSep "\n" ( lib.mapAttrsToList ( - username: usercfg: + _username: usercfg: let driverVersion = if cfg.enableLegacyProfileManagement then "0" else "1"; in diff --git a/overlay.nix b/overlay.nix index 78fcb60ce..f974bf05d 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,3 +1,3 @@ -final: prev: { +_final: prev: { home-manager = prev.callPackage ./home-manager { path = toString ./.; }; } diff --git a/tests/darwinScrublist.nix b/tests/darwinScrublist.nix index e6ae62ffc..cdaae84f8 100644 --- a/tests/darwinScrublist.nix +++ b/tests/darwinScrublist.nix @@ -201,7 +201,7 @@ let # Create an overlay that scrubs packages in the scrublist packageScrubOverlay = - self: super: + _self: super: lib.mapAttrs ( name: value: if lib.elem name packagesToScrub then diff --git a/tests/default.nix b/tests/default.nix index 162d07b80..2ae6d7d76 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -47,7 +47,7 @@ let # Globally unscrub a few selected packages that are used by a wide selection of tests. whitelist = let - inner = self: super: { + inner = _self: _super: { inherit (pkgs) coreutils crudini @@ -84,12 +84,12 @@ let # TODO: fix darwin stdenv stubbing if isDarwin then let - rawPkgs = lib.makeExtensible (final: pkgs); + rawPkgs = lib.makeExtensible (_final: pkgs); in builtins.traceVerbose "eval scrubbed darwin nixpkgs" (rawPkgs.extend darwinScrublist) else let - rawScrubbedPkgs = lib.makeExtensible (final: scrubDerivations pkgs); + rawScrubbedPkgs = lib.makeExtensible (_final: scrubDerivations pkgs); in builtins.traceVerbose "eval scrubbed nixpkgs" (rawScrubbedPkgs.extend whitelist); diff --git a/tests/integration/standalone/restic.nix b/tests/integration/standalone/restic.nix index bd4f2655e..aa912fb01 100644 --- a/tests/integration/standalone/restic.nix +++ b/tests/integration/standalone/restic.nix @@ -12,7 +12,7 @@ let ''; dynDir = testDir.overrideAttrs ( - final: prev: { + _final: prev: { buildCommand = prev.buildCommand + '' echo more secret data > $out/top-secret echo shhhh > $out/top-secret-v2 diff --git a/tests/lib/types/state-version-option-default-deferred.nix b/tests/lib/types/state-version-option-default-deferred.nix index 009c3676e..3bf8de51f 100644 --- a/tests/lib/types/state-version-option-default-deferred.nix +++ b/tests/lib/types/state-version-option-default-deferred.nix @@ -67,7 +67,7 @@ let in { options.test.values = lib.mapAttrs ( - name: case: + _name: case: lib.mkOption { type = attrSetOfString; default = { }; @@ -114,12 +114,12 @@ in }; asserts.warnings.expected = lib.flatten ( - lib.mapAttrsToList (name: case: lib.optional case.expectedWarn case.default.warning) cases + lib.mapAttrsToList (_name: case: lib.optional case.expectedWarn case.default.warning) cases ); }; warnings = lib.flatten ( - lib.mapAttrsToList (name: case: lib.optional case.default.shouldWarn case.default.warning) cases + lib.mapAttrsToList (_name: case: lib.optional case.default.shouldWarn case.default.warning) cases ); home.file."result.txt".text = '' diff --git a/tests/modules/accounts/email-test-accounts.nix b/tests/modules/accounts/email-test-accounts.nix index ae37e7f2f..0679bae95 100644 --- a/tests/modules/accounts/email-test-accounts.nix +++ b/tests/modules/accounts/email-test-accounts.nix @@ -37,7 +37,7 @@ accountAttrOptions = options.accounts.email.accounts.type.nestedTypes.elemType.getSubOptions [ ]; throwOnAttrAccess = - baseName: builtins.mapAttrs (n: v: throw "Unexpected access of ${baseName}.${n}"); + baseName: builtins.mapAttrs (n: _v: throw "Unexpected access of ${baseName}.${n}"); # Don't want to do anything with these account attributes. ignoredAttrNames = [ diff --git a/tests/modules/home-environment/nixpkgs-release-check-pkgs.nix b/tests/modules/home-environment/nixpkgs-release-check-pkgs.nix index d0ad01c51..e979a8a69 100644 --- a/tests/modules/home-environment/nixpkgs-release-check-pkgs.nix +++ b/tests/modules/home-environment/nixpkgs-release-check-pkgs.nix @@ -26,9 +26,9 @@ in ]; nixpkgs.overlays = [ - (final: prev: { + (_final: prev: { lib = prev.lib.extend ( - final: prev: { + _final: prev: { trivial = prev.trivial // { release = pkgsRelease; }; diff --git a/tests/modules/misc/fontconfig/multiple-font-packages.nix b/tests/modules/misc/fontconfig/multiple-font-packages.nix index e88812d56..0548b2b20 100644 --- a/tests/modules/misc/fontconfig/multiple-font-packages.nix +++ b/tests/modules/misc/fontconfig/multiple-font-packages.nix @@ -5,7 +5,7 @@ # Use `realPkgs` here since the creation of the fontconfig cache relies on the # `fc-cache` binary and actual (non-stubbed) fonts. - test.unstubs = [ (self: super: { inherit (realPkgs) fontconfig; }) ]; + test.unstubs = [ (_self: _super: { inherit (realPkgs) fontconfig; }) ]; home.packages = [ realPkgs.comic-relief realPkgs.unifont diff --git a/tests/modules/misc/fontconfig/single-font-package.nix b/tests/modules/misc/fontconfig/single-font-package.nix index 39f4fe08b..51225f9da 100644 --- a/tests/modules/misc/fontconfig/single-font-package.nix +++ b/tests/modules/misc/fontconfig/single-font-package.nix @@ -5,7 +5,7 @@ # Use `realPkgs` here since the creation of the fontconfig cache relies on the # `fc-cache` binary and actual (non-stubbed) fonts. - test.unstubs = [ (self: super: { inherit (realPkgs) fontconfig; }) ]; + test.unstubs = [ (_self: _super: { inherit (realPkgs) fontconfig; }) ]; home.packages = [ realPkgs.comic-relief ]; nmt.script = '' diff --git a/tests/modules/misc/qt/qt-platform-theme-gtk.nix b/tests/modules/misc/qt/qt-platform-theme-gtk.nix index 8e19f47f6..f0794fad7 100644 --- a/tests/modules/misc/qt/qt-platform-theme-gtk.nix +++ b/tests/modules/misc/qt/qt-platform-theme-gtk.nix @@ -12,15 +12,15 @@ }; nixpkgs.overlays = [ - (final: prev: { + (_final: prev: { libsForQt5 = prev.libsForQt5.overrideScope ( - qt5final: qt5prev: { + _qt5final: _qt5prev: { qtstyleplugins = config.lib.test.mkStubPackage { outPath = null; }; } ); qt6Packages = prev.qt6Packages.overrideScope ( - qt6final: qt6prev: { + _qt6final: _qt6prev: { qt6gtk2 = config.lib.test.mkStubPackage { outPath = null; }; } ); diff --git a/tests/modules/misc/xdg/portal.nix b/tests/modules/misc/xdg/portal.nix index 745f17b2c..c8bb5d06c 100644 --- a/tests/modules/misc/xdg/portal.nix +++ b/tests/modules/misc/xdg/portal.nix @@ -21,7 +21,7 @@ lib.mkIf config.test.enableBig { }; }; - test.unstubs = [ (self: super: { inherit (realPkgs) xdg-desktop-portal; }) ]; + test.unstubs = [ (_self: _super: { inherit (realPkgs) xdg-desktop-portal; }) ]; nmt.script = '' assertFileExists home-path/share/systemd/user/xdg-desktop-portal.service diff --git a/tests/modules/programs/aerospace/aerospace-no-xdg.nix b/tests/modules/programs/aerospace/aerospace-no-xdg.nix index 84ce54b27..56eb31d72 100644 --- a/tests/modules/programs/aerospace/aerospace-no-xdg.nix +++ b/tests/modules/programs/aerospace/aerospace-no-xdg.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let hmPkgs = pkgs.extend ( - self: super: { + _self: _super: { aerospace = config.lib.test.mkStubPackage { name = "aerospace"; buildScript = '' diff --git a/tests/modules/programs/aerospace/aerospace-settings-no-xdg.nix b/tests/modules/programs/aerospace/aerospace-settings-no-xdg.nix index a18c57c80..e6c938ed4 100644 --- a/tests/modules/programs/aerospace/aerospace-settings-no-xdg.nix +++ b/tests/modules/programs/aerospace/aerospace-settings-no-xdg.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let hmPkgs = pkgs.extend ( - self: super: { + _self: _super: { aerospace = config.lib.test.mkStubPackage { name = "aerospace"; buildScript = '' diff --git a/tests/modules/programs/aerospace/aerospace-settings.nix b/tests/modules/programs/aerospace/aerospace-settings.nix index 29d441ef5..5215057ac 100644 --- a/tests/modules/programs/aerospace/aerospace-settings.nix +++ b/tests/modules/programs/aerospace/aerospace-settings.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let hmPkgs = pkgs.extend ( - self: super: { + _self: _super: { aerospace = config.lib.test.mkStubPackage { name = "aerospace"; buildScript = '' diff --git a/tests/modules/programs/aerospace/aerospace.nix b/tests/modules/programs/aerospace/aerospace.nix index f2429786d..3215fa8f4 100644 --- a/tests/modules/programs/aerospace/aerospace.nix +++ b/tests/modules/programs/aerospace/aerospace.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let hmPkgs = pkgs.extend ( - self: super: { + _self: _super: { aerospace = config.lib.test.mkStubPackage { name = "aerospace"; buildScript = '' diff --git a/tests/modules/programs/browserpass/browserpass.nix b/tests/modules/programs/browserpass/browserpass.nix index 653741b17..77d9b0a00 100644 --- a/tests/modules/programs/browserpass/browserpass.nix +++ b/tests/modules/programs/browserpass/browserpass.nix @@ -13,7 +13,7 @@ ]; }; - nixpkgs.overlays = [ (self: super: { inherit (realPkgs) browserpass; }) ]; + nixpkgs.overlays = [ (_self: _super: { inherit (realPkgs) browserpass; }) ]; nmt.script = if realPkgs.stdenv.hostPlatform.isDarwin then diff --git a/tests/modules/programs/carapace/fish.nix b/tests/modules/programs/carapace/fish.nix index 1e01739bc..b04283dcd 100644 --- a/tests/modules/programs/carapace/fish.nix +++ b/tests/modules/programs/carapace/fish.nix @@ -11,7 +11,7 @@ lib.mkIf config.test.enableBig { fish.enable = true; }; - nixpkgs.overlays = [ (self: super: { inherit (realPkgs) carapace; }) ]; + nixpkgs.overlays = [ (_self: _super: { inherit (realPkgs) carapace; }) ]; nmt.script = let diff --git a/tests/modules/programs/firefox/common.nix b/tests/modules/programs/firefox/common.nix index fbd3637d4..bcf9dc9e3 100644 --- a/tests/modules/programs/firefox/common.nix +++ b/tests/modules/programs/firefox/common.nix @@ -1,7 +1,7 @@ name: builtins.mapAttrs ( - test: module: + _test: module: import module [ "programs" name diff --git a/tests/modules/programs/gnome-shell/gnome-shell.nix b/tests/modules/programs/gnome-shell/gnome-shell.nix index 42a1118df..d305480c0 100644 --- a/tests/modules/programs/gnome-shell/gnome-shell.nix +++ b/tests/modules/programs/gnome-shell/gnome-shell.nix @@ -43,7 +43,7 @@ let in { nixpkgs.overlays = [ - (final: prev: { gnome-shell-extensions = dummy-gnome-shell-extensions; }) + (_final: _prev: { gnome-shell-extensions = dummy-gnome-shell-extensions; }) ]; programs.gnome-shell.enable = true; diff --git a/tests/modules/programs/kitty/theme-to-themeFile.nix b/tests/modules/programs/kitty/theme-to-themeFile.nix index 849be1e2e..9138c973d 100644 --- a/tests/modules/programs/kitty/theme-to-themeFile.nix +++ b/tests/modules/programs/kitty/theme-to-themeFile.nix @@ -21,7 +21,7 @@ lib.mkIf config.test.enableLegacyIfd { ) ]; - nixpkgs.overlays = [ (self: super: { inherit (realPkgs) kitty-themes; }) ]; + nixpkgs.overlays = [ (_self: _super: { inherit (realPkgs) kitty-themes; }) ]; nmt.script = '' assertFileExists home-files/.config/kitty/kitty.conf diff --git a/tests/modules/programs/kubecolor/does-have-openshift.nix b/tests/modules/programs/kubecolor/does-have-openshift.nix index 88070f71c..02f59368e 100644 --- a/tests/modules/programs/kubecolor/does-have-openshift.nix +++ b/tests/modules/programs/kubecolor/does-have-openshift.nix @@ -17,7 +17,7 @@ }; }; nixpkgs.overlays = [ - (self: super: { + (_self: _super: { openshift = config.lib.test.mkStubPackage { name = "openshift"; version = "4.16.0"; diff --git a/tests/modules/programs/sketchybar/sketchybar-service-integration.nix b/tests/modules/programs/sketchybar/sketchybar-service-integration.nix index 9c7bfb123..7a0c76767 100644 --- a/tests/modules/programs/sketchybar/sketchybar-service-integration.nix +++ b/tests/modules/programs/sketchybar/sketchybar-service-integration.nix @@ -6,7 +6,7 @@ let hmPkgs = pkgs.extend ( - self: super: { + _self: _super: { sketchybar = config.lib.test.mkStubPackage { name = "sketchybar"; buildScript = '' diff --git a/tests/modules/programs/texlive/texlive-minimal.nix b/tests/modules/programs/texlive/texlive-minimal.nix index bf913249c..a33d57401 100644 --- a/tests/modules/programs/texlive/texlive-minimal.nix +++ b/tests/modules/programs/texlive/texlive-minimal.nix @@ -5,7 +5,7 @@ # Set up a minimal mocked texlive package set. nixpkgs.overlays = [ - (self: super: { + (_self: _super: { texlive = { collection-basic = pkgs.writeTextDir "collection-basic" ""; combine = diff --git a/tests/modules/programs/tmux/disable-confirmation-prompt.nix b/tests/modules/programs/tmux/disable-confirmation-prompt.nix index 8860fb76c..2d2dd7fcc 100644 --- a/tests/modules/programs/tmux/disable-confirmation-prompt.nix +++ b/tests/modules/programs/tmux/disable-confirmation-prompt.nix @@ -6,7 +6,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { tmuxPlugins = super.tmuxPlugins // { sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; diff --git a/tests/modules/programs/tmux/emacs-with-plugins.nix b/tests/modules/programs/tmux/emacs-with-plugins.nix index f8847b879..9b9fa3ed6 100644 --- a/tests/modules/programs/tmux/emacs-with-plugins.nix +++ b/tests/modules/programs/tmux/emacs-with-plugins.nix @@ -17,7 +17,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { tmuxPlugins = super.tmuxPlugins // { fzf-tmux-url = super.tmuxPlugins.fzf-tmux-url // { rtp = "@tmuxplugin_fzf_tmux_url_rtp@"; diff --git a/tests/modules/programs/tmux/mouse-enabled.nix b/tests/modules/programs/tmux/mouse-enabled.nix index 49fda0729..97f8ca2cc 100644 --- a/tests/modules/programs/tmux/mouse-enabled.nix +++ b/tests/modules/programs/tmux/mouse-enabled.nix @@ -6,7 +6,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { tmuxPlugins = super.tmuxPlugins // { sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; diff --git a/tests/modules/programs/tmux/prefix.nix b/tests/modules/programs/tmux/prefix.nix index e2336a858..f71fa2266 100644 --- a/tests/modules/programs/tmux/prefix.nix +++ b/tests/modules/programs/tmux/prefix.nix @@ -6,7 +6,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { tmuxPlugins = super.tmuxPlugins // { sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; diff --git a/tests/modules/programs/tmux/shortcut-without-prefix.nix b/tests/modules/programs/tmux/shortcut-without-prefix.nix index d9a2bf493..17f609ab6 100644 --- a/tests/modules/programs/tmux/shortcut-without-prefix.nix +++ b/tests/modules/programs/tmux/shortcut-without-prefix.nix @@ -7,7 +7,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { tmuxPlugins = super.tmuxPlugins // { sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; diff --git a/tests/modules/programs/tmux/vi-all-true.nix b/tests/modules/programs/tmux/vi-all-true.nix index e8d2d187f..baf676da0 100644 --- a/tests/modules/programs/tmux/vi-all-true.nix +++ b/tests/modules/programs/tmux/vi-all-true.nix @@ -10,7 +10,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { tmuxPlugins = super.tmuxPlugins // { sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; diff --git a/tests/modules/services/colima/darwin/colima-default-config.nix b/tests/modules/services/colima/darwin/colima-default-config.nix index 77eb02d79..df445f7ea 100644 --- a/tests/modules/services/colima/darwin/colima-default-config.nix +++ b/tests/modules/services/colima/darwin/colima-default-config.nix @@ -7,7 +7,7 @@ { nixpkgs.overlays = [ - (self: super: { + (_self: super: { darwin = super.darwin // { DarwinTools = config.lib.test.mkStubPackage { name = "DarwinTools"; diff --git a/tests/modules/services/colima/darwin/colima-docker-cli.nix b/tests/modules/services/colima/darwin/colima-docker-cli.nix index a7775d95a..1a45abc7f 100644 --- a/tests/modules/services/colima/darwin/colima-docker-cli.nix +++ b/tests/modules/services/colima/darwin/colima-docker-cli.nix @@ -7,7 +7,7 @@ { nixpkgs.overlays = [ - (self: super: { + (_self: super: { darwin = super.darwin // { DarwinTools = config.lib.test.mkStubPackage { name = "DarwinTools"; diff --git a/tests/modules/services/emacs/darwin/basic.nix b/tests/modules/services/emacs/darwin/basic.nix index 97ac5db74..46f36a57c 100644 --- a/tests/modules/services/emacs/darwin/basic.nix +++ b/tests/modules/services/emacs/darwin/basic.nix @@ -2,7 +2,7 @@ { nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-28.0.5" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/emacs/linux/emacs-default-editor.nix b/tests/modules/services/emacs/linux/emacs-default-editor.nix index 04490cd56..8fbea8623 100644 --- a/tests/modules/services/emacs/linux/emacs-default-editor.nix +++ b/tests/modules/services/emacs/linux/emacs-default-editor.nix @@ -2,7 +2,7 @@ { nixpkgs.overlays = [ - (self: super: { + (_self: _super: { # Use `cat` instead of `echo` to prevent arguments from being # interpreted as an option. emacs = pkgs.writeShellScriptBin "emacsclient" ''${pkgs.coreutils}/bin/cat <<< "$*"''; diff --git a/tests/modules/services/emacs/linux/emacs-service-27.nix b/tests/modules/services/emacs/linux/emacs-service-27.nix index f28301a95..5eb32793d 100644 --- a/tests/modules/services/emacs/linux/emacs-service-27.nix +++ b/tests/modules/services/emacs/linux/emacs-service-27.nix @@ -2,7 +2,7 @@ { nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-27.2" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/emacs/linux/emacs-service-28-after-graphical-session-target.nix b/tests/modules/services/emacs/linux/emacs-service-28-after-graphical-session-target.nix index f5b3a6eda..092a29cff 100644 --- a/tests/modules/services/emacs/linux/emacs-service-28-after-graphical-session-target.nix +++ b/tests/modules/services/emacs/linux/emacs-service-28-after-graphical-session-target.nix @@ -2,7 +2,7 @@ { nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-28.2" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/emacs/linux/emacs-service-28.nix b/tests/modules/services/emacs/linux/emacs-service-28.nix index d41d5d91e..a9b548db0 100644 --- a/tests/modules/services/emacs/linux/emacs-service-28.nix +++ b/tests/modules/services/emacs/linux/emacs-service-28.nix @@ -3,7 +3,7 @@ { config = { nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-28.0.5" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/emacs/linux/emacs-socket-27.nix b/tests/modules/services/emacs/linux/emacs-socket-27.nix index a99e78bb7..358f6b564 100644 --- a/tests/modules/services/emacs/linux/emacs-socket-27.nix +++ b/tests/modules/services/emacs/linux/emacs-socket-27.nix @@ -3,7 +3,7 @@ { config = { nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-27.2" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/emacs/linux/emacs-socket-28.nix b/tests/modules/services/emacs/linux/emacs-socket-28.nix index 1c94971f1..1c74c0720 100644 --- a/tests/modules/services/emacs/linux/emacs-socket-28.nix +++ b/tests/modules/services/emacs/linux/emacs-socket-28.nix @@ -3,7 +3,7 @@ { config = { nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-28.0.5" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/emacs/linux/emacs-socket-and-startWithUserSession.nix b/tests/modules/services/emacs/linux/emacs-socket-and-startWithUserSession.nix index 48b42b34c..dbcd5d16d 100644 --- a/tests/modules/services/emacs/linux/emacs-socket-and-startWithUserSession.nix +++ b/tests/modules/services/emacs/linux/emacs-socket-and-startWithUserSession.nix @@ -8,7 +8,7 @@ }; nixpkgs.overlays = [ - (self: super: rec { + (_self: super: rec { emacs = pkgs.writeShellScriptBin "dummy-emacs-28.0.5" "" // { outPath = "@emacs@"; }; diff --git a/tests/modules/services/fusuma/fusuma-stubs.nix b/tests/modules/services/fusuma/fusuma-stubs.nix index b46a14a16..a161afaac 100644 --- a/tests/modules/services/fusuma/fusuma-stubs.nix +++ b/tests/modules/services/fusuma/fusuma-stubs.nix @@ -5,7 +5,7 @@ (_: super: { inherit (realPkgs) remarshal; python3Packages = super.python3Packages.overrideScope ( - self: super: { inherit (realPkgs.python3Packages) pyyaml; } + _self: _super: { inherit (realPkgs.python3Packages) pyyaml; } ); }) ]; diff --git a/tests/modules/services/i3/i3-followmouse.nix b/tests/modules/services/i3/i3-followmouse.nix index 021bc4784..176714469 100644 --- a/tests/modules/services/i3/i3-followmouse.nix +++ b/tests/modules/services/i3/i3-followmouse.nix @@ -6,7 +6,7 @@ }; nixpkgs.overlays = [ - (self: super: { + (_self: super: { dmenu = super.dmenu // { outPath = "@dmenu@"; }; diff --git a/tests/modules/services/podman/linux/podman-stubs.nix b/tests/modules/services/podman/linux/podman-stubs.nix index 70f3bfbc6..416affe70 100644 --- a/tests/modules/services/podman/linux/podman-stubs.nix +++ b/tests/modules/services/podman/linux/podman-stubs.nix @@ -1,5 +1,5 @@ { realPkgs, ... }: { - nixpkgs.overlays = [ (self: super: { inherit (realPkgs) podman skopeo; }) ]; + nixpkgs.overlays = [ (_self: _super: { inherit (realPkgs) podman skopeo; }) ]; } diff --git a/tests/modules/services/sway/sway-check-config.nix b/tests/modules/services/sway/sway-check-config.nix index 71611ec89..88b44390e 100644 --- a/tests/modules/services/sway/sway-check-config.nix +++ b/tests/modules/services/sway/sway-check-config.nix @@ -11,7 +11,7 @@ lib.mkIf config.test.enableBig { checkConfig = true; }; - nixpkgs.overlays = [ (self: super: { inherit (realPkgs) xvfb-run; }) ]; + nixpkgs.overlays = [ (_self: _super: { inherit (realPkgs) xvfb-run; }) ]; nmt.script = '' assertFileExists home-files/.config/sway/config diff --git a/tests/modules/services/syncthing/extra-options.nix b/tests/modules/services/syncthing/extra-options.nix index 5732b5776..8f80b6aa4 100644 --- a/tests/modules/services/syncthing/extra-options.nix +++ b/tests/modules/services/syncthing/extra-options.nix @@ -3,7 +3,7 @@ lib.mkMerge [ { test.stubs.writers = { - extraAttrs.writeBash = (name: fn: "@syncthing-wrapper@"); + extraAttrs.writeBash = (_name: _fn: "@syncthing-wrapper@"); }; services.syncthing = { diff --git a/tests/modules/targets-linux/generic-linux-gpu/nvidia-enabled.nix b/tests/modules/targets-linux/generic-linux-gpu/nvidia-enabled.nix index 138bad310..c497675dc 100644 --- a/tests/modules/targets-linux/generic-linux-gpu/nvidia-enabled.nix +++ b/tests/modules/targets-linux/generic-linux-gpu/nvidia-enabled.nix @@ -19,7 +19,7 @@ let customPkgs = pkgs // { linuxPackages = pkgs.linuxPackages // { nvidiaPackages = pkgs.linuxPackages.nvidiaPackages // { - mkDriver = args: lib.makeOverridable (_: mockNvidiaDriver) { }; + mkDriver = _args: lib.makeOverridable (_: mockNvidiaDriver) { }; }; }; }; diff --git a/tests/stubs.nix b/tests/stubs.nix index 00c26644e..24158c2c3 100644 --- a/tests/stubs.nix +++ b/tests/stubs.nix @@ -109,7 +109,7 @@ in test.stubOverlays = lib.optional (config.test.stubs != { }) ( - self: super: + _self: super: lib.mapAttrs ( n: v: builtins.traceVerbose "${n} - stubbed" ( diff --git a/treefmt.toml b/treefmt.toml index fa52bbbb6..d9f697098 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -11,7 +11,7 @@ includes = [ "*.nix" ] [formatter.deadnix] command = "deadnix" -options = [ "--edit", "--no-lambda-arg", "--no-lambda-pattern-names" ] +options = [ "--edit", "--no-lambda-pattern-names" ] includes = [ "*.nix" ] [formatter.nixf-diagnose]