devshell: Use nixos-rebuild instead of calling config directly

This commit is contained in:
Jack O'Sullivan 2022-09-09 14:08:37 +01:00
parent 926209d168
commit edfe38591b
2 changed files with 3 additions and 5 deletions

View File

@ -76,11 +76,8 @@ in
{ {
name = "build-n-switch"; name = "build-n-switch";
category = "tasks"; category = "tasks";
help = "Build NixOS configuration for the current host and run `switch-to-configuration`"; help = "Shortcut to nixos-rebuild for this flake";
command = '' command = ''doas nixos-rebuild --flake . "$@"'';
path="$(nix build --no-link --print-out-paths ".#nixosConfigurations.\"$(hostname)\".config.system.build.toplevel")"
doas "$path"/bin/switch-to-configuration "$@"
'';
} }
{ {
name = "run-vm"; name = "run-vm";

View File

@ -119,6 +119,7 @@ in
[ [
bash-completion bash-completion
vim vim
git
] ]
(mkIf config.services.netdata.enable [ netdata ]) (mkIf config.services.netdata.enable [ netdata ])
]; ];