From 8cecf0eae80200ebe6476ff96ac75e8f44f2e71d Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 23 Jul 2023 21:46:20 +0200 Subject: [PATCH] hive: Use stateVersion defined in the nodes metadata --- hive.nix | 3 +++ machines/compute01/_configuration.nix | 1 - machines/storage01/_configuration.nix | 1 - machines/web01/_configuration.nix | 7 ------- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hive.nix b/hive.nix index 40d3005..e6ddf7b 100644 --- a/hive.nix +++ b/hive.nix @@ -19,6 +19,9 @@ let # Set NIX_PATH to the patched version of nixpkgs nix.nixPath = [ "nixpkgs=${mkNixpkgs node}" ]; + + # Use the stateVersion declared in the metadata + system = { inherit (metadata.nodes.${node}) stateVersion; }; }; mkNixpkgs = node: diff --git a/machines/compute01/_configuration.nix b/machines/compute01/_configuration.nix index 8ab7753..6f592f2 100644 --- a/machines/compute01/_configuration.nix +++ b/machines/compute01/_configuration.nix @@ -3,5 +3,4 @@ { dgn-dns.enable = true; - system.stateVersion = "23.05"; # Did you read the comment? } diff --git a/machines/storage01/_configuration.nix b/machines/storage01/_configuration.nix index 9123abe..81428ad 100644 --- a/machines/storage01/_configuration.nix +++ b/machines/storage01/_configuration.nix @@ -5,5 +5,4 @@ { config, pkgs, ... }: { - system.stateVersion = "23.05"; # Did you read the comment? } diff --git a/machines/web01/_configuration.nix b/machines/web01/_configuration.nix index aa6a06c..b1ee27a 100644 --- a/machines/web01/_configuration.nix +++ b/machines/web01/_configuration.nix @@ -13,12 +13,5 @@ networking.hostName = name; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? }