Enable state-version in defaults
This commit is contained in:
@@ -8,6 +8,10 @@
|
|||||||
{
|
{
|
||||||
imports = lib.optional (_class == "nixos") (
|
imports = lib.optional (_class == "nixos") (
|
||||||
lib.mkIf config.clan.core.enableRecommendedDefaults {
|
lib.mkIf config.clan.core.enableRecommendedDefaults {
|
||||||
|
|
||||||
|
# Enable automatic state-version generation.
|
||||||
|
clan.core.settings.state-version.enable = true;
|
||||||
|
|
||||||
# Use systemd during boot as well except:
|
# Use systemd during boot as well except:
|
||||||
# - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210
|
# - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210
|
||||||
# - for containers we currently rely on the `stage-2` init script that sets up our /etc
|
# - for containers we currently rely on the `stage-2` init script that sets up our /etc
|
||||||
@@ -37,6 +41,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.clan.core.enableRecommendedDefaults {
|
config = lib.mkIf config.clan.core.enableRecommendedDefaults {
|
||||||
|
|
||||||
# This disables the HTML manual and `nixos-help` command but leaves
|
# This disables the HTML manual and `nixos-help` command but leaves
|
||||||
# `man configuration.nix`
|
# `man configuration.nix`
|
||||||
documentation.doc.enable = lib.mkDefault false;
|
documentation.doc.enable = lib.mkDefault false;
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ def test_generate_public_and_secret_vars(
|
|||||||
assert check_vars(machine.name, machine.flake)
|
assert check_vars(machine.name, machine.flake)
|
||||||
# get last commit message
|
# get last commit message
|
||||||
commit_message = run(
|
commit_message = run(
|
||||||
["git", "log", "-5", "--pretty=%B"],
|
["git", "log", "-6", "--pretty=%B"],
|
||||||
).stdout.strip()
|
).stdout.strip()
|
||||||
assert (
|
assert (
|
||||||
"Update vars via generator my_generator for machine my_machine"
|
"Update vars via generator my_generator for machine my_machine"
|
||||||
@@ -878,7 +878,7 @@ def test_api_set_prompts(
|
|||||||
# get_generators should bind the store
|
# get_generators should bind the store
|
||||||
assert generators[0].files[0]._store is not None
|
assert generators[0].files[0]._store is not None
|
||||||
|
|
||||||
assert len(generators) == 1
|
assert len(generators) == 2
|
||||||
assert generators[0].name == "my_generator"
|
assert generators[0].name == "my_generator"
|
||||||
assert generators[0].prompts[0].name == "prompt1"
|
assert generators[0].prompts[0].name == "prompt1"
|
||||||
assert generators[0].prompts[0].previous_value == "input2"
|
assert generators[0].prompts[0].previous_value == "input2"
|
||||||
|
|||||||
Reference in New Issue
Block a user