1
0
Fork 0

Improve update-structure

This commit is contained in:
Malte Brandy 2019-08-02 05:28:31 +02:00
parent 5bd58d4305
commit a5e1361adc
3 changed files with 4 additions and 11 deletions

View file

@ -18,14 +18,4 @@ in rec {
args <- getArgs
nixos_rebuild (paths ++ ["switch"] ++ args)
'';
system-maintenance = writeHaskellScript {
name = "system-maintenance";
bins = [ pkgs.nix pkgs.git update-system ];
} ''
main = do
git "-C" "${configPath}" "pull"
update_system
nix_collect_garbage "--delete-older-than" "${toString gcRetentionDays}d"
nix "optimise-store"
'';
}

View file

@ -53,7 +53,9 @@ in rec {
maintenance = pkgs.writeShellScriptBin "maintenance" ''
git -C ~/git/nixos/config pull
update-home
sudo -A system-maintenance
sudo -A update-system
sudo -A nix_collect_garbage --delete-older-than ${toString gcRetentionDays}d
nix optimise-store
'';
rewlan = pkgs.writeShellScriptBin "rewlan" ''
nmcli r wifi off;

View file

@ -14,6 +14,7 @@
Type = "oneshot";
script = ''
${(import ../lib/test.nix).test-config}/bin/test-config
sudo -u maralorn git -C /home/maralorn/git/nixos/config pull
${
(import ../lib/update-system.nix
config.system.build.nixos-rebuild).update-system