Prophet prep

This commit is contained in:
Jimbo 2025-01-01 18:42:31 -05:00
parent c7d6148cff
commit 26c14a5b7c
6 changed files with 61 additions and 144 deletions

View file

@ -23,6 +23,6 @@
../../../variables ../../../variables
]; ];
networking.hostName = "bomberman"; networking.hostName = "prophet";
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.19/24" ]; networking.wireguard.interfaces.wgc.ips = [ "10.100.0.19/24" ];
} }

View file

@ -1,96 +0,0 @@
{ disko, config, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "${config.networking.hostName}-disk";
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "${config.networking.hostName}";
};
};
};
};
};
};
};
lvm_vg = {
"${config.networking.hostName}" = {
type = "lvm_vg";
lvs = {
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/prev" = {
mountpoint = "/prev";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/persist/.snapshots" = { };
"/jimbo" = {
mountpoint = "/persist/home/jimbo";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/jimbo/.snapshots" = { };
};
};
};
swap = {
size = "8G";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
# Needed for impermanence
fileSystems = {
"/persist".neededForBoot = true;
"/persist/home/jimbo".neededForBoot = true;
};
}

View file

@ -0,0 +1,44 @@
{ ... }:
{
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@" ];
};
"/home" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
"/var" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@var" ];
};
"/.snapshots" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@snapshots" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/7C94-8C9A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/export/Bulk" = {
device = "/dev/disk/by-uuid/ef465845-cc56-4db5-9260-8ae515eb025e";
fsType = "btrfs";
noCheck = true;
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/7e8c773d-c8f4-4dd8-a835-bde78e5b6760"; }
];
}

View file

@ -1,51 +1,7 @@
{ config, lib, pkgs, modulesPath, ... }: { lib, ... }:
{ {
boot.initrd = { boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" ];
availableKernelModules = [ "xhci_pci" "virtio_scsi" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
kernelModules = [ "dm-snapshot" ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@" ];
};
"/home" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
"/var" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@var" ];
};
"/snapshots" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@snapshots" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/7C94-8C9A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/export/Bulk" = {
device = "/dev/disk/by-uuid/ef465845-cc56-4db5-9260-8ae515eb025e";
fsType = "btrfs";
noCheck = true;
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/7e8c773d-c8f4-4dd8-a835-bde78e5b6760"; }
];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";

View file

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./jimbo ];
}

View file

@ -0,0 +1,9 @@
{ lib, ... }:
{
home-manager.users.jimbo = {
home = {
desktop.enable = false;
stateVersion = lib.mkForce "24.05";
};
};
}