add sc-check script

This commit is contained in:
Sean Buckley 2022-06-21 23:28:28 -04:00
parent 0aebdd8fd9
commit 7500b12ed9

View file

@ -27,7 +27,14 @@ in
systemd.tmpfiles.rules = [ "e /home/sean/Downloads - - - 9d" ]; systemd.tmpfiles.rules = [ "e /home/sean/Downloads - - - 9d" ];
environment.systemPackages = map environment.systemPackages =
[
(pkgs.writeShellScriptBin "sc-check" ''
readlink /run/current-system
nix eval --raw "bck#nixosConfigurations.$(hostname).config.system.build.toplevel"
'')
]
++ map
(x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake bck")) (x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake bck"))
[ "boot" "build" "switch" "test" ]; [ "boot" "build" "switch" "test" ];