feat: manage stateVersion through hostHelper
This commit is contained in:
parent
bf19849309
commit
14dfeec55f
5 changed files with 19 additions and 46 deletions
|
@ -10,5 +10,15 @@ in
|
||||||
modules = [
|
modules = [
|
||||||
{networking.hostName = hostname;}
|
{networking.hostName = hostname;}
|
||||||
(./hosts/${hostname})
|
(./hosts/${hostname})
|
||||||
|
|
||||||
|
{
|
||||||
|
# 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 = hostOptions.stateVersion; # Did you read the comment?
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
nixos-unstable,
|
nixos-unstable,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# 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 = "24.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
#nixpkgs.overlays = [ overlays.unstable-packages ];
|
#nixpkgs.overlays = [ overlays.unstable-packages ];
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
|
|
@ -4,31 +4,13 @@
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# 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 = "25.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
|
|
||||||
# focused on correctness, usability, and growth –
|
|
||||||
# and committed to doing right by its community.
|
|
||||||
package = pkgs.lix;
|
|
||||||
|
|
||||||
settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../modules/locale.nix
|
../../system_profiles/defaults.nix
|
||||||
|
|
||||||
../../system_profiles/mini-container.nix
|
../../system_profiles/mini-container.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,29 +4,16 @@
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
#networking.hostName = "jitsi"; # Define your hostname.
|
|
||||||
# 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 = "24.11"; # Did you read the comment?
|
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
# Disable if you don't want unfree packages
|
# Disable if you don't want unfree packages
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
|
|
||||||
# focused on correctness, usability, and growth –
|
|
||||||
# and committed to doing right by its community.
|
|
||||||
nix.package = pkgs.lix;
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../modules/locale.nix
|
../../system_profiles/defaults.nix
|
||||||
|
../../system_profiles/mini-container.nix
|
||||||
../../system_profiles/mini.nix
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,10 @@ in {
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) {
|
nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) {
|
||||||
crocoite = {};
|
crocoite = {stateVersion = "24.05";};
|
||||||
game-luanti = {unstable = true;};
|
|
||||||
#jitsi = {};
|
jitsi = {stateVersion = "24.11";};
|
||||||
|
game-luanti = {stateVersion = "25.05"; unstable = true;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue