treewide: remove redundant 'builtins'

I keep forgetting `map` and `removeAttrs` are included at the top-level
in the prelude.
This commit is contained in:
Bruno BELANYI 2026-01-26 17:52:23 +00:00
parent 7231c7ced7
commit 34c4f044a2
6 changed files with 8 additions and 8 deletions

View file

@ -11,7 +11,7 @@ let
lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ]; lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ];
address = mkMailAddress address domain; address = mkMailAddress address domain;
aliases = builtins.map (lib.flip mkMailAddress domain) aliases; aliases = map (lib.flip mkMailAddress domain) aliases;
inherit primary; inherit primary;

View file

@ -69,7 +69,7 @@ in
inactive_state = "Idle"; inactive_state = "Idle";
}; };
in in
builtins.map (block: defaults // block) cfg.vpn.blockConfigs map (block: defaults // block) cfg.vpn.blockConfigs
) )
) )
{ {

View file

@ -23,7 +23,7 @@ in
enable = true; enable = true;
}; };
environment.systemPackages = builtins.map lib.hiPrio [ environment.systemPackages = map lib.hiPrio [
# Respect XDG conventions, leave my HOME alone # Respect XDG conventions, leave my HOME alone
(pkgs.writeShellScriptBin "steam" '' (pkgs.writeShellScriptBin "steam" ''
mkdir -p "${cfg.dataDir}" mkdir -p "${cfg.dataDir}"

View file

@ -96,7 +96,7 @@ in
# Contains the UID/GID map, and other useful state # Contains the UID/GID map, and other useful state
"/var/lib/nixos" "/var/lib/nixos"
# SSH host keys (and public keys for convenience) # SSH host keys (and public keys for convenience)
(builtins.map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys) (map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys)
]; ];
services.restic.backups.backblaze = { services.restic.backups.backblaze = {

View file

@ -188,14 +188,14 @@ in
++ (lib.flip lib.mapAttrsToList cfg.virtualHosts (_: { subdomain, ... } @ args: ++ (lib.flip lib.mapAttrsToList cfg.virtualHosts (_: { subdomain, ... } @ args:
let let
conflicts = [ "port" "root" "socket" "redirect" ]; conflicts = [ "port" "root" "socket" "redirect" ];
optionsNotNull = builtins.map (v: args.${v} != null) conflicts; optionsNotNull = map (v: args.${v} != null) conflicts;
optionsSet = lib.filter lib.id optionsNotNull; optionsSet = lib.filter lib.id optionsNotNull;
in in
{ {
assertion = builtins.length optionsSet == 1; assertion = builtins.length optionsSet == 1;
message = '' message = ''
Subdomain '${subdomain}' must have exactly one of ${ Subdomain '${subdomain}' must have exactly one of ${
lib.concatStringsSep ", " (builtins.map (v: "'${v}'") conflicts) lib.concatStringsSep ", " (map (v: "'${v}'") conflicts)
} configured. } configured.
''; '';
})) }))
@ -208,7 +208,7 @@ in
assertion = args.websocketsLocations != [ ] -> proxyPassUsed; assertion = args.websocketsLocations != [ ] -> proxyPassUsed;
message = '' message = ''
Subdomain '${subdomain}' can only use 'websocketsLocations' with one of ${ Subdomain '${subdomain}' can only use 'websocketsLocations' with one of ${
lib.concatStringsSep ", " (builtins.map (v: "'${v}'") proxyPass) lib.concatStringsSep ", " (map (v: "'${v}'") proxyPass)
}. }.
''; '';
})) }))

View file

@ -1,6 +1,6 @@
# Automatically import all overlays in the directory # Automatically import all overlays in the directory
let let
files = builtins.readDir ./.; files = builtins.readDir ./.;
overlays = builtins.removeAttrs files [ "default.nix" ]; overlays = removeAttrs files [ "default.nix" ];
in in
builtins.mapAttrs (name: _: import "${./.}/${name}") overlays builtins.mapAttrs (name: _: import "${./.}/${name}") overlays