From 18bd52a23b5b3a5e780ec6e9ba2053ec98d57139 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 15 Feb 2023 16:42:27 +0100 Subject: [PATCH] Install NixOS on Hikari No dual boot this time. But hibernate. --- systems/hikari/configuration.nix | 12 +++++++++--- systems/hikari/hardware-configuration.nix | 12 +++++++----- systems/hikari/web-development/lib/mkcert.nix | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/systems/hikari/configuration.nix b/systems/hikari/configuration.nix index 39c0d0b..6d362b7 100644 --- a/systems/hikari/configuration.nix +++ b/systems/hikari/configuration.nix @@ -24,9 +24,15 @@ }; }; - # Setup keyfile - initrd.secrets = { - "/crypto_keyfile.bin" = null; + initrd = { + # Setup keyfile + secrets = { + "/crypto_keyfile.bin" = null; + }; + luks.devices."luks-77a26fd0-f3c7-4eca-be5e-dba6b6c66e4f" = { + device = "/dev/disk/by-uuid/77a26fd0-f3c7-4eca-be5e-dba6b6c66e4f"; + keyFile = "/crypto_keyfile.bin"; + }; }; }; diff --git a/systems/hikari/hardware-configuration.nix b/systems/hikari/hardware-configuration.nix index 81bbd0c..e03fe5d 100644 --- a/systems/hikari/hardware-configuration.nix +++ b/systems/hikari/hardware-configuration.nix @@ -15,25 +15,27 @@ boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/bb322f78-2e67-41dc-9385-8a5fe9abb103"; + { device = "/dev/disk/by-uuid/3b35e5dd-4b81-4b32-b572-96f1301ac1ef"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-4bbd7327-2cd7-4aed-90ea-32030abdc894".device = "/dev/disk/by-uuid/4bbd7327-2cd7-4aed-90ea-32030abdc894"; + boot.initrd.luks.devices."luks-1ad0b141-874e-42c5-9c36-08144b3b6e7a".device = "/dev/disk/by-uuid/1ad0b141-874e-42c5-9c36-08144b3b6e7a"; fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/67E3-17ED"; + { device = "/dev/disk/by-uuid/8EE4-E230"; fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = + [ { device = "/dev/disk/by-uuid/86be72da-47ff-404f-a4ba-e078ea151e99"; } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s20u1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s20u2.useDHCP = lib.mkDefault true; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/systems/hikari/web-development/lib/mkcert.nix b/systems/hikari/web-development/lib/mkcert.nix index ccd8e5e..6598136 100644 --- a/systems/hikari/web-development/lib/mkcert.nix +++ b/systems/hikari/web-development/lib/mkcert.nix @@ -44,6 +44,7 @@ in { ]; # NOTE: Disable until root certificate is generated, then add again + # Maybe check for file existense and throw proper error message? security.pki.certificates = [ (builtins.readFile "${config.custom.web-development.certFolder}rootCA.pem") ];