1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: split initrd-ssh into own selectable file

This commit is contained in:
oddlama 2023-03-13 20:12:53 +01:00
parent 0599c503dd
commit 811e770cb0
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 15 additions and 14 deletions

View file

@ -10,6 +10,7 @@
../../modules/core ../../modules/core
../../modules/hardware/intel.nix ../../modules/hardware/intel.nix
../../modules/initrd-ssh.nix
../../modules/efi.nix ../../modules/efi.nix
../../modules/zfs.nix ../../modules/zfs.nix

View file

@ -1,18 +1,4 @@
{ {
config,
name,
...
}: {
rekey.secrets.initrd_host_ed25519_key.file = ../../hosts/${name}/initrd_host_ed25519_key.age;
boot.initrd.network.enable = true;
boot.initrd.network.ssh = {
enable = true;
port = 4;
hostKeys = [config.rekey.secrets.initrd_host_ed25519_key.path];
};
services.sshd.enable = true;
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {

14
modules/initrd-ssh.nix Normal file
View file

@ -0,0 +1,14 @@
{
config,
name,
...
}: {
rekey.secrets.initrd_host_ed25519_key.file = ../hosts/${name}/initrd_host_ed25519_key.age;
boot.initrd.network.enable = true;
boot.initrd.network.ssh = {
enable = true;
port = 4;
hostKeys = [config.rekey.secrets.initrd_host_ed25519_key.path];
};
}