Skip to content

Commit

Permalink
nix: add ssh key for hostKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
benmezger committed Jan 27, 2025
1 parent 3dc3bdd commit be6c570
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions chezmoi/.chezmoi.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,5 @@ data:
openai_token: op://3kygcny5whqjpzj5nq72uu6kua/mulbti6akdit5tdwdfyvgeovvy/credential
github_i3_repo_token: op://3kygcny5whqjpzj5nq72uu6kua/dsoe27jnupc4stsbvnmqsygq2i/credential
libera_passwd: op://3kygcny5whqjpzj5nq72uu6kua/xtcoye3olsb73o5qroxdt3jsx4/password
nixos_ssh: op://3kygcny5whqjpzj5nq72uu6kua/jskgbl7j5kpb4b7kj6vyn4k3ni
{{- end -}}
1 change: 1 addition & 0 deletions chezmoi/dot_ssh/nixos_rsa.pub.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ onepasswordRead (join "/" (list .onepassword.nixos_ssh "public_key")) }}
1 change: 1 addition & 0 deletions chezmoi/dot_ssh/nixos_rsa.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ onepasswordRead (join "/" (list .onepassword.nixos_ssh "private_key")) }}
4 changes: 2 additions & 2 deletions hosts/default/bootloader.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# to prevent connection drop
# fixes: usb 1-10.2: 3:1: cannot get freq at ep 0x3
"usbhid.quirks=0x1532:0x00ab:0x00000400"
"ip=192.168.0.168::192.168.0.1:255.255.255.0:${userConf.hostname}.local::none"
"ip=192.168.0.168::192.168.0.1:255.255.255.0:${userConf.hostname}.grub::none"
];
supportedFilesystems = [ "btrfs" ];
kernelModules = [
Expand All @@ -36,7 +36,7 @@
enable = true;
port = 22;
authorizedKeys = userConf.sshKeys;
hostKeys = [ "/etc/secrets/initrd/host_rsa_key" ];
hostKeys = [ "/home/${userConf.username}/.ssh/nixos_rsa" ];
};
};
availableKernelModules = [
Expand Down

0 comments on commit be6c570

Please sign in to comment.