diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2023-02-20 21:39:14 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2023-02-20 21:39:14 +0100 |
commit | 37689a9bfa6b86e7fbe899d6efde9815c6abf2e4 (patch) | |
tree | ad67798d167eb9c55cd2c3759cc635971fabe9bf | |
parent | Hosts: Add 'open' alias (diff) | |
download | nixos-config-37689a9bfa6b86e7fbe899d6efde9815c6abf2e4.tar.gz nixos-config-37689a9bfa6b86e7fbe899d6efde9815c6abf2e4.tar.bz2 nixos-config-37689a9bfa6b86e7fbe899d6efde9815c6abf2e4.zip |
Flake: Set stateVersion in the hardware set
-rw-r--r-- | flake.nix | 8 | ||||
-rw-r--r-- | hosts/configuration.nix | 5 | ||||
-rw-r--r-- | hosts/default.nix | 4 | ||||
-rw-r--r-- | hosts/home.nix | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix index 00c046f..6e1cb82 100644 --- a/flake.nix +++ b/flake.nix @@ -52,10 +52,10 @@ ]; hardwares = [ - { hardware = "laptop"; } - { hardware = "chromebook"; } - { hardware = "thinkpad"; } - { hardware = "virtualbox"; } + { hardware = "laptop"; stateVersion = "22.05"; } + { hardware = "chromebook"; stateVersion = "22.05"; } + { hardware = "thinkpad"; stateVersion = "22.05"; } + { hardware = "virtualbox"; stateVersion = "22.05"; } ]; systems = [ diff --git a/hosts/configuration.nix b/hosts/configuration.nix index 5dfbbbc..e73f22d 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -1,4 +1,5 @@ -{ secrets, dotfiles, lib, pkgs, config, hostname, inputs, user, timezone, system, ... }: { +{ secrets, dotfiles, lib, pkgs, config, hostname, inputs, user, timezone, system, stateVersion, ... }: +{ imports = [ "${inputs.impermanence}/nixos.nix" @@ -224,6 +225,6 @@ # 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.05"; # Did you read the comment? + system.stateVersion = stateVersion; # Did you read the comment? } diff --git a/hosts/default.nix b/hosts/default.nix index 7347bb8..7623863 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,6 +1,6 @@ { lib, inputs, secrets, dotfiles, hosts, hardwares, systems, isNixOS, isIso, isHardware, user, nixpkgs, home-manager, ... }: let - mkHost = { host, hardware, system, timezone, location, extraOverlays, extraModules }: isNixOS: isIso: isHardware: + mkHost = { host, hardware, stateVersion, system, timezone, location, extraOverlays, extraModules }: isNixOS: isIso: isHardware: let pkgs = import nixpkgs { inherit system; @@ -16,7 +16,7 @@ let ] ++ extraOverlays; }; - extraArgs = { inherit pkgs inputs isIso isHardware user secrets dotfiles timezone location hardware system; hostname = host + "-" + hardware; }; + extraArgs = { inherit pkgs inputs isIso isHardware user secrets dotfiles timezone location hardware system stateVersion; hostname = host + "-" + hardware; }; extraSpecialModules = extraModules ++ lib.optional isHardware ../hardware/${hardware} ++ lib.optional isIso "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; in diff --git a/hosts/home.nix b/hosts/home.nix index 15fdc40..6230b7d 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, user, hostname, secrets, dotfiles, location, ... }: +{ config, lib, pkgs, inputs, user, hostname, secrets, dotfiles, location, stateVersion, ... }: { imports = [ ../modules/email @@ -369,6 +369,6 @@ # For disabling the automatic creation of $HOME/Desktop xdg.userDirs.desktop = "$HOME/"; - home.stateVersion = "22.05"; + home.stateVersion = stateVersion; } |