From 254658dfca13c913f36ab013049f23b9fcd95eb5 Mon Sep 17 00:00:00 2001 From: greysoh Date: Fri, 19 Jul 2024 14:21:48 -0400 Subject: [PATCH] chore: Finalize updating. --- nixinfra/commons.nix | 8 ++------ nixinfra/update.sh | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixinfra/commons.nix b/nixinfra/commons.nix index f58b4f4..859dcd7 100644 --- a/nixinfra/commons.nix +++ b/nixinfra/commons.nix @@ -62,10 +62,6 @@ in { initialPassword = "1234"; isNormalUser = true; extraGroups = ["sudoer" "wheel" "docker"]; - - packages = with pkgs; [ - git - ]; }; environment.systemPackages = with pkgs; [ @@ -75,8 +71,8 @@ in { htop bottom - # For some reason, after seperation, this package isn't included anymore, but the services are - k3s + # Updating + git ]; system.stateVersion = "24.05"; diff --git a/nixinfra/update.sh b/nixinfra/update.sh index 44a377f..a01f9fd 100644 --- a/nixinfra/update.sh +++ b/nixinfra/update.sh @@ -12,5 +12,9 @@ if [[ "$UID" != "0" ]]; then exit $? fi +pushd /etc/nixos 2> /dev/null > /dev/null +git pull +popd 2> /dev/null > /dev/null + export NIX_PATH="$(printf $NIX_PATH | sed --expression="s#/etc/nixos/configuration.nix#/etc/nixos/nixinfra/$NIX_BUILD_ID.nix#g")" nixos-rebuild switch --upgrade \ No newline at end of file