diff --git a/pindakaas/hardware.nix b/pindakaas/hardware.nix index 0dc278b..d91bb76 100644 --- a/pindakaas/hardware.nix +++ b/pindakaas/hardware.nix @@ -9,6 +9,9 @@ # nixos-hardware use latest kernel by default. It has been set a while ago, we maybe don't need it anymore? kernelPackages = pkgs.linuxPackages; + # Otherwise it will not show stage1 echo and prompt + kernelParams = ["console=tty0"]; + # Pinebook supports UEFI, at least when tow-boot is installed on the SPI loader = { # EFI Variables don't work (no generation appears in systemd-boot) diff --git a/pindakaas_sd/disko-desired.nix b/pindakaas_sd/disko-desired.nix deleted file mode 100644 index e31c34f..0000000 --- a/pindakaas_sd/disko-desired.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - disko.devices = { - disk = { - pindakaas_sd = { - type = "disk"; - device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99"; - content = { - type = "gpt"; - partitions = { - ESP = { - # Needs enough to store multiple kernel generations - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "defaults" - ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "pindakaas_sd"; - #passwordFile = "/tmp/secret.key"; # Commented out so asked interactively - settings = { - # Not having SSDs die fast is more important than crypto - # nerds that could potentially discover which filesystem I - # use from TRIM patterns - allowDiscards = true; - }; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/nixos" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" "relatime" ]; - }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - # Maybe later - # "/swap" = { - # mountpoint = "/.swapvol"; - # swap.swapfile.size = "20M"; - # }; - }; - }; - }; - }; - }; - }; - }; - }; - } diff --git a/pindakaas_sd/disko-hanging.nix b/pindakaas_sd/disko-hanging.nix deleted file mode 100644 index 187c6db..0000000 --- a/pindakaas_sd/disko-hanging.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - disko.devices = { - disk = { - vdb = { - type = "disk"; - device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted"; - settings.allowDiscards = true; - passwordFile = "/tmp/secret.key"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/pindakaas_sd/disko-working.nix b/pindakaas_sd/disko-working.nix deleted file mode 100644 index 8b682eb..0000000 --- a/pindakaas_sd/disko-working.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - disko.devices = { - disk = { - vdb = { - type = "disk"; - device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/pindakaas_sd/disko.nix b/pindakaas_sd/disko.nix deleted file mode 120000 index 5ce14d9..0000000 --- a/pindakaas_sd/disko.nix +++ /dev/null @@ -1 +0,0 @@ -disko-hanging.nix \ No newline at end of file diff --git a/pindakaas_sd/disko.nix b/pindakaas_sd/disko.nix new file mode 100644 index 0000000..58afe2e --- /dev/null +++ b/pindakaas_sd/disko.nix @@ -0,0 +1,65 @@ +{ + disko.devices = { + disk = { + pindakaas_sd = { + type = "disk"; + device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99"; + content = { + type = "gpt"; + partitions = { + ESP = { + # Needs enough to store multiple kernel generations + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "defaults" + ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "pindakaas_sd"; + passwordFile = "/tmp/secret.key"; # TODO Generate this somehow + settings = { + # Not having SSDs die fast is more important than crypto + # nerds that could potentially discover which filesystem I + # use from TRIM patterns + allowDiscards = true; + }; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/nixos" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "relatime" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + # Maybe later + # "/swap" = { + # mountpoint = "/.swapvol"; + # swap.swapfile.size = "20M"; + # }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/pindakaas_sd/hybrid b/pindakaas_sd/hybrid new file mode 120000 index 0000000..5060844 --- /dev/null +++ b/pindakaas_sd/hybrid @@ -0,0 +1 @@ +/nix/store/bz6nqy0ky5l33rfrkb6k66bzkgw18k90-nixos-system-pindakaas_sd-23.05.4981.5b528f99f73c \ No newline at end of file diff --git a/pindakaas_sd/options.nix b/pindakaas_sd/options.nix deleted file mode 100644 index d825514..0000000 --- a/pindakaas_sd/options.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: -{ - # Barebones is faster to test partition schemes - frogeye.dev.ansible = false; - frogeye.dev.python = false; -} diff --git a/pindakaas_sd/os.nix b/pindakaas_sd/os.nix index 869e1de..351874c 100644 --- a/pindakaas_sd/os.nix +++ b/pindakaas_sd/os.nix @@ -1,15 +1,11 @@ { pkgs, config, ... }: { imports = [ - # START DEBUG - # ../os - # ./options.nix - "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/3cb78c93e6a02f494aaf6aeb37481c27a2e2ee22.tar.gz"}/module.nix" - # END DEBUG + ../os + ../pindakaas/options.nix ../pindakaas/hardware.nix ./disko.nix ]; - nixpkgs.config.allowUnfree = true; # DEBUG networking.hostName = "pindakaas_sd"; }