From b3435e560c38ebb65495ec7022b72482a9caf0a7 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Thu, 24 Jul 2025 14:41:14 -0400 Subject: [PATCH] hardware for Nyx --- README.md | 2 +- hosts/nixos/Nyx/default.nix | 61 ++++++++++++++++++++++ hosts/nixos/Nyx/hardware-configuration.nix | 19 +++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 hosts/nixos/Nyx/default.nix create mode 100644 hosts/nixos/Nyx/hardware-configuration.nix diff --git a/README.md b/README.md index 37b5c4d..f5ea131 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ - `nixos` - machine specific configurations for NixOS-based hosts - `Parzival` - Primary Box - Ryzen 5 7600 - RX 7800 XT - 32GB DDR5 - `Incarceron` - Work issued framework 13 - AMD Ryzen 7 7840U - 32GB DDR5 - - `Nyx` - My X1 Carbon, personal laptop + - `Nyx` - My X1 Carbon, personal laptop - i7-8650U - 16GB DDR4 - `HandlerOne` - Lenovo m710q - i5-7500T - 16GB DDR4 - `Mote` - Some dinky little datto appliance that does my bidding now - `Michishirube` - Nebula lighthouse node hosted on Digital Ocean diff --git a/hosts/nixos/Nyx/default.nix b/hosts/nixos/Nyx/default.nix new file mode 100644 index 0000000..b516418 --- /dev/null +++ b/hosts/nixos/Nyx/default.nix @@ -0,0 +1,61 @@ +###################### +# # +# Nyx - Laptop # +# NixOS on X1 carbon # +# # +###################### +{ + inputs, + lib, + pkgs, + ... +}: { + imports = lib.flatten [ + # Hardware + inputs.hardware.nixosModules.lenovo-thinkpad-x1-6th-gen + ./hardware-configuration.nix + + # Disks + inputs.disko.nixosModules.disko + (lib.custom.relativeToRoot "hosts/common/disks/btrfs-disk.nix") + { + _module.args = { + disk = "/dev/sda"; + withSwap = true; + swapSize = "8"; + }; + } + + # Misc + + (map lib.custom.relativeToRoot [ + # Required configs + "hosts/common/core" + + # Optional configs + "hosts/common/optional/audio.nix" + "hosts/common/optional/bluetooth.nix" + "hosts/common/optional/keyd.nix" + "hosts/common/optional/pentesting.nix" + ]) + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + hostSpec = { + hostName = "Nyx"; + persistFolder = "/persist"; + }; + + networking = { + networkmanager.enable = true; + enableIPv6 = false; + }; + + boot.loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + }; + }; +} diff --git a/hosts/nixos/Nyx/hardware-configuration.nix b/hosts/nixos/Nyx/hardware-configuration.nix new file mode 100644 index 0000000..2adfc82 --- /dev/null +++ b/hosts/nixos/Nyx/hardware-configuration.nix @@ -0,0 +1,19 @@ +# 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, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; +}