Started working on rebuild script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
smb-secrets
|
smb-secrets
|
||||||
|
nixos-switch.log
|
||||||
|
@@ -269,4 +269,6 @@ in
|
|||||||
mpd.useLocal = true;
|
mpd.useLocal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.systembus-notify.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
11
home/scripts/nixswitch.sh
Executable file
11
home/scripts/nixswitch.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
cd ~/nixos-config
|
||||||
|
|
||||||
|
sudo nixos-rebuild switch --flake . &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
||||||
|
|
||||||
|
current=$(nixos-rebuild list-generations | grep current)
|
||||||
|
|
||||||
|
git commit -am "$current"
|
||||||
|
|
||||||
|
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
||||||
|
|
Reference in New Issue
Block a user