diff options
author | Jonas Chevalier <zimbatm@zimbatm.com> | 2023-05-14 22:35:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 22:35:06 +0200 |
commit | 9c63dd372dcf22705f1777c71f7f325afd6b4000 (patch) | |
tree | fb86741ae5147ed24e4a8c96d86768da53900082 /nixos | |
parent | 193efb0bcdf2c3f7472bf275a25520b87f46c188 (diff) |
cloud-init module: fix default settings (#231867)
The `//` operator doesn't do deep merge so it was overriding the first attrset and not recording the defaults.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/system/cloud-init.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/system/cloud-init.nix b/nixos/modules/services/system/cloud-init.nix index 8c932b0e6f78f..4cda06ed42481 100644 --- a/nixos/modules/services/system/cloud-init.nix +++ b/nixos/modules/services/system/cloud-init.nix @@ -90,7 +90,7 @@ in }; - config = { + config = mkIf cfg.enable { services.cloud-init.settings = { system_info = mkDefault { distro = "nixos"; @@ -142,7 +142,6 @@ in "power-state-change" ]; }; - } // (mkIf cfg.enable { environment.etc."cloud/cloud.cfg" = if cfg.config == "" then @@ -225,5 +224,7 @@ in description = "Cloud-config availability"; requires = [ "cloud-init-local.service" "cloud-init.service" ]; }; - }); + }; + + meta.maintainers = [ maintainers.zimbatm ]; } |