wifibackup: more tuning

This commit is contained in:
Motiejus Jakštys 2024-06-06 02:22:30 +03:00
parent 2cf9ce38d1
commit f6740477b5
3 changed files with 4 additions and 3 deletions

View File

@ -113,7 +113,7 @@
wifibackup = {
enable = true;
toPath = "/home/motiejus/M-Active/wifi";
toPath = "/home/${config.mj.username}/M-Active/.wifi";
toUser = config.mj.username;
};

View File

@ -74,7 +74,7 @@ in {
wifibackup = {
enable = true;
toPath = "/home/${config.mj.username}/M-Active/wifi";
toPath = "/home/${config.mj.username}/M-Active/.wifi";
toUser = config.mj.username;
};

View File

@ -33,13 +33,14 @@
Type = "oneshot";
User = "root";
SuccessExitStatus = [0 1];
RemainAfterExit = true;
};
script = ''
sed -i -E '/^(uuid|interface-name)=/d' ${fromPath}/*.nmconnection
exec ${pkgs.unison}/bin/unison \
-sshcmd ${pkgs.openssh}/bin/ssh \
-sshargs "-i /etc/ssh/ssh_host_ed25519_key -o KnownHostsCommand=\"${pkgs.coreutils}/bin/cat /etc/ssh/ssh_host_ed25519_key.pub\"" \
-sshargs "-i /etc/ssh/ssh_host_ed25519_key -o KnownHostsCommand=${pkgs.coreutils}/bin/cat\ /etc/ssh/ssh_host_ed25519_key.pub" \
-batch \
-backuploc local \
-backup "Name *" \