Prophet prep
This commit is contained in:
parent
c7d6148cff
commit
26c14a5b7c
|
@ -23,6 +23,6 @@
|
|||
../../../variables
|
||||
];
|
||||
|
||||
networking.hostName = "bomberman";
|
||||
networking.hostName = "prophet";
|
||||
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.19/24" ];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
44
hosts/prophet/filesystems/default.nix
Normal file
44
hosts/prophet/filesystems/default.nix
Normal 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"; }
|
||||
];
|
||||
}
|
|
@ -1,51 +1,7 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
boot.initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "virtio_scsi" ];
|
||||
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"; }
|
||||
];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
|
|
4
hosts/prophet/users/default.nix
Normal file
4
hosts/prophet/users/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./jimbo ];
|
||||
}
|
9
hosts/prophet/users/jimbo/default.nix
Normal file
9
hosts/prophet/users/jimbo/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
home-manager.users.jimbo = {
|
||||
home = {
|
||||
desktop.enable = false;
|
||||
stateVersion = lib.mkForce "24.05";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue