summaryrefslogtreecommitdiffstats
path: root/hosts/jonbox
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
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')
-rw-r--r--hosts/jonbox/default.nix43
-rw-r--r--hosts/jonbox/filesystem.nix4
-rw-r--r--hosts/jonbox/hardware.nix65
3 files changed, 112 insertions, 0 deletions
diff --git a/hosts/jonbox/default.nix b/hosts/jonbox/default.nix
new file mode 100644
index 0000000..ce5f4a3
--- /dev/null
+++ b/hosts/jonbox/default.nix
@@ -0,0 +1,43 @@
+{ config, lib, pkgs, stateVersion, ... }:
+
+{
+ imports = [
+ ./hardware.nix
+ ../../modules/hardware/bluetooth.nix
+ ../../modules/virt
+ ];
+
+ #Boot options
+ boot = {
+ loader = {
+ systemd-boot = {
+ enable = true;
+ configurationLimit = 8;
+ };
+ efi.canTouchEfiVariables = true;
+ timeout = 5;
+ };
+ kernelPackages = pkgs.linuxPackages_latest;
+ };
+
+ #Unfree-packages.
+ nixpkgs.config.allowUnfreePredicate = pkg:
+ builtins.elem (lib.getName pkg) [
+ "nvidia-x11"
+ "nvidia-settings"
+ "nvidia-persistenced"
+ ];
+
+ #OpenGL
+ hardware.opengl = {
+ enable = true;
+ driSupport = true;
+ driSupport32Bit = true;
+ };
+
+ #X11 Server
+ services.xserver.videoDrivers = [ "nvidia" ];
+
+ awesome.enable = true;
+ mullvad-vpn.enable = true;
+}
diff --git a/hosts/jonbox/filesystem.nix b/hosts/jonbox/filesystem.nix
new file mode 100644
index 0000000..5b8ec2b
--- /dev/null
+++ b/hosts/jonbox/filesystem.nix
@@ -0,0 +1,4 @@
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+}
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;
+}