From b9327a9e84c6027592688d974094361984aac372 Mon Sep 17 00:00:00 2001 From: Serenity-F Date: Fri, 29 Mar 2024 18:27:57 +1000 Subject: [PATCH] whoops, forgot to transfer over new hardware-configs --- hosts/proserpina/configuration.nix | 3 ++ hosts/proserpina/disko-config.nix | 59 ++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 hosts/proserpina/disko-config.nix diff --git a/hosts/proserpina/configuration.nix b/hosts/proserpina/configuration.nix index d6a8b0f..fee257f 100644 --- a/hosts/proserpina/configuration.nix +++ b/hosts/proserpina/configuration.nix @@ -4,6 +4,8 @@ imports = [ # Include the results of the hardware scan. + "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" + ./disko-config.nix ./hardware-configuration.nix ../../configuration.nix ]; @@ -11,6 +13,7 @@ # Enable swap on luks boot = { loader = { + systemd-boot.enable = true; efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot/efi"; diff --git a/hosts/proserpina/disko-config.nix b/hosts/proserpina/disko-config.nix new file mode 100644 index 0000000..ecc32ac --- /dev/null +++ b/hosts/proserpina/disko-config.nix @@ -0,0 +1,59 @@ +{ + disko.devices = { + disk = { + sda = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "defaults" + ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "pomegranate"; + # disable settings.keyFile if you want to use interactive password entry + #passwordFile = "/tmp/secret.key"; # Interactive + settings = { + allowDiscards = true; + #keyFile = "/tmp/secret.key"; + }; + # additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}