1
0
Fork 0
nixos-config/lib/update-system.nix
2020-05-27 15:20:24 +02:00

14 lines
325 B
Nix

{ pkgs, nixos-rebuild }:
let configPath = "/etc/nixos";
in {
update-system = pkgs.writeHaskellScript {
name = "update-system";
bins = [ nixos-rebuild ];
} ''
main = do
paths <- myNixPath "${configPath}"
args <- getArgs
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args)
'';
}