Adds README explaining how to rebuild.
Removes old sysupdate utility.
This commit is contained in:
parent
82ae343393
commit
c373cd13e3
|
@ -0,0 +1,19 @@
|
|||
# Geeky Gays Server NixOS Configs
|
||||
|
||||
To update using latest pushed config:
|
||||
|
||||
```bash
|
||||
sudo nix flake lock nixconf
|
||||
sudo nixos-rebuild boot --flake nixconf
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
To test an update that hasn't been pushed:
|
||||
|
||||
```bash
|
||||
# Seriously, make a commit first!
|
||||
# Even a temporary one that will be ammended before pushing.
|
||||
git commit -a
|
||||
sudo nixos-rebuild boot --flake .
|
||||
sudo reboot
|
||||
```
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "sysupdate";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
nix-output-monitor nixos-rebuild home-manager
|
||||
];
|
||||
|
||||
text = ''
|
||||
NIXCONF="''${NIXCONF:-/etc/nixos}"
|
||||
echo Building config from flake at: "$NIXCONF" 1>&2
|
||||
if [[ "''${1:-}" == "home" ]]; then
|
||||
home-manager switch -L --flake "$NIXCONF" |& nom
|
||||
exit $?
|
||||
fi
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo Please rerun as root. 1>&2
|
||||
exit 1
|
||||
else
|
||||
nixos-rebuild switch --log-format internal-json -v --flake "$NIXCONF" |& nom --json && \
|
||||
exit $?
|
||||
fi
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue