From af861165e516e0aa1f68d00834a84ca03b00d73d Mon Sep 17 00:00:00 2001 From: TheCrazyInsanity Date: Thu, 18 Dec 2025 14:26:37 -0500 Subject: [PATCH] idk man --- README.md | 0 flake.lock | 0 flake.nix | 0 global/default.nix | 0 global/eraseyourdarlings.nix | 23 +++++- home/bash.nix | 0 home/default.nix | 0 home/git.nix | 0 machines/homepc/configuration.nix | 0 machines/homepc/hardware-configuration.nix | 34 ++++++++- machines/homepc/home.nix | 0 machines/workstation/configuration.nix | 4 +- .../workstation/hardware-configuration.nix | 73 ++++++++++++++----- machines/workstation/home.nix | 0 modules/communication/default.nix | 0 modules/creative/default.nix | 0 modules/development/default.nix | 0 modules/fabrication/default.nix | 0 modules/gaming/default.nix | 0 modules/kde/default.nix | 0 modules/virtualization/default.nix | 0 modules/vr/default.nix | 0 22 files changed, 109 insertions(+), 25 deletions(-) mode change 100644 => 100755 README.md mode change 100644 => 100755 flake.lock mode change 100644 => 100755 flake.nix mode change 100644 => 100755 global/default.nix mode change 100644 => 100755 global/eraseyourdarlings.nix mode change 100644 => 100755 home/bash.nix mode change 100644 => 100755 home/default.nix mode change 100644 => 100755 home/git.nix mode change 100644 => 100755 machines/homepc/configuration.nix mode change 100644 => 100755 machines/homepc/hardware-configuration.nix mode change 100644 => 100755 machines/homepc/home.nix mode change 100644 => 100755 machines/workstation/configuration.nix mode change 100644 => 100755 machines/workstation/hardware-configuration.nix mode change 100644 => 100755 machines/workstation/home.nix mode change 100644 => 100755 modules/communication/default.nix mode change 100644 => 100755 modules/creative/default.nix mode change 100644 => 100755 modules/development/default.nix mode change 100644 => 100755 modules/fabrication/default.nix mode change 100644 => 100755 modules/gaming/default.nix mode change 100644 => 100755 modules/kde/default.nix mode change 100644 => 100755 modules/virtualization/default.nix mode change 100644 => 100755 modules/vr/default.nix diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/flake.lock b/flake.lock old mode 100644 new mode 100755 diff --git a/flake.nix b/flake.nix old mode 100644 new mode 100755 diff --git a/global/default.nix b/global/default.nix old mode 100644 new mode 100755 diff --git a/global/eraseyourdarlings.nix b/global/eraseyourdarlings.nix old mode 100644 new mode 100755 index c095fd7..1169cfa --- a/global/eraseyourdarlings.nix +++ b/global/eraseyourdarlings.nix @@ -1,7 +1,28 @@ { lib, ... }: { boot.initrd.postResumeCommands = lib.mkAfter '' - rm -rf /bin /etc /lib64 /srv /tmp /usr /var + mkdir /btrfs_tmp + mount /dev/disk/by-label/BUTTER /btrfs_tmp + if [[ -e /btrfs_tmp/root ]]; then + mkdir -p /btrfs_tmp/old_roots + timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") + mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp" + fi + + delete_subvolume_recursively() { + IFS=$'\n' + for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do + delete_subvolume_recursively "/btrfs_tmp/$i" + done + btrfs subvolume delete "$1" + } + + for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +1); do + delete_subvolume_recursively "$i" + done + + btrfs subvolume create /btrfs_tmp/root + umount /btrfs_tmp ''; # impermanence environment.persistence."/persistent" = { diff --git a/home/bash.nix b/home/bash.nix old mode 100644 new mode 100755 diff --git a/home/default.nix b/home/default.nix old mode 100644 new mode 100755 diff --git a/home/git.nix b/home/git.nix old mode 100644 new mode 100755 diff --git a/machines/homepc/configuration.nix b/machines/homepc/configuration.nix old mode 100644 new mode 100755 diff --git a/machines/homepc/hardware-configuration.nix b/machines/homepc/hardware-configuration.nix old mode 100644 new mode 100755 index 0fd0b60..db14b85 --- a/machines/homepc/hardware-configuration.nix +++ b/machines/homepc/hardware-configuration.nix @@ -20,14 +20,40 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + boot.supportedFileSystems = [ "btrfs" ]; fileSystems."/" = { - device = "/dev/disk/by-uuid/2849654b-6c3c-4db7-9603-5fa96ce561aa"; - fsType = "ext4"; + device = "/dev/disk/by-uuid/3c89fa92-1d43-4c48-b228-e2725fa70ee9"; + fsType = "btrfs"; + options = [ "compress=zstd" ]; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-uuid/3c89fa92-1d43-4c48-b228-e2725fa70ee9"; + fsType = "btrfs"; + options = [ "compress=zstd" ]; + }; + + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/3c89fa92-1d43-4c48-b228-e2725fa70ee9"; + fsType = "btrfs"; + options = [ "compress=zstd" "noatime" ]; + }; + + fileSystems."/swap" = { + device = "/dev/disk/by-uuid/3c89fa92-1d43-4c48-b228-e2725fa70ee9"; + fsType = "btrfs"; + options = [ "noatime" ]; + }; + + fileSystems."/persist" = { + device = "/dev/disk/by-uuid/3c89fa92-1d43-4c48-b228-e2725fa70ee9"; + fsType = "btrfs"; + options = [ "compress=zstd" ]; }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/90C0-8767"; + device = "/dev/disk/by-uuid/2260-4302"; fsType = "vfat"; options = [ "fmask=0077" @@ -36,7 +62,7 @@ }; swapDevices = [ - { device = "/dev/disk/by-uuid/7762478c-1123-4a1f-9402-1bba3723e53d"; } + { device = "/swap/swapfile"; } ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/machines/homepc/home.nix b/machines/homepc/home.nix old mode 100644 new mode 100755 diff --git a/machines/workstation/configuration.nix b/machines/workstation/configuration.nix old mode 100644 new mode 100755 index 91df079..6ad7bc3 --- a/machines/workstation/configuration.nix +++ b/machines/workstation/configuration.nix @@ -20,12 +20,12 @@ ../../modules/kde/default.nix ../../modules/virtualization/default.nix # ../../modules/vr/default.nix - # ../../global/eraseyourdarlings.nix + ../../global/eraseyourdarlings.nix ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + # boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "workstation"; # Define your hostname. diff --git a/machines/workstation/hardware-configuration.nix b/machines/workstation/hardware-configuration.nix old mode 100644 new mode 100755 index e16ae45..4639fa6 --- a/machines/workstation/hardware-configuration.nix +++ b/machines/workstation/hardware-configuration.nix @@ -1,6 +1,3 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, @@ -8,7 +5,6 @@ modulesPath, ... }: - { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -16,24 +12,50 @@ boot.initrd.availableKernelModules = [ "xhci_pci" - "ehci_pci" "ahci" + "nvme" "usbhid" - "usb_storage" "sd_mod" - "sr_mod" + "btrfs" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.initrd.kernelModules = [ "btrfs" ]; + boot.kernelModules = [ "kvm-intel" "btrfs" ]; boot.extraModulePackages = [ ]; + boot.supportedFilesystems = [ "btrfs" ]; fileSystems."/" = { - device = "/dev/disk/by-uuid/f111c9ae-2ac4-4b20-b46e-11d99552dfdd"; - fsType = "ext4"; + device = "/dev/disk/by-label/BUTTER"; + fsType = "btrfs"; + options = [ "compress=zstd" "subvol=root" ]; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-label/BUTTER"; + fsType = "btrfs"; + options = [ "compress=zstd" "subvol=home" ]; + }; + + fileSystems."/nix" = { + # device = "/dev/disk/by-uuid/3c89fa92-1d43-4c48-b228-e2725fa70ee9"; + device = "/dev/disk/by-label/BUTTER"; + fsType = "btrfs"; + options = [ "compress=zstd" "noatime" "subvol=nix" ]; + }; + +# fileSystems."/swap" = { +# device = "/dev/disk/by-label/BUTTER"; +# fsType = "btrfs"; +# options = [ "noatime" "subvol=swap" ]; +# }; + + fileSystems."/persistent" = { + device = "/dev/disk/by-label/BUTTER"; + fsType = "btrfs"; + options = [ "compress=zstd" "subvol=persist" ]; }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/191D-6D31"; + device = "/dev/disk/by-label/BOOT"; fsType = "vfat"; options = [ "fmask=0077" @@ -41,14 +63,29 @@ ]; }; - swapDevices = [ - { device = "/dev/disk/by-uuid/11c4c704-87bc-4c76-b3e2-2166ef53dcaf"; } - ]; +# fileSystems = { +# "/".options = [ "compress=zstd" ]; +# "/home".options = [ "compress=zstd" ]; +# "/persist".options = [ "compress=zstd" ]; +# "/nix".options = [ "compress=zstd" "noatime" ]; +# "/swap".options = [ "noatime" ]; +# }; + +# swapDevices = [ +# { device = "/swap/swapfile"; } +# ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - hardware.graphics.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia.open = false; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = false; + # boot.loader.efiInstallAsRemovable = true; + + networking.networkmanager.enable = true; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; # Fine since it's not a laptop. + + system.stateVersion = "25.11"; # No touchy } diff --git a/machines/workstation/home.nix b/machines/workstation/home.nix old mode 100644 new mode 100755 diff --git a/modules/communication/default.nix b/modules/communication/default.nix old mode 100644 new mode 100755 diff --git a/modules/creative/default.nix b/modules/creative/default.nix old mode 100644 new mode 100755 diff --git a/modules/development/default.nix b/modules/development/default.nix old mode 100644 new mode 100755 diff --git a/modules/fabrication/default.nix b/modules/fabrication/default.nix old mode 100644 new mode 100755 diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix old mode 100644 new mode 100755 diff --git a/modules/kde/default.nix b/modules/kde/default.nix old mode 100644 new mode 100755 diff --git a/modules/virtualization/default.nix b/modules/virtualization/default.nix old mode 100644 new mode 100755 diff --git a/modules/vr/default.nix b/modules/vr/default.nix old mode 100644 new mode 100755