initrd: take publicKeys from flake config

This commit is contained in:
Benjamin Yule Bädorf 2024-03-25 19:12:45 +01:00
parent 5c13335a52
commit f3804d23cc
Signed by: b12f
GPG key ID: 729956E1124F8F26
3 changed files with 5 additions and 3 deletions

View file

@ -29,7 +29,7 @@ in {
ssh = { ssh = {
enable = true; enable = true;
port = 2222; port = 2222;
authorizedKeys = psCfg.user.publicKeys; authorizedKeys = flake.self.publicKeys;
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"]; hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
shell = "/bin/cryptsetup-askpass"; shell = "/bin/cryptsetup-askpass";
}; };

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
lib, lib,
flake,
... ...
}: }:
with lib; let with lib; let
@ -25,7 +26,7 @@ in {
enable = true; enable = true;
port = 2222; port = 2222;
hostKeys = [ /boot/initrd-ssh-key ]; hostKeys = [ /boot/initrd-ssh-key ];
authorizedKeys = psCfg.user.publicKeys; authorizedKeys = flake.self.publicKeys;
shell = "/bin/cryptsetup-askpass"; shell = "/bin/cryptsetup-askpass";
}; };
postCommands = '' postCommands = ''

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
lib, lib,
flake,
... ...
}: }:
with lib; let with lib; let
@ -34,7 +35,7 @@ in {
ssh = { ssh = {
enable = true; enable = true;
port = 2222; port = 2222;
authorizedKeys = psCfg.user.publicKeys; authorizedKeys = flake.self.publicKeys;
hostKeys = ["/etc/secrets/initrd/ssh_host_ed25519_key"]; hostKeys = ["/etc/secrets/initrd/ssh_host_ed25519_key"];
shell = "/bin/cryptsetup-askpass"; shell = "/bin/cryptsetup-askpass";
}; };