checks: move ssh_keys to lib/ssh
All checks were successful
checks-impure / test (pull_request) Successful in 1m2s
checks / test (pull_request) Successful in 1m14s

This commit is contained in:
lassulus 2023-12-16 22:52:01 +01:00
parent 1eec814e4e
commit ae6f3fa7d7
4 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ in
services.sshd.enable = true; services.sshd.enable = true;
services.borgbackup.repos.testrepo = { services.borgbackup.repos.testrepo = {
authorizedKeys = [ authorizedKeys = [
(builtins.readFile ../borgbackup/borg_test.pub) (builtins.readFile ../lib/ssh/pubkey)
]; ];
}; };
}; };
@ -42,7 +42,7 @@ in
networking.hostName = "client"; networking.hostName = "client";
services.sshd.enable = true; services.sshd.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ users.users.root.openssh.authorizedKeys.keyFiles = [
../borgbackup/borg_test.pub ../lib/ssh/pubkey
]; ];
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ]; environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
environment.etc."install-closure".source = "${closureInfo}/store-paths"; environment.etc."install-closure".source = "${closureInfo}/store-paths";
@ -97,7 +97,7 @@ in
# setup # setup
client.succeed("mkdir -m 700 /root/.ssh") client.succeed("mkdir -m 700 /root/.ssh")
client.succeed( client.succeed(
"cat ${../borgbackup/borg_test} > /root/.ssh/id_ed25519" "cat ${../lib/ssh/privkey} > /root/.ssh/id_ed25519"
) )
client.succeed("chmod 600 /root/.ssh/id_ed25519") client.succeed("chmod 600 /root/.ssh/id_ed25519")
client.wait_for_unit("sshd", timeout=30) client.wait_for_unit("sshd", timeout=30)

View File

@ -9,7 +9,7 @@
services.openssh.enable = true; services.openssh.enable = true;
services.borgbackup.repos.testrepo = { services.borgbackup.repos.testrepo = {
authorizedKeys = [ authorizedKeys = [
(builtins.readFile ./borg_test.pub) (builtins.readFile ../lib/ssh/pubkey)
]; ];
}; };
} }
@ -22,7 +22,7 @@
enable = true; enable = true;
destinations.test = { destinations.test = {
repo = "borg@localhost:."; repo = "borg@localhost:.";
rsh = "ssh -i ${./borg_test} -o StrictHostKeyChecking=no"; rsh = "ssh -i ${../lib/ssh/privkey} -o StrictHostKeyChecking=no";
}; };
}; };
} }