From daba515ea45b764458660c94e015409533a0eb58 Mon Sep 17 00:00:00 2001 From: Luke Worth Date: Wed, 3 Jul 2024 10:48:00 +1000 Subject: [PATCH] services/nix-daemon: default environmentVariables to config.nix.envVars The new `services.nix-daemon.environmentVariables` seems more idiomatic so let's gracefully deprecate `config.nix.envVars` (which was only ever used here). --- modules/services/nix-daemon.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/nix-daemon.nix b/modules/services/nix-daemon.nix index 6b461b01..712ee6ba 100644 --- a/modules/services/nix-daemon.nix +++ b/modules/services/nix-daemon.nix @@ -22,7 +22,9 @@ in services.nix-daemon.environmentVariables = mkOption { type = types.attrsOf types.str; - default = { }; + default = + # See https://github.com/LnL7/nix-darwin/commit/a9e0f71c50fc9a72e22e991e323a6a7e50bfc0d7. + config.nix.envVars; example = { AWS_CONFIG_FILE = "/etc/nix/aws/config"; AWS_SHARED_CREDENTIALS_FILE = "/etc/nix/aws/credentials"; @@ -74,7 +76,6 @@ in serviceConfig.EnvironmentVariables = mkMerge [ cfg.environmentVariables - config.nix.envVars { NIX_SSL_CERT_FILE = mkIf (config.environment.variables ? NIX_SSL_CERT_FILE)