do a small amount of refactoring, change versions to 25.11, and make a systemd unit to upgrade nextcloud daily on queen

This commit is contained in:
Lillian Violet 2025-08-25 12:15:58 +02:00
parent 015061c001
commit 9749e5bd55
10 changed files with 81 additions and 52 deletions

View file

@ -20,5 +20,5 @@
]; ];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.05"; home.stateVersion = "25.11";
} }

View file

@ -30,5 +30,5 @@
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.05"; home.stateVersion = "25.11";
} }

View file

@ -110,5 +110,5 @@
programs.plasma.kscreenlocker.passwordRequired = false; programs.plasma.kscreenlocker.passwordRequired = false;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.05"; home.stateVersion = "25.11";
} }

View file

@ -35,5 +35,5 @@
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.05"; home.stateVersion = "25.11";
} }

View file

@ -57,5 +57,5 @@
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.05"; system.stateVersion = "25.11";
} }

View file

@ -95,5 +95,5 @@
users.users.lillian.extraGroups = ["gamemode"]; users.users.lillian.extraGroups = ["gamemode"];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.05"; system.stateVersion = "25.11";
} }

View file

@ -3,6 +3,7 @@
outputs, outputs,
lib, lib,
pkgs, pkgs,
config,
... ...
}: { }: {
imports = [ imports = [
@ -90,6 +91,30 @@
enable = false; 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 = { networking = {
domain = ""; domain = "";
@ -192,5 +217,5 @@
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.05"; system.stateVersion = "25.11";
} }

View file

@ -275,5 +275,5 @@
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.05"; system.stateVersion = "25.11";
} }

View file

@ -383,6 +383,6 @@
services.cage.enable = true; services.cage.enable = true;
nixpkgs.config.kodi.enableAdvancedLauncher = true; nixpkgs.config.kodi.enableAdvancedLauncher = true;
system.stateVersion = "25.05"; system.stateVersion = "25.11";
nixpkgs.hostPlatform = lib.mkForce "aarch64-linux"; nixpkgs.hostPlatform = lib.mkForce "aarch64-linux";
} }

View file

@ -4,7 +4,6 @@
lib, lib,
config, config,
pkgs, pkgs,
mkIf,
... ...
}: { }: {
imports = [ imports = [
@ -91,13 +90,15 @@
# grub.enable = false; # grub.enable = false;
}; };
programs.zsh = { programs = {
enable = true; zsh = {
}; enable = true;
};
programs.gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableBrowserSocket = true; enableBrowserSocket = true;
};
}; };
stylix = { stylix = {
@ -174,36 +175,37 @@
# sansSerif = ["Atkinson Hyperlegible"]; # sansSerif = ["Atkinson Hyperlegible"];
# }; # };
}; };
systemd = {
systemd.services."shutdown-zellij-zsh" = { services."shutdown-zellij-zsh" = {
path = with pkgs; [killall]; 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];
enable = true; enable = true;
unitConfig = { unitConfig = {
Wants = "network-online.target"; Before = "shutdown.target";
After = "network-online.target";
}; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl start wg-quick-wg0.service"; ExecStart = "${pkgs.killall}/bin/killall -SIGKILL zellij zsh";
RemainAfterExit = "yes"; 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 = networking =
if config.services.vpn-ip.enable if config.services.vpn-ip.enable
@ -252,20 +254,22 @@
}; };
users = { users = {
users.lillian = { users = {
isNormalUser = true; lillian = {
extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"]; isNormalUser = true;
shell = pkgs.zsh; extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"];
hashedPasswordFile = config.sops.secrets."lillian-password".path; shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ hashedPasswordFile = config.sops.secrets."lillian-password".path;
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILhwA+ZdP2tEBYQNdzLHZzFHxocyeqzhXI6tFpaZA3PZ lillian@EDI" openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30G2PJOnI6jnAtxOQV0SpLFUva0adarLZLvaoZvjGE lillian@GLaDOS" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILhwA+ZdP2tEBYQNdzLHZzFHxocyeqzhXI6tFpaZA3PZ lillian@EDI"
]; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30G2PJOnI6jnAtxOQV0SpLFUva0adarLZLvaoZvjGE lillian@GLaDOS"
];
};
root = {
hashedPassword = "*";
};
}; };
mutableUsers = false; mutableUsers = false;
users.root = {
hashedPassword = "*";
};
}; };
} }