diff --git a/clanServices/state-version/README.md b/clanServices/state-version/README.md deleted file mode 100644 index c55063b66..000000000 --- a/clanServices/state-version/README.md +++ /dev/null @@ -1,37 +0,0 @@ -This service generates the `system.stateVersion` of the nixos installation -automatically. - -Possible values: -[system.stateVersion](https://search.nixos.org/options?channel=unstable&show=system.stateVersion&from=0&size=50&sort=relevance&type=packages&query=stateVersion) - -## Usage - -The following configuration will set `stateVersion` for all machines: - -``` -inventory.instances = { - state-version = { - module = { - name = "state-version"; - input = "clan"; - }; - roles.default.tags.all = { }; - }; -``` - -## Migration - -If you are already setting `system.stateVersion`, either let the automatic -generation happen, or trigger the generation manually for the machine. The -service will take the specified version, if one is already supplied through the -config. - -To manually generate the version for a specified machine run: - -``` -clan vars generate [MACHINE] -``` - -If the setting was already set, you can then remove `system.stateVersion` from -your machine configuration. For new machines, just import the service as shown -above. diff --git a/clanServices/state-version/default.nix b/clanServices/state-version/default.nix deleted file mode 100644 index b855c645b..000000000 --- a/clanServices/state-version/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ ... }: -{ - _class = "clan.service"; - manifest.name = "clan-core/state-version"; - manifest.description = "Automatically generate the state version of the nixos installation."; - manifest.categories = [ "System" ]; - manifest.readme = builtins.readFile ./README.md; - - roles.default = { - - perInstance = - { ... }: - { - nixosModule = - { - config, - lib, - ... - }: - let - var = config.clan.core.vars.generators.state-version.files.version or { }; - in - { - - warnings = [ - '' - The clan.state-version service is deprecated and will be - removed on 2025-07-15 in favor of a nix option. - - Please migrate your configuration to use `clan.core.settings.state-version.enable = true` instead. - '' - ]; - - system.stateVersion = lib.mkDefault (lib.removeSuffix "\n" var.value); - - clan.core.vars.generators.state-version = { - files.version = { - secret = false; - value = lib.mkDefault config.system.nixos.release; - }; - runtimeInputs = [ ]; - script = '' - echo -n ${config.system.stateVersion} > "$out"/version - ''; - }; - }; - }; - }; - -} diff --git a/clanServices/state-version/flake-module.nix b/clanServices/state-version/flake-module.nix deleted file mode 100644 index c4ff9d633..000000000 --- a/clanServices/state-version/flake-module.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, ... }: -let - module = lib.modules.importApply ./default.nix { }; -in -{ - clan.modules.state-version = module; - perSystem = - { ... }: - { - clan.nixosTests.state-version = { - imports = [ ./tests/vm/default.nix ]; - - clan.modules."@clan/state-version" = module; - }; - }; -} diff --git a/clanServices/state-version/tests/vm/default.nix b/clanServices/state-version/tests/vm/default.nix deleted file mode 100644 index 2c9a81aeb..000000000 --- a/clanServices/state-version/tests/vm/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, ... }: -{ - name = "service-state-version"; - - clan = { - directory = ./.; - inventory = { - machines.server = { }; - instances.default = { - module.name = "@clan/state-version"; - module.input = "self"; - roles.default.machines."server" = { }; - }; - }; - }; - - nodes.server = { }; - - testScript = lib.mkDefault '' - start_all() - ''; -} diff --git a/clanServices/state-version/tests/vm/sops/users/admin/key.json b/clanServices/state-version/tests/vm/sops/users/admin/key.json deleted file mode 100644 index e408aa96b..000000000 --- a/clanServices/state-version/tests/vm/sops/users/admin/key.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg", - "type": "age" -} diff --git a/clanServices/state-version/tests/vm/vars/per-machine/server/state-version/version/value b/clanServices/state-version/tests/vm/vars/per-machine/server/state-version/version/value deleted file mode 100644 index 115ab7a6a..000000000 --- a/clanServices/state-version/tests/vm/vars/per-machine/server/state-version/version/value +++ /dev/null @@ -1 +0,0 @@ -25.11 \ No newline at end of file