Luks SSH cleanup + disable console on eidola
This commit is contained in:
parent
134d049a7b
commit
a077e98cf3
|
@ -70,12 +70,13 @@
|
||||||
|
|
||||||
# My modules
|
# My modules
|
||||||
gen.hardening.disableSack = true;
|
gen.hardening.disableSack = true;
|
||||||
|
gen.hardening.disableConsole = true;
|
||||||
gen.bootloader.luksSsh = {
|
gen.bootloader.luksSsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
useDhcp = true;
|
||||||
port = 48722;
|
port = 48722;
|
||||||
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
|
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
|
||||||
};
|
};
|
||||||
boot.initrd.network.udhcpc.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,7 @@ in {
|
||||||
gen.hardening.disableSack = true;
|
gen.hardening.disableSack = true;
|
||||||
gen.bootloader.luksSsh = {
|
gen.bootloader.luksSsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
useDhcp = false;
|
||||||
port = 48722;
|
port = 48722;
|
||||||
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
|
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,8 @@ with lib; let
|
||||||
cfg = baseCfg.luksSsh;
|
cfg = baseCfg.luksSsh;
|
||||||
in {
|
in {
|
||||||
options.gen.bootloader.luksSsh = {
|
options.gen.bootloader.luksSsh = {
|
||||||
enable = mkEnableOption "use boot process with luks unlock over ssh";
|
enable = mkEnableOption "boot process with luks unlock over ssh";
|
||||||
|
useDhcp = mkEnableOption "dhcp";
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.port;
|
type = types.port;
|
||||||
description = "port for ssh server to listen on";
|
description = "port for ssh server to listen on";
|
||||||
|
@ -20,22 +21,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# ### Use systemd-boot ###
|
|
||||||
# boot.loader = {
|
|
||||||
# efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# timeout = 2;
|
|
||||||
# systemd-boot = {
|
|
||||||
# enable = true;
|
|
||||||
# configurationLimit = 3;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
### LUKS unlock through SSH ###
|
### LUKS unlock through SSH ###
|
||||||
boot.initrd = {
|
boot.initrd.network = {
|
||||||
network = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
flushBeforeStage2 = true;
|
flushBeforeStage2 = true;
|
||||||
|
udhcpc.enable = cfg.useDhcp;
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -49,5 +39,4 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue