Improve update-structure
This commit is contained in:
parent
5bd58d4305
commit
a5e1361adc
|
@ -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"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue