Move stateVersion variables into per-machine config files

This commit is contained in:
Evie Litherland-Smith 2024-10-17 06:07:29 +01:00
parent b4f6e267a1
commit 42e865c066
5 changed files with 42 additions and 34 deletions

View file

@ -1,4 +1,8 @@
{ ... }: { username, ... }:
{ {
imports = [ ./laptop.nix ]; imports = [ ./laptop.nix ];
home-manager.users.${username} = {
home.stateVersion = "23.05";
};
system.stateVersion = "23.05";
} }

View file

@ -3,6 +3,7 @@
imports = [ ./laptop.nix ]; imports = [ ./laptop.nix ];
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ ./home/work.nix ]; imports = [ ./home/work.nix ];
home.stateVersion = "23.05";
}; };
boot.initrd = { boot.initrd = {
secrets = { secrets = {
@ -13,6 +14,7 @@
keyFile = "/crypto_keyfile.bin"; keyFile = "/crypto_keyfile.bin";
}; };
}; };
system.stateVersion = "23.05";
environment = { environment = {
etc."ppp/options".text = '' etc."ppp/options".text = ''
ipcp-accept-remote ipcp-accept-remote

View file

@ -3,6 +3,7 @@
imports = [ ./desktop.nix ]; imports = [ ./desktop.nix ];
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ ./home/work.nix ]; imports = [ ./home/work.nix ];
home.stateVersion = "23.05";
}; };
boot = { boot = {
loader.efi.efiSysMountPoint = "/boot/efi"; loader.efi.efiSysMountPoint = "/boot/efi";
@ -16,6 +17,7 @@
}; };
}; };
}; };
system.stateVersion = "23.05";
environment = { environment = {
etc."ppp/options".text = '' etc."ppp/options".text = ''
ipcp-accept-remote ipcp-accept-remote

View file

@ -8,7 +8,9 @@
imports = [ ./desktop.nix ]; imports = [ ./desktop.nix ];
environment.sessionVariables.MANGOHUD = 1; environment.sessionVariables.MANGOHUD = 1;
home-manager.users.${username} = { home-manager.users.${username} = {
home.packages = with pkgs; [ home = {
stateVersion = "23.05";
packages = with pkgs; [
krita krita
kdenlive kdenlive
helvum helvum
@ -24,6 +26,7 @@
cartridges cartridges
prismlauncher prismlauncher
]; ];
};
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [
@ -69,6 +72,7 @@
}; };
steam-hardware.enable = true; steam-hardware.enable = true;
}; };
system.stateVersion = "23.05";
programs = { programs = {
gamemode.enable = true; gamemode.enable = true;
steam = { steam = {

View file

@ -80,9 +80,7 @@
}) })
]; ];
}; };
system = { system.autoUpgrade = {
stateVersion = "23.05";
autoUpgrade = {
enable = true; enable = true;
persistent = true; persistent = true;
allowReboot = false; allowReboot = false;
@ -96,7 +94,6 @@
"https://nix.xenia.me.uk" "https://nix.xenia.me.uk"
]; ];
}; };
};
systemd.services = lib.mkIf config.system.autoUpgrade.enable { systemd.services = lib.mkIf config.system.autoUpgrade.enable {
nixos-upgrade.serviceConfig = { nixos-upgrade.serviceConfig = {
CPUQuota = "75%"; CPUQuota = "75%";
@ -152,7 +149,6 @@
imports = [ ./home/default.nix ]; imports = [ ./home/default.nix ];
home = { home = {
inherit username; inherit username;
stateVersion = "23.05";
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
}; };
}; };