summaryrefslogtreecommitdiffstats
path: root/hosts/jonbox/hardware.nix
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2023-09-29 14:22:24 -0400
committerJon Santmyer <jon@jonsantmyer.com>2023-09-29 14:22:24 -0400
commitf819e30b03dffcf9e74af4b8552e4a8ab8f54c58 (patch)
treec05f4f1db738d6cd9d2824b5000c6afc3b1d61d1 /hosts/jonbox/hardware.nix
parentd3bb6cbb4724bc8f18f72fa3fea3e65f73ae8d09 (diff)
downloadnix-config-f819e30b03dffcf9e74af4b8552e4a8ab8f54c58.tar.gz
nix-config-f819e30b03dffcf9e74af4b8552e4a8ab8f54c58.tar.bz2
nix-config-f819e30b03dffcf9e74af4b8552e4a8ab8f54c58.zip
major reorganizing to seperate modules
Diffstat (limited to 'hosts/jonbox/hardware.nix')
-rw-r--r--hosts/jonbox/hardware.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/hosts/jonbox/hardware.nix b/hosts/jonbox/hardware.nix
new file mode 100644
index 0000000..ce734fe
--- /dev/null
+++ b/hosts/jonbox/hardware.nix
@@ -0,0 +1,65 @@
+{ config, lib, pkgs, modulesPath, ... }:
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ #Filesystems
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/83cafaff-8be3-477f-b13c-c47dafdf969d";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/40EA-5550";
+ fsType = "vfat";
+ };
+
+ fileSystems."/mnt/jonshare" = {
+ device = "homenas:/var/data/jon";
+ fsType = "nfs";
+ };
+
+ fileSystems."/mnt/plexshare" = {
+ device = "homenas:/var/data/plex";
+ fsType = "nfs";
+ };
+
+ fileSystems."/mnt/share" = {
+ device = "homenas:/var/data/shared";
+ fsType = "nfs";
+ };
+
+ swapDevices =
+ [
+ { device = "/dev/disk/by-uuid/acfc7ea5-0787-4e05-bcf1-20b7adb0f35c"; }
+ ];
+
+ #SSD-optimization
+ services.fstrim.enable = true;
+
+ #Hardware
+ hardware.nvidia = {
+ modesetting.enable = true;
+ powerManagement.enable = false;
+ powerManagement.finegrained = false;
+ open = true;
+ nvidiaSettings = true;
+ package = config.boot.kernelPackages.nvidiaPackages.stable;
+ };
+
+ #Firmware
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+
+ #Networking
+ networking.hostName = "jonbox";
+ networking.useDHCP = lib.mkDefault true;
+ networking.networkmanager.enable = true;
+}