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.
This commit is contained in:
parent
193efb0bcd
commit
9c63dd372d
@ -90,7 +90,7 @@ in
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf cfg.enable {
|
||||||
services.cloud-init.settings = {
|
services.cloud-init.settings = {
|
||||||
system_info = mkDefault {
|
system_info = mkDefault {
|
||||||
distro = "nixos";
|
distro = "nixos";
|
||||||
@ -142,7 +142,6 @@ in
|
|||||||
"power-state-change"
|
"power-state-change"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
} // (mkIf cfg.enable {
|
|
||||||
|
|
||||||
environment.etc."cloud/cloud.cfg" =
|
environment.etc."cloud/cloud.cfg" =
|
||||||
if cfg.config == "" then
|
if cfg.config == "" then
|
||||||
@ -225,5 +224,7 @@ in
|
|||||||
description = "Cloud-config availability";
|
description = "Cloud-config availability";
|
||||||
requires = [ "cloud-init-local.service" "cloud-init.service" ];
|
requires = [ "cloud-init-local.service" "cloud-init.service" ];
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
|
|
||||||
|
meta.maintainers = [ maintainers.zimbatm ];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user