Update hosts/server/configuration.nix

This commit is contained in:
2026-03-27 19:48:50 +00:00
parent 4b37d36212
commit fd592ba5de
+20 -20
View File
@@ -59,30 +59,30 @@ services.nfs.server = {
}; };
systemd.services.backup = { # systemd.services.backup = {
description = "Backup data"; # description = "Backup data";
wantedBy = [ "multi-user.target" ]; # wantedBy = [ "multi-user.target" ];
serviceConfig = { # serviceConfig = {
Type = "oneshot"; # Type = "oneshot";
User = "root"; # User = "root";
# WorkingDirectory = "/home/nixos/scripts"; # WorkingDirectory = "/home/nixos/scripts";
ExecStart = "${pkgs.bash}/bin/bash -e /srv/scripts/rsync.sh"; # ExecStart = "${pkgs.bash}/bin/bash -e /srv/scripts/rsync.sh";
StandardOutput = "journal"; # StandardOutput = "journal";
StandardError = "journal"; # StandardError = "journal";
}; # };
path = with pkgs; [ bash rsync openssh coreutils ]; #path = with pkgs; [ bash rsync openssh coreutils ];
}; # };
systemd.timers.backup = { #systemd.timers.backup = {
description = "Daily backup"; # description = "Daily backup";
wantedBy = [ "timers.target" ]; # wantedBy = [ "timers.target" ];
timerConfig = { # timerConfig = {
OnUnitActiveSec = "1d"; # Run every day after last run # OnUnitActiveSec = "1d"; # Run every day after last run
Persistent = true; # Catch up if system was off # Persistent = true; # Catch up if system was off
}; # };
}; #};
networking.wireguard.enable = true; networking.wireguard.enable = true;
networking.wireguard.interfaces.wg0 = { networking.wireguard.interfaces.wg0 = {