ssh config (nas and hedgehog)

This commit is contained in:
Daniel Langbein 2023-11-18 13:01:18 +01:00
parent f423383ca2
commit e3c872513c
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
8 changed files with 34 additions and 7 deletions

1
assets/ssh/hedgehog.pub Normal file
View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP2bFyRVKNc0gr3TXW8wRXXkD0k/OkzsI3vpgrA1YV1p root@yodaHedgehog

View File

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJi1BMzoSM0msvtKwoOzySYuKTpFCAanHYWQjL0tZhDI root@odroid

View File

@ -28,8 +28,8 @@ in
instance = "remote-backup-ssd";
enable = false;
lz4 = false;
ssh_identity = "/mnt/backup/rootNas_ed25519";
volume = "ssh://rootnas/jc-data";
ssh_identity = "/root/.ssh/rootNas_ed25519";
volume = "ssh://rootNas/jc-data";
snapshot_dir = "/snap";
target = "/mnt/backup/snap";
subvolume = ssd-subvolumes;
@ -38,8 +38,8 @@ in
instance = "remote-backup-hdd";
enable = false;
lz4 = false;
ssh_identity = "/mnt/backup/rootNas_ed25519";
volume = "ssh://rootnas/mnt/data/jc-data";
ssh_identity = "/root/.ssh/rootNas_ed25519";
volume = "ssh://rootNas/mnt/data/jc-data";
snapshot_dir = "/mnt/data/snap2";
target = "/mnt/backup/snap2";
subvolume = hdd-subvolumes;

View File

@ -13,6 +13,7 @@
#../../modules/git.nix
../../modules/zsh.nix
#../../modules/ssh-client.nix
./ssh-client-root.nix
../../modules/ssh-server.nix
../../modules/sendmail-mta.nix

View File

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
home-manager.users.root = { osConfig, config, pkgs, ... }: {
# SSH client configuration.
programs.ssh = {
enable = true;
userKnownHostsFile = "~/.ssh/known_hosts ${../../assets/ssh/known_hosts}";
matchBlocks = {
"rootNas" = {
hostname = "p1st.de";
user = "root";
port = 2222;
compression = false;
identityFile = "~/.ssh/rootNas_ed25519";
};
};
};
};
}

View File

@ -275,7 +275,7 @@ volume ssh://rootNas/jc-data
subvolume recipe.privacy1st.de
subvolume traggo.privacy1st.de
volume ssh://rootNas/mnt/data/jc-data
snapshot_dir /mnt/data/snap
snapshot_dir /mnt/data/snap2
target /mnt/backup/snap2
subvolume cloud.privacy1st.de
subvolume cloud.media-kollektiv.eu

View File

@ -24,4 +24,9 @@ in
/* https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion */
home.stateVersion = "23.05";
};
home-manager.users.root = { osConfig, config, pkgs, ... }: {
/* The home.stateVersion option does not have a default and must be set */
/* https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion */
home.stateVersion = "23.05";
};
}

View File

@ -28,7 +28,7 @@
(builtins.readFile ../assets/ssh/nitrokey.pub)
] ++ (
if (config.networking.hostName == "yodaNas")
then [(builtins.readFile ../assets/ssh/pi3bplus.pub)]
then [(builtins.readFile ../assets/ssh/hedgehog.pub)]
else []
);
}