From 9749e5bd5520059da41edb8e97ffc205cf164f1a Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Mon, 25 Aug 2025 12:15:58 +0200 Subject: [PATCH] do a small amount of refactoring, change versions to 25.11, and make a systemd unit to upgrade nextcloud daily on queen --- home-manager/hosts/EDI/lillian.nix | 2 +- home-manager/hosts/GLaDOS/lillian.nix | 2 +- home-manager/hosts/shodan/lillian.nix | 2 +- home-manager/hosts/wheatley/lillian.nix | 2 +- nixos/hosts/EDI/configuration.nix | 2 +- nixos/hosts/GLaDOS/configuration.nix | 2 +- nixos/hosts/queen/configuration.nix | 27 +++++++- nixos/hosts/shodan/configuration.nix | 2 +- nixos/hosts/wheatley/configuration.nix | 2 +- nixos/shared/default.nix | 90 +++++++++++++------------ 10 files changed, 81 insertions(+), 52 deletions(-) diff --git a/home-manager/hosts/EDI/lillian.nix b/home-manager/hosts/EDI/lillian.nix index 5aa1c76..6d2719a 100644 --- a/home-manager/hosts/EDI/lillian.nix +++ b/home-manager/hosts/EDI/lillian.nix @@ -20,5 +20,5 @@ ]; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - home.stateVersion = "25.05"; + home.stateVersion = "25.11"; } diff --git a/home-manager/hosts/GLaDOS/lillian.nix b/home-manager/hosts/GLaDOS/lillian.nix index cc55531..7097090 100644 --- a/home-manager/hosts/GLaDOS/lillian.nix +++ b/home-manager/hosts/GLaDOS/lillian.nix @@ -30,5 +30,5 @@ }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - home.stateVersion = "25.05"; + home.stateVersion = "25.11"; } diff --git a/home-manager/hosts/shodan/lillian.nix b/home-manager/hosts/shodan/lillian.nix index d763022..7a115b0 100644 --- a/home-manager/hosts/shodan/lillian.nix +++ b/home-manager/hosts/shodan/lillian.nix @@ -110,5 +110,5 @@ programs.plasma.kscreenlocker.passwordRequired = false; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - home.stateVersion = "25.05"; + home.stateVersion = "25.11"; } diff --git a/home-manager/hosts/wheatley/lillian.nix b/home-manager/hosts/wheatley/lillian.nix index 9bd29f7..d190612 100644 --- a/home-manager/hosts/wheatley/lillian.nix +++ b/home-manager/hosts/wheatley/lillian.nix @@ -35,5 +35,5 @@ }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - home.stateVersion = "25.05"; + home.stateVersion = "25.11"; } diff --git a/nixos/hosts/EDI/configuration.nix b/nixos/hosts/EDI/configuration.nix index d52551f..373915f 100644 --- a/nixos/hosts/EDI/configuration.nix +++ b/nixos/hosts/EDI/configuration.nix @@ -57,5 +57,5 @@ }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; } diff --git a/nixos/hosts/GLaDOS/configuration.nix b/nixos/hosts/GLaDOS/configuration.nix index ee0bf07..238dd13 100644 --- a/nixos/hosts/GLaDOS/configuration.nix +++ b/nixos/hosts/GLaDOS/configuration.nix @@ -95,5 +95,5 @@ users.users.lillian.extraGroups = ["gamemode"]; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; } diff --git a/nixos/hosts/queen/configuration.nix b/nixos/hosts/queen/configuration.nix index 40d1028..e0041fa 100644 --- a/nixos/hosts/queen/configuration.nix +++ b/nixos/hosts/queen/configuration.nix @@ -3,6 +3,7 @@ outputs, lib, pkgs, + config, ... }: { imports = [ @@ -90,6 +91,30 @@ enable = false; }; + systemd = { + services."upgrade-nextcloud" = { + path = with pkgs; [nextcloud31]; + enable = true; + unitConfig = { + after = "nextcloud-setup.service"; + }; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${config.services.nextcloud.occ}/bin/nextcloud-occ upgrade"; + RemainAfterExit = "yes"; + }; + }; + + timers."upgrade-nextcloud" = { + wantedBy = ["timers.target"]; + partOf = ["upgrade-nextcloud.service"]; + timerConfig = { + OnCalendar = "daily"; + Unit = "nextcloud-setup.service"; + }; + }; + }; + networking = { domain = ""; @@ -192,5 +217,5 @@ }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; } diff --git a/nixos/hosts/shodan/configuration.nix b/nixos/hosts/shodan/configuration.nix index 1f5594c..accf28c 100644 --- a/nixos/hosts/shodan/configuration.nix +++ b/nixos/hosts/shodan/configuration.nix @@ -275,5 +275,5 @@ }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; } diff --git a/nixos/hosts/wheatley/configuration.nix b/nixos/hosts/wheatley/configuration.nix index a283a13..9402ef1 100644 --- a/nixos/hosts/wheatley/configuration.nix +++ b/nixos/hosts/wheatley/configuration.nix @@ -383,6 +383,6 @@ services.cage.enable = true; nixpkgs.config.kodi.enableAdvancedLauncher = true; - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; nixpkgs.hostPlatform = lib.mkForce "aarch64-linux"; } diff --git a/nixos/shared/default.nix b/nixos/shared/default.nix index 0cef737..cd85ee7 100644 --- a/nixos/shared/default.nix +++ b/nixos/shared/default.nix @@ -4,7 +4,6 @@ lib, config, pkgs, - mkIf, ... }: { imports = [ @@ -91,13 +90,15 @@ # grub.enable = false; }; - programs.zsh = { - enable = true; - }; + programs = { + zsh = { + enable = true; + }; - programs.gnupg.agent = { - enable = true; - enableBrowserSocket = true; + gnupg.agent = { + enable = true; + enableBrowserSocket = true; + }; }; stylix = { @@ -174,36 +175,37 @@ # sansSerif = ["Atkinson Hyperlegible"]; # }; }; - - systemd.services."shutdown-zellij-zsh" = { - path = with pkgs; [killall]; - enable = true; - unitConfig = { - Before = "shutdown.target"; - }; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${pkgs.killall}/bin/killall -SIGKILL zellij zsh"; - RemainAfterExit = "yes"; - }; - }; - - systemd.services."start-vpn-wg" = - if config.services.vpn-ip.enable - then { - path = with pkgs; [systemd]; + systemd = { + services."shutdown-zellij-zsh" = { + path = with pkgs; [killall]; enable = true; unitConfig = { - Wants = "network-online.target"; - After = "network-online.target"; + Before = "shutdown.target"; }; serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.systemd}/bin/systemctl start wg-quick-wg0.service"; + ExecStart = "${pkgs.killall}/bin/killall -SIGKILL zellij zsh"; RemainAfterExit = "yes"; }; - } - else {}; + }; + + services."start-vpn-wg" = + if config.services.vpn-ip.enable + then { + path = with pkgs; [systemd]; + enable = true; + unitConfig = { + Wants = "network-online.target"; + After = "network-online.target"; + }; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.systemd}/bin/systemctl start wg-quick-wg0.service"; + RemainAfterExit = "yes"; + }; + } + else {}; + }; networking = if config.services.vpn-ip.enable @@ -252,20 +254,22 @@ }; users = { - users.lillian = { - isNormalUser = true; - extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"]; - shell = pkgs.zsh; - hashedPasswordFile = config.sops.secrets."lillian-password".path; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILhwA+ZdP2tEBYQNdzLHZzFHxocyeqzhXI6tFpaZA3PZ lillian@EDI" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30G2PJOnI6jnAtxOQV0SpLFUva0adarLZLvaoZvjGE lillian@GLaDOS" - ]; + users = { + lillian = { + isNormalUser = true; + extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"]; + shell = pkgs.zsh; + hashedPasswordFile = config.sops.secrets."lillian-password".path; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILhwA+ZdP2tEBYQNdzLHZzFHxocyeqzhXI6tFpaZA3PZ lillian@EDI" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30G2PJOnI6jnAtxOQV0SpLFUva0adarLZLvaoZvjGE lillian@GLaDOS" + ]; + }; + + root = { + hashedPassword = "*"; + }; }; mutableUsers = false; - - users.root = { - hashedPassword = "*"; - }; }; }