Second attempt at booting NixOS on curacao directly

This commit is contained in:
Geoffrey Frogeye 2023-12-16 13:51:53 +01:00
parent 6f9de6cc4c
commit 5ec571ecbd
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 18 additions and 21 deletions

View file

@ -1,6 +1,5 @@
{ passwordFile ? "/should_not_be_needed_in_this_context", ... }: { passwordFile ? "/should_not_be_needed_in_this_context", ... }:
# FIXME Subvolumes for backup. If they're not created with the script. Add the script btw. # FIXME Subvolumes for backup. If they're not created with the script. Add the script btw.
# FIXME Make it work for NixOS, duh
# TODO Not relatime everywhere, thank you # TODO Not relatime everywhere, thank you
# TODO Default options # TODO Default options
let let
@ -22,13 +21,11 @@ in
type = "gpt"; type = "gpt";
partitions = { partitions = {
swap = { swap = {
priority = 1; priority = 10;
start = "2048"; start = "2048";
size = "8G"; size = "6G";
content = { content = {
type = "swap"; type = "swap";
# I don't think I really saw this one being used, maybe we
# could reduce it to get more /boot space.
randomEncryption = true; randomEncryption = true;
# TODO NixOS documentation says not to use this with # TODO NixOS documentation says not to use this with
# hibernation, as it can't set the partition where the # hibernation, as it can't set the partition where the
@ -38,8 +35,17 @@ in
# Untranslated options from /etc/fstab: defaults,pri=100 # Untranslated options from /etc/fstab: defaults,pri=100
}; };
}; };
nixosboot = {
priority = 15;
size = "2G";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
esp = { esp = {
priority = 2; priority = 20;
size = "128M"; size = "128M";
type = "EF00"; # EFI system partition type = "EF00"; # EFI system partition
content = { content = {
@ -61,7 +67,7 @@ in
}; };
}; };
boot = { boot = {
priority = 3; priority = 30;
size = "128M"; size = "128M";
content = { content = {
type = "luks"; type = "luks";
@ -85,7 +91,7 @@ in
}; };
}; };
main = { main = {
priority = 4; priority = 40;
content = { content = {
type = "luks"; type = "luks";
name = "razmo"; name = "razmo";
@ -117,14 +123,14 @@ in
type = "gpt"; type = "gpt";
partitions = { partitions = {
swap = { swap = {
priority = 1; priority = 10;
start = "2048"; start = "2048";
size = "8G"; size = "8G";
type = "8200"; # Linux swap type = "8200"; # Linux swap
content = { content = {
type = "luks"; type = "luks";
name = "rapswap"; name = "rapswap";
initrdUnlock = true; initrdUnlock = false;
settings = { settings = {
keyFile = "/etc/keys/rapswap"; keyFile = "/etc/keys/rapswap";
allowDiscards = true; allowDiscards = true;
@ -137,7 +143,7 @@ in
}; };
}; };
main = { main = {
priority = 2; priority = 20;
content = { content = {
type = "luks"; type = "luks";
name = "rapido"; name = "rapido";
@ -163,16 +169,13 @@ in
mountOptions = btrfs_args_ssd; mountOptions = btrfs_args_ssd;
}; };
"home.rapido" = { "home.rapido" = {
mountpoint = "/home.old"; mountpoint = "/mnt/old/home";
mountOptions = btrfs_args_ssd; mountOptions = btrfs_args_ssd;
}; };
nix = { nix = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = btrfs_args_ssd; mountOptions = btrfs_args_ssd;
}; };
nixosboot = {
mountpoint = "/boot";
};
nixos = { nixos = {
mountpoint = "/"; mountpoint = "/";
}; };

View file

@ -9,12 +9,7 @@
networking.hostName = "curacao"; networking.hostName = "curacao";
boot = { boot = {
initrd.secrets = {
"/etc/keys/rapido" = "/etc/keys/rapido";
"/etc/keys/rapswap" = "/etc/keys/rapswap";
};
loader = { loader = {
grub.enableCryptodisk = true;
efi.efiSysMountPoint = "/efi"; efi.efiSysMountPoint = "/efi";
}; };
}; };

View file

@ -625,7 +625,6 @@ in
network = { network = {
listenAddress = "0.0.0.0"; # So it can be controlled from home listenAddress = "0.0.0.0"; # So it can be controlled from home
# TODO ... and whoever is the Wi-Fi network I'm using, which, not great # TODO ... and whoever is the Wi-Fi network I'm using, which, not great
port = 8601; # FIXME Chose a different one for testing, should revert
startWhenNeeded = true; startWhenNeeded = true;
}; };
extraConfig = '' extraConfig = ''