diff --git a/flake.nix b/flake.nix index 5c8820c5..3176946b 100644 --- a/flake.nix +++ b/flake.nix @@ -442,18 +442,18 @@ metadata = users.${name}; username = metadata.deploy.username or name; in - lib'.nameValuePair "home-manager-${name}" { - hostname = metadata.deploy.hostname or name; - autoRollback = metadata.deploy.auto-rollback or true; - magicRollback = metadata.deploy.magic-rollback or true; - fastConnection = metadata.deploy.fast-connection or true; - remoteBuild = metadata.deploy.remote-build or false; - profiles.home = { - sshUser = metadata.deploy.ssh-user or username; - user = metadata.deploy.user or username; - path = inputs.deploy.lib.${metadata.system or defaultSystem}.activate.home-manager value; - }; - }) + lib'.nameValuePair "home-manager-${name}" { + hostname = metadata.deploy.hostname or name; + autoRollback = metadata.deploy.auto-rollback or true; + magicRollback = metadata.deploy.magic-rollback or true; + fastConnection = metadata.deploy.fast-connection or true; + remoteBuild = metadata.deploy.remote-build or false; + profiles.home = { + sshUser = metadata.deploy.ssh-user or username; + user = metadata.deploy.user or username; + path = inputs.deploy.lib.${metadata.system or defaultSystem}.activate.home-manager value; + }; + }) self.homeConfigurations; in nixosConfigurations // homeConfigurations; diff --git a/hosts/ni/modules/wireguard.nix b/hosts/ni/modules/wireguard.nix index bedc218a..e1704905 100644 --- a/hosts/ni/modules/wireguard.nix +++ b/hosts/ni/modules/wireguard.nix @@ -75,15 +75,16 @@ in (lib.mkIf config.systemd.network.enable { # Just apply the appropriate permissions for systemd-networkd. - sops.secrets = let - systemdNetworkFileAttrs = { - group = config.users.users.systemd-network.group; - reloadUnits = [ "systemd-networkd.service" ]; - mode = "0640"; - }; - applySystemdAttr = secretPaths: lib.listToAttrs - (builtins.map (path: lib.nameValuePair path systemdNetworkFileAttrs)) - secretPaths; + sops.secrets = + let + systemdNetworkFileAttrs = { + group = config.users.users.systemd-network.group; + reloadUnits = [ "systemd-networkd.service" ]; + mode = "0640"; + }; + applySystemdAttr = secretPaths: lib.listToAttrs + (builtins.map (path: lib.nameValuePair path systemdNetworkFileAttrs)) + secretPaths; in applySystemdAttr [ "wireguard/private-key" diff --git a/hosts/plover/modules/services/bind.nix b/hosts/plover/modules/services/bind.nix index d9c35e8a..b34a47a8 100644 --- a/hosts/plover/modules/services/bind.nix +++ b/hosts/plover/modules/services/bind.nix @@ -130,7 +130,7 @@ in }; ${cfg.extraConfig} - ''; + ''; extraOptions = '' listen-on tls ${dnsSubdomain} { ${lib.concatMapStrings (interface: "${interface}; ") config.services.bind.listenOn} }; @@ -187,7 +187,8 @@ in domainZone' = zoneFile domain; fqdnZone' = zoneFile fqdn; secretPath = path: config.sops.secrets."dns/${path}".path; - in lib.mkAfter '' + in + lib.mkAfter '' [ -f '${domainZone'}' ] || { install -Dm0600 '${domainZone}' '${domainZone'}' replace-secret #mailboxSecurityKey# '${secretPath "${domain}/mailbox-security-key"}' '${domainZone'}' @@ -197,7 +198,7 @@ in [ -f '${fqdnZone'}' ] || { install -Dm0600 '${fqdnZone}' '${fqdnZone'}' } - ''; + ''; serviceConfig = { # Additional service hardening. You can see most of the options diff --git a/lib/private.nix b/lib/private.nix index e815d912..e8605daa 100644 --- a/lib/private.nix +++ b/lib/private.nix @@ -31,8 +31,10 @@ rec { let getKey = key: { inherit key sopsFile; }; in - lib.mapAttrs (path: attrs: - (getKey path) // attrs) secrets; + lib.mapAttrs + (path: attrs: + (getKey path) // attrs) + secrets; attachSopsPathPrefix = prefix: secrets: lib.mapAttrs' diff --git a/users/home-manager/foo-dogsquared/modules/email.nix b/users/home-manager/foo-dogsquared/modules/email.nix index 46d8a22b..adfd7f5f 100644 --- a/users/home-manager/foo-dogsquared/modules/email.nix +++ b/users/home-manager/foo-dogsquared/modules/email.nix @@ -33,8 +33,9 @@ enable = true; perIdentitySettings = id: let - identitySettings = attrs: lib.mapAttrs' (setting: value: - lib.nameValuePair "mail.identity.id${id}.${setting}" value) + identitySettings = attrs: lib.mapAttrs' + (setting: value: + lib.nameValuePair "mail.identity.id${id}.${setting}" value) attrs; in identitySettings {