From f16588034dabebf002e5dfbc679476ec04f4b264 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Mon, 28 Oct 2024 00:11:01 -0400 Subject: [PATCH] Add a new desktop lol --- flake.nix | 6 ++- hosts/detritus/home/default.nix | 23 +++++++++ hosts/detritus/id_ed25519.pub | 1 + hosts/detritus/system/boot/default.nix | 17 +++++++ hosts/detritus/system/default.nix | 26 ++++++++++ hosts/detritus/system/hardware/default.nix | 55 ++++++++++++++++++++++ 6 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 hosts/detritus/home/default.nix create mode 100644 hosts/detritus/id_ed25519.pub create mode 100644 hosts/detritus/system/boot/default.nix create mode 100644 hosts/detritus/system/default.nix create mode 100644 hosts/detritus/system/hardware/default.nix diff --git a/flake.nix b/flake.nix index ba096b8..185d18a 100644 --- a/flake.nix +++ b/flake.nix @@ -67,10 +67,12 @@ # nixos-rebuild switch --flake .#hostname nixosConfigurations = { firefly = mkNix [ ./hosts/firefly/system ]; # Main Desktop + detritus = mkNix [ ./hosts/detritus/system ]; # Acer Desktop + shuttle = mkNix [ ./hosts/shuttleworth/system ]; # Pinebook Pro lacros = mkNix [ ./hosts/lacros/system ]; # Dell Chromebook redmond = mkNix [ ./hosts/redmond/system ]; # Lenovo Laptop - treefruit = mkNix [ ./hosts/treefruit/system ]; # Macbook 14,1 + treefruit = mkNix [ ./hosts/treefruit/system ]; # Macbook Pro 14,1 cyberspark = mkNix [ ./hosts/cyberspark/system ]; # Dell Optiplex 7010 bomberman = mkNix [ ./hosts/bomberman/system ]; # Oracle ARM @@ -79,6 +81,8 @@ # home-manager switch --flake .#username@hostname homeConfigurations = { "jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux; + "jimbo@detritus" = mkHome [ ./hosts/detritus/home ] nixpkgs.legacyPackages.x86_64-linux; + "jimbo@shuttle" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux; "jimbo@lacros" = mkHome [ ./hosts/lacros/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@redmond" = mkHome [ ./hosts/redmond/home ] nixpkgs.legacyPackages.x86_64-linux; diff --git a/hosts/detritus/home/default.nix b/hosts/detritus/home/default.nix new file mode 100644 index 0000000..dfff9bc --- /dev/null +++ b/hosts/detritus/home/default.nix @@ -0,0 +1,23 @@ +{ config, nur, ... }: +{ + imports = [ + # Apps and programs + ../../../modules/home + ../../../modules/home/users + ../../../modules/home/files + ../../../modules/home/settings + ../../../modules/home/programs + ../../../modules/home/programs/misc/gaming/launchers + ../../../modules/home/programs/misc/remote-desktop + ../../../modules/home/sway + ../../../modules/home/utils + + # Misc + ../../../overlays + ../../../variables + ../../../variables/look/colors/green + + # Imports + nur.nixosModules.nur + ]; +} diff --git a/hosts/detritus/id_ed25519.pub b/hosts/detritus/id_ed25519.pub new file mode 100644 index 0000000..8ddb26c --- /dev/null +++ b/hosts/detritus/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEpUrqdoWah4q4CC4yyhwhznjzKHY8w2a0GYfla9nY9n jimbo@detritus diff --git a/hosts/detritus/system/boot/default.nix b/hosts/detritus/system/boot/default.nix new file mode 100644 index 0000000..f895e04 --- /dev/null +++ b/hosts/detritus/system/boot/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + boot = { + kernelPackages = pkgs.linuxPackages_latest; + kernel.sysctl."vm.max_map_count" = 2147483642; + initrd = { + systemd.enable = true; + luks.devices = { + crypt-hhd = { + device = "/dev/disk/by-uuid/0ab46868-3c54-4a19-bf30-93855eac0a86"; + preLVM = true; + allowDiscards = true; + }; + }; + }; + }; +} diff --git a/hosts/detritus/system/default.nix b/hosts/detritus/system/default.nix new file mode 100644 index 0000000..f5cad98 --- /dev/null +++ b/hosts/detritus/system/default.nix @@ -0,0 +1,26 @@ +{ ... }: +{ + imports = [ + ./hardware + ./boot + + # Apps and programs + ../../../modules/system + ../../../modules/system/accounts + ../../../modules/system/desktop + ../../../modules/system/programs + ../../../modules/system/services + + # Devices and hardware + ../../../modules/system/devices + ../../../modules/system/devices/boot/systemd + ../../../modules/system/devices/networking/wireless + ../../../modules/system/devices/networking/firewall/pc + + # Extras + ../../../overlays + ../../../variables + ]; + + networking.hostName = "detritus"; +} diff --git a/hosts/detritus/system/hardware/default.nix b/hosts/detritus/system/hardware/default.nix new file mode 100644 index 0000000..697a79e --- /dev/null +++ b/hosts/detritus/system/hardware/default.nix @@ -0,0 +1,55 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + kernelModules = [ "kvm-intel" ]; + initrd = { + availableKernelModules = [ "ehci_pci" "ata_piix" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + kernelModules = [ "dm-snapshot" ]; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/dc6e2cd9-040b-4104-8138-5dfa9cb5558c"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + "/home" = { + device = "/dev/disk/by-uuid/dc6e2cd9-040b-4104-8138-5dfa9cb5558c"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + "/var" = { + device = "/dev/disk/by-uuid/dc6e2cd9-040b-4104-8138-5dfa9cb5558c"; + fsType = "btrfs"; + options = [ "subvol=@var" ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/dc6e2cd9-040b-4104-8138-5dfa9cb5558c"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + "/.snapshots" = { + device = "/dev/disk/by-uuid/dc6e2cd9-040b-4104-8138-5dfa9cb5558c"; + fsType = "btrfs"; + options = [ "subvol=@snapshots" ]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/C93C-885E"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/efbfa333-3971-477c-a0c3-3250a66993a0"; } + ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}