restart failed systemd services before switch config

This commit is contained in:
Dmitriy Pleshevskiy 2022-12-07 13:17:59 +03:00
parent 3bb0338e78
commit eab9ca2be4
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 5 additions and 4 deletions

View file

@ -388,11 +388,11 @@
]
},
"locked": {
"lastModified": 1669922957,
"narHash": "sha256-YgVI2/16JVX1VPdH0XNjUjhtBfLV2UjH9urmMq8Clpk=",
"lastModified": 1670092363,
"narHash": "sha256-88J+uN5plAW+SXnY/m3NCGlh5fdI4jxgKZlNmxFu2hQ=",
"ref": "refs/heads/main",
"rev": "67c16e8ed612d40aee753927e39663b2d848eced",
"revCount": 7,
"rev": "33e6908643adeddc8fbd9ba4a0280daa0d180558",
"revCount": 8,
"type": "git",
"url": "https://git.pleshevski.ru/mynix/tools"
},

View file

@ -82,6 +82,7 @@
switch = lib.recurseIntoAttrs (lib.mapAttrs
(hostname: machine: pkgs.writeShellScript "switch-${hostname}" ''
${pkgs.systemd}/bin/systemctl --user restart-failed
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
'')
localMachines);