Throw kitty back in fuck it

This commit is contained in:
Bun 2025-03-16 02:06:21 -04:00
parent 8bb6498cfd
commit d3529bbcdb
12 changed files with 138 additions and 37 deletions

View file

@ -58,12 +58,12 @@
# nixos-rebuild switch --flake /etc/nixos#hostname # nixos-rebuild switch --flake /etc/nixos#hostname
nixosConfigurations = { nixosConfigurations = {
tower = mkNix [ ./hosts/tower ]; # Main Desktop tower = mkNix [ ./hosts/tower ]; # Main Desktop
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
envy = mkNix [ ./hosts/envy ]; # HP Convertable envy = mkNix [ ./hosts/envy ]; # HP Convertable
pear = mkNix [ ./hosts/pear ]; # MacBook Pro pear = mkNix [ ./hosts/pear ]; # MacBook Pro
intuos = mkNix [ ./hosts/intuos ]; # Wacom Intuos Tablet intuos = mkNix [ ./hosts/intuos ]; # Wacom Intuos Tablet
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot
iso = mkNix [ ./hosts/iso ]; # ISO File
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040 midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1 prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1

View file

@ -1,25 +0,0 @@
{ lib, ... }:
{
imports = [
./hardware
./users
../../modules/system
];
networking.hostName = "iso";
system = {
desktop.enable = true;
wireless.enable = true;
video.nvidia.enable = true;
libvirtd.enable = true;
stateVersion = "24.11";
};
environment.persistence."/persist".enable = lib.mkForce false;
services = {
btrfs.autoScrub.enable = lib.mkForce false;
fstrim.enable = lib.mkForce false;
};
}

View file

@ -1,10 +0,0 @@
{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
(modulesPath + "/installer/cd-dvd/channel.nix")
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,4 @@
{ pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_latest;
}

20
hosts/kitty/default.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, lib, ... }:
{
imports = [
./boot
./disko
./filesystems
./hardware
./users
../../modules/system
];
networking.hostName = "kitty";
system = {
desktop.enable = true;
lanzaboote.enable = true;
fancyboot.enable = true;
stateVersion = "24.11";
};
}

View file

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

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
fileSystems."/home/${config.sysusers.main}/Midas" = {
device = "${config.ips.server}:/";
fsType = "nfs4";
options = [ "x-systemd.automount" "noauto" "soft" "_netdev" ];
};
}

View file

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

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGyeBzogUVlK+PR+lC92gPwzal8KmA2xeaTOhi59smXq bun@kitty

View file

@ -2,7 +2,7 @@
{ {
home-manager.users."${config.sysusers.main}".home = { home-manager.users."${config.sysusers.main}".home = {
desktop.enable = true; desktop.enable = true;
remote-desktop.enable = true; production.enable = true;
stateVersion = lib.mkForce config.system.stateVersion; stateVersion = lib.mkForce config.system.stateVersion;
}; };
} }

View file

@ -13,6 +13,7 @@
createHome = true; createHome = true;
openssh.authorizedKeys.keyFiles = [ openssh.authorizedKeys.keyFiles = [
../../../../hosts/tower/id_ed25519.pub ../../../../hosts/tower/id_ed25519.pub
../../../../hosts/kitty/id_ed25519.pub
../../../../hosts/envy/id_ed25519.pub ../../../../hosts/envy/id_ed25519.pub
../../../../hosts/pear/id_ed25519.pub ../../../../hosts/pear/id_ed25519.pub