restart failed systemd services before switch config
This commit is contained in:
parent
3bb0338e78
commit
eab9ca2be4
2 changed files with 5 additions and 4 deletions
|
@ -388,11 +388,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669922957,
|
"lastModified": 1670092363,
|
||||||
"narHash": "sha256-YgVI2/16JVX1VPdH0XNjUjhtBfLV2UjH9urmMq8Clpk=",
|
"narHash": "sha256-88J+uN5plAW+SXnY/m3NCGlh5fdI4jxgKZlNmxFu2hQ=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "67c16e8ed612d40aee753927e39663b2d848eced",
|
"rev": "33e6908643adeddc8fbd9ba4a0280daa0d180558",
|
||||||
"revCount": 7,
|
"revCount": 8,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.pleshevski.ru/mynix/tools"
|
"url": "https://git.pleshevski.ru/mynix/tools"
|
||||||
},
|
},
|
||||||
|
|
|
@ -82,6 +82,7 @@
|
||||||
|
|
||||||
switch = lib.recurseIntoAttrs (lib.mapAttrs
|
switch = lib.recurseIntoAttrs (lib.mapAttrs
|
||||||
(hostname: machine: pkgs.writeShellScript "switch-${hostname}" ''
|
(hostname: machine: pkgs.writeShellScript "switch-${hostname}" ''
|
||||||
|
${pkgs.systemd}/bin/systemctl --user restart-failed
|
||||||
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
|
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
|
||||||
'')
|
'')
|
||||||
localMachines);
|
localMachines);
|
||||||
|
|
Loading…
Reference in a new issue