From c173ba14047be32e5bc702a1116ff4cd4a9a297c Mon Sep 17 00:00:00 2001 From: server Date: Wed, 16 Oct 2024 18:06:17 +0000 Subject: [PATCH] snapshot --- hosts/supernova/default.nix | 20 +++++++++++--------- hosts/supernova/hardware-configuration.nix | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hosts/supernova/default.nix b/hosts/supernova/default.nix index a1ba071..c433aeb 100644 --- a/hosts/supernova/default.nix +++ b/hosts/supernova/default.nix @@ -18,30 +18,32 @@ system.stateVersion = "24.05"; # FDE stuff - + networking.firewall.allowedTCPPorts = [ 2222 ]; + systemd.services.sshd.wantedBy = [ "cryptsetup.target" ]; + networking.useDHCP = true; boot.initrd = { availableKernelModules = [ "virtio-pci" ]; secrets = {"/root/initrd-ssh-key" = "/root/initrd-ssh-key";}; network = { - udhcpc.enable = true; - flushBeforeStage2 = true; + #udhcpc.enable = true; + #flushBeforeStage2 = true; enable = true; ssh = { enable = true; port = 2222; - hostKeys = [ /boot/initrd/ssh_host_rsa_key ]; + hostKeys = [ /root/initrd-ssh-key ]; # this includes the ssh keys of all users in the wheel group, but you can just specify some keys manually # authorizedKeys = [ "ssh-rsa ..." ]; authorizedKeys = with lib; concatLists (mapAttrsToList (name: user: if elem "wheel" user.extraGroups then user.openssh.authorizedKeys.keys else []) config.users.users); }; - postCommands = '' - echo 'cryptsetup-askpass' >> /root/.profile - ''; + #postCommands = '' + # echo 'cryptsetup-askpass' >> /root/.profile + #''; + }; }; - } -} \ No newline at end of file +} diff --git a/hosts/supernova/hardware-configuration.nix b/hosts/supernova/hardware-configuration.nix index 816c6f9..626e5ad 100644 --- a/hosts/supernova/hardware-configuration.nix +++ b/hosts/supernova/hardware-configuration.nix @@ -14,7 +14,7 @@ boot.extraModulePackages = [ ]; boot.initrd.systemd.enable = true; - #boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/db8a5cf9-c54b-4e6a-b3f9-e6323eb962a6"; + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/db8a5cf9-c54b-4e6a-b3f9-e6323eb962a6"; fileSystems."/" = { device = "/dev/disk/by-uuid/4f7afb2d-a730-4a0c-a9e4-92d75ebd1540"; @@ -40,4 +40,4 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} \ No newline at end of file +}