misc: initial commit

This commit is contained in:
Emily 2024-12-28 19:33:49 -05:00
commit 964b99b28d
32 changed files with 1675 additions and 0 deletions

69
nixos/disk-config.nix Normal file
View file

@ -0,0 +1,69 @@
{
# checkout the example folder for how to configure different disko layouts
disko.devices = {
disk.fw16-2280 = {
device = "/dev/disk/by-path/pci-0000:05:00.0-nvme-1";
content = {
type = "gpt";
partitions = {
esp = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["noatime" "fmask=0077" "dmask=0077"];
};
};
cryptall = {
size = "100%";
content = {
type = "luks";
name = "all";
settings = {
# allowDiscards = true;
# keyFile = "/tmp/secret.key";
};
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
# System state which should be persistent across reboots and possibly backed up.
"/@nixos-persist" = {
mountpoint = "/persist";
mountOptions = ["noatime" "compress=zstd"];
};
# Im not so interested in backing up logs but I want them to be preserved across reboots,
# so Im dedicating a subvolume to logs rather than using the persist subvolume.
"/@nixos-varlog" = {
mountpoint = "/var/log";
mountOptions = ["noatime" "compress=zstd"];
};
# Needs to be persistent but is not worth backing up, as its trivial to reconstruct.
"/@nixos-nix" = {
mountpoint = "/nix";
mountOptions = ["noatime" "compress=zstd"];
};
"/@data" = {
mountpoint = "/data";
mountOptions = ["noatime" "compress=zstd"];
};
"/@home-evar" = {
mountpoint = "/home/evar";
mountOptions = ["noatime" "compress=zstd"];
};
};
};
};
};
};
};
};
nodev."/" = {
fsType = "tmpfs";
mountOptions = ["size=25%" "mode=755"];
};
};
}