diff --git a/scripts/bupdate b/scripts/bupdate new file mode 100755 index 0000000..0d04b29 --- /dev/null +++ b/scripts/bupdate @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ "$UID" -ne 0 ]; then + sudo true # Prompt user for password so it doesn't happen in the middle of the script +fi +pushd ~/.dotfiles +sudo nixos-rebuild switch --flake .# + +hn=$(hostname) +home-manager switch --flake .#daniel-$hn +popd diff --git a/user/daniel/home.nix b/user/daniel/home.nix index bbd9180..719d2ab 100644 --- a/user/daniel/home.nix +++ b/user/daniel/home.nix @@ -50,8 +50,13 @@ file = { ".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors"; - "bin/supdate" = { - source = ../../scripts/supdate; + "bin/aupdate" = { + source = ../../scripts/aupdate; + executable = true; + }; + + "bin/bupdate" = { + source = ../../scripts/bupdate; executable = true; }; @@ -60,13 +65,13 @@ executable = true; }; - "bin/update" = { - source = ../../scripts/update; + "bin/supdate" = { + source = ../../scripts/supdate; executable = true; }; - "bin/aupdate" = { - source = ../../scripts/aupdate; + "bin/update" = { + source = ../../scripts/update; executable = true; }; };