Add secureboot and extra drive to Envy

This commit is contained in:
Jimbo 2024-12-18 23:06:57 -05:00
parent e2dd56952d
commit f4ca233d0c
13 changed files with 30 additions and 161 deletions

View file

@ -82,7 +82,6 @@
extern = mkNix [ ./hosts/extern ]; # External Drive/USB
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
xenia = mkNix [ ./hosts/xenia ]; # Acer Veriton X2611G
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
};

View file

@ -9,9 +9,12 @@
../../modules/system
];
system.wireguard.client.enable = true;
networking.hostName = "envy";
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.25/24" ];
system.stateVersion = "24.11";
networking.hostName = "envy";
system = {
lanzaboote.enable = true;
wireguard.client.enable = true;
stateVersion = "24.11";
};
}

View file

@ -1,6 +1,13 @@
{ config, ... }:
{
fileSystems = {
# Secondary drive
"/mnt/Games" = {
device = "/dev/disk/by-uuid/135281e2-72ec-4c00-91e8-9897a32c02ce";
fsType = "btrfs";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
# Network mounts
"/home/jimbo/JimboNFS" = {
device = "10.100.0.1:/export/JimboNFS";

View file

@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC2lMkUd+BbXITE5LTg94hEzmA6UKsIIbaf5YOjGoLzl
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAb+aqIyTDcXDH8vMK697zQnYYUjgbUD2tJyknlztE3j

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC2lMkUd+BbXITE5LTg94hEzmA6UKsIIbaf5YOjGoLzl

View file

@ -10,11 +10,13 @@
../../modules/system
];
system.lanzaboote.enable = true;
system.wireless.enable = false;
system.video.nvidia.enable = true;
system.libvirtd.enable = true;
networking.hostName = "tower";
system.stateVersion = "24.05";
system = {
lanzaboote.enable = true;
wireless.enable = false;
video.nvidia.enable = true;
libvirtd.enable = true;
stateVersion = "24.05";
};
}

View file

@ -4,32 +4,39 @@
# Games and such
"/mnt/Linux1" = {
device = "/dev/disk/by-uuid/b2901f8c-ffda-4b88-bb63-a9ea0c96ccb4";
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Linux2" = {
device = "/dev/disk/by-uuid/f08e4f38-162c-402f-ba2a-5925151b78bf";
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Linux3" = {
device = "/dev/disk/by-uuid/e7bc75bd-c371-4b28-b212-7be9b1fad339";
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Windows1" = {
device = "/dev/disk/by-uuid/48F5C6E06416229C";
fsType = "ntfs";
options = [ "nosuid" "nodev" "noauto" ];
};
"/mnt/Windows2" = {
device = "/dev/disk/by-uuid/0A5A3420237C863A";
fsType = "ntfs";
options = [ "nosuid" "nodev" "noauto" ];
};
# Bulk storage mounts
"/persist/var/lib/libvirt" = {
device = "/dev/disk/by-uuid/abf78669-de2a-4afa-8e62-604f4e4cb355";
fsType = "btrfs";
options = [ "subvol=libvirt" "nosuid" "nodev" "nofail" ];
};
"/persist/home/jimbo/VMs" = {
device = "/dev/disk/by-uuid/abf78669-de2a-4afa-8e62-604f4e4cb355";
fsType = "btrfs";
options = [ "subvol=images" "nosuid" "nodev" "nofail" ];
};

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernel.sysctl."vm.max_map_count" = 2147483642;
};
}

View file

@ -1,14 +0,0 @@
{ ... }:
{
imports = [
./boot
./disko
./hardware
../../modules/system
];
system.lanzaboote.enable = true;
system.wireguard.client.enable = false;
networking.hostName = "detritus";
}

View file

@ -1,96 +0,0 @@
{ disko, config, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/sda";
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

@ -1,30 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
{
boot = {
kernelModules = [ "kvm-intel" ];
initrd = {
availableKernelModules = [
"ehci_pci"
"ata_piix"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
kernelModules = [ "dm-snapshot" ];
};
};
fileSystems = {
# Network mounts
"/home/jimbo/JimboNFS" = {
device = "${config.ips.server}:/export/JimboNFS";
fsType = "nfs4";
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
};
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEpUrqdoWah4q4CC4yyhwhznjzKHY8w2a0GYfla9nY9n

View file

@ -7,12 +7,12 @@
openssh.authorizedKeys.keys = [
(builtins.readFile ../../../../../hosts/tower/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/envy/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/axolotl/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/lacros/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/redmond/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/kitty/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/xenia/id_ed25519.pub)
(builtins.readFile ../../../../../hosts/prophet/id_ed25519.pub)
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 Pixel9"