Reorganize configuration root
While I might still bikeshed how the rest of the configuration is sourced, at least the import points should be stable.
This commit is contained in:
parent
dd6f579f74
commit
6444f8f517
21 changed files with 169 additions and 77 deletions
101
pindakaas_sd/disko.nix
Normal file
101
pindakaas_sd/disko.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
# content = {
|
||||
# type = "filesystem";
|
||||
# format = "ext4";
|
||||
# mountpoint = "/";
|
||||
# };
|
||||
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";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
# FIXME Hang on Linux boot, for some reason
|
||||
# luks = {
|
||||
# size = "100%";
|
||||
# content = {
|
||||
# type = "luks";
|
||||
# name = "pindakaas_sd";
|
||||
# # disable settings.keyFile if you want to use interactive password entry
|
||||
# #passwordFile = "/tmp/secret.key"; # Interactive
|
||||
# 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;
|
||||
# # keyFile = "/tmp/secret.key";
|
||||
# fallbackToPassword = true; # TEST
|
||||
# };
|
||||
# # additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
# 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";
|
||||
# # };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
pindakaas_sd/options.nix
Normal file
6
pindakaas_sd/options.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
# Barebones is faster to test partition schemes
|
||||
frogeye.dev.ansible = false;
|
||||
frogeye.dev.python = false;
|
||||
}
|
11
pindakaas_sd/os.nix
Normal file
11
pindakaas_sd/os.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
../os
|
||||
../pindakaas/hardware.nix
|
||||
./disko.nix
|
||||
./options.nix
|
||||
];
|
||||
|
||||
networking.hostName = "pindakaas_sd";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue