Update hosts/server/configuration.nix
This commit is contained in:
@@ -59,30 +59,30 @@ services.nfs.server = {
|
||||
};
|
||||
|
||||
|
||||
systemd.services.backup = {
|
||||
description = "Backup data";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# systemd.services.backup = {
|
||||
# description = "Backup data";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "root";
|
||||
# WorkingDirectory = "/home/nixos/scripts";
|
||||
ExecStart = "${pkgs.bash}/bin/bash -e /srv/scripts/rsync.sh";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
};
|
||||
path = with pkgs; [ bash rsync openssh coreutils ];
|
||||
};
|
||||
# ExecStart = "${pkgs.bash}/bin/bash -e /srv/scripts/rsync.sh";
|
||||
# StandardOutput = "journal";
|
||||
# StandardError = "journal";
|
||||
# };
|
||||
#path = with pkgs; [ bash rsync openssh coreutils ];
|
||||
# };
|
||||
|
||||
|
||||
systemd.timers.backup = {
|
||||
description = "Daily backup";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnUnitActiveSec = "1d"; # Run every day after last run
|
||||
Persistent = true; # Catch up if system was off
|
||||
};
|
||||
};
|
||||
#systemd.timers.backup = {
|
||||
# description = "Daily backup";
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnUnitActiveSec = "1d"; # Run every day after last run
|
||||
# Persistent = true; # Catch up if system was off
|
||||
# };
|
||||
#};
|
||||
|
||||
networking.wireguard.enable = true;
|
||||
networking.wireguard.interfaces.wg0 = {
|
||||
|
||||
Reference in New Issue
Block a user