Add flight, more stuff with distributed builds

This commit is contained in:
Bun 2025-06-11 01:29:35 -04:00
parent 2f76f3be7e
commit 0ab856b18e
11 changed files with 218 additions and 2 deletions

View file

@ -0,0 +1,8 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.grub.enable = true;
plymouth.enable = true;
};
}

18
hosts/flight/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ ... }:
{
imports = [
./boot
./disko
./filesystems
./hardware
./services
./user
];
system = {
nixos.tags = [ "pc" ];
stateVersion = "25.05";
};
deployment.targetHost = "";
}

View file

@ -0,0 +1,106 @@
{ config, disko, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
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"
"ssd"
];
};
"/prev" = {
mountpoint = "/prev";
mountOptions = [
"compress=zstd"
"noexec"
"ssd"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"ssd"
];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [
"compress=zstd"
"ssd"
];
};
"/persist/.snapshots" = { };
"/persist/home" = { };
"/persist/home/.snapshots" = { };
};
};
};
swap = {
size = "8G";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
# Needed for impermanence
fileSystems."/persist".neededForBoot = true;
}

View file

@ -0,0 +1,14 @@
{ config, ... }:
{
fileSystems = {
"/persist/storage" = {
device = "/dev/disk/by-uuid/d0d6783f-ad51-4d85-b8a9-3374f6460ef6";
fsType = "btrfs";
options = [
"nofail"
"nosuid"
"subvol=storage"
];
};
};
}

View file

@ -0,0 +1,22 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules = [
"ahci"
"ehci_pci"
"sd_mod"
"sr_mod"
"xhci_pci"
];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-intel" ];
};
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -0,0 +1,11 @@
{ lib, ... }:
{
networking.useNetworkd = lib.mkForce false;
services.globalprotect.enable = true;
virtualisation = {
libvirtd.enable = true;
vmware.host.enable = true;
};
}

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
home-manager.users."${config.vars.mainUser}".home = {
guifull.enable = true;
school.enable = true;
enableNixpkgsReleaseCheck = false;
};
}