clan.deployment: unify deprecated option

This commit is contained in:
Johannes Kirschbauer
2025-07-02 18:17:03 +02:00
parent dfb53deeca
commit b1f71fe4fb
5 changed files with 17 additions and 33 deletions

View File

@@ -51,7 +51,6 @@
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript.drvPath
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in

View File

@@ -304,14 +304,14 @@ clan {
### Excluding from Automatic Updates
To exclude machines from being updated when running `clan machines update` without any machines specified,
one can set the `clan.deployment.requireExplicitUpdate` option to true:
one can set the `clan.core.deployment.requireExplicitUpdate` option to true:
```{.nix hl_lines="5" .no-copy}
clan {
# ...
machines = {
"jon" = {
clan.deployment.requireExplicitUpdate = true;
clan.core.deployment.requireExplicitUpdate = true;
};
};
};

View File

@@ -84,31 +84,16 @@
use = lib.trace "Obsolete option `${lib.showOption from}' is used. It was renamed to `${lib.showOption to}'.";
withPriority = false;
})
(lib.mkRenamedOptionModule
[
"clan"
"deployment"
]
[
"clan"
"core"
"deployment"
]
)
(lib.mkRenamedOptionModule
[
"clan"
"core"
"networking"
"deploymentAddress"
]
[
"clan"
"core"
"networking"
"targetHost"
]
)
(lib.mkRemovedOptionModule [
"clan"
"deployment"
] "Use clan.core.deployment instead")
(lib.mkRemovedOptionModule [
"clan"
"core"
"networking"
"deploymentAddress"
] "Use clan.core.network.targetHost instead")
];
config = lib.optionalAttrs (_class == "nixos") (
lib.mkIf config.clan.core.enableRecommendedDefaults {

View File

@@ -80,8 +80,8 @@
};
sops.defaultGroups = config.clan.core.sops.defaultGroups;
inherit (config.clan.core.networking) targetHost buildHost;
inherit (config.clan.core.deployment) requireExplicitUpdate;
inherit (config.system.clan.deployment) nixosMobileWorkaround;
inherit (config.clan.deployment) requireExplicitUpdate;
};
system.clan.deployment.file = pkgs.writeText "deployment.json" (
builtins.toJSON config.system.clan.deployment.data

View File

@@ -34,7 +34,7 @@ Examples:
$ clan machines update [MACHINES]
Will update the specified machines [MACHINES], if [MACHINES] is omitted, the command
will attempt to update every configured machine.
To exclude machines being updated `clan.deployment.requireExplicitUpdate = true;`
To exclude machines being updated `clan.core.deployment.requireExplicitUpdate = true;`
can be set in the machine config.
$ clan machines update --tags [TAGS..]