update home manager automatically on all servers
1 file changed, 20 insertions(+), 1 deletion(-)
changed files
M system/roles/server.nix → system/roles/server.nix
@@ -1,4 +1,9 @@ -{ ... }: +{ + config, + pkgs, + lib, + ... +}: { imports = [ ../settings/configuration/nix-linux.nix@@ -26,4 +31,18 @@ services.journald.extraConfig = '' MaxRetentionSec=1 month ''; + + systemd.services.update-home-manager = { + startAt = "weekly"; + path = with pkgs; [ + openssh + nix + git + ]; + serviceConfig = rec { + Type = "oneshot"; + User = "alin"; + ExecStart = "${lib.getExe pkgs.home-manager} switch --flake git+https://git.alin.ovh/nixfiles?submodules=1#${User}@%H"; + }; + }; }