From 7b79203f54853733d4fae88943829d0e24e6e49f Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sun, 7 Jan 2024 12:00:08 -0500 Subject: massive overhaul --- hosts/jonbox/default.nix | 119 +++++++++++++++++++++++++------------------- hosts/jonbox/filesystem.nix | 4 -- hosts/jonbox/hardware.nix | 70 -------------------------- 3 files changed, 69 insertions(+), 124 deletions(-) delete mode 100644 hosts/jonbox/filesystem.nix delete mode 100644 hosts/jonbox/hardware.nix (limited to 'hosts/jonbox') diff --git a/hosts/jonbox/default.nix b/hosts/jonbox/default.nix index 643838b..0f525ca 100644 --- a/hosts/jonbox/default.nix +++ b/hosts/jonbox/default.nix @@ -1,58 +1,77 @@ -{ 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; + inputs, + lib, + pkgs, + ... +}: { + #Filesystems + fileSystems."/" = + { device = "/dev/disk/by-uuid/83cafaff-8be3-477f-b13c-c47dafdf969d"; + fsType = "btrfs"; + options = [ "compress=zstd" "subvol=@" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/40EA-5550"; + fsType = "vfat"; + }; + + fileSystems."/mnt/jonshare" = { + device = "homenas:/var/data/jon"; + fsType = "nfs"; }; - - #Unfree-packages. - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "nvidia-x11" - "nvidia-settings" - "nvidia-persistenced" - "code" - "vscode" - "steam" - "steam-original" - "steam-run" - ]; - - #OpenGL - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; + fileSystems."/mnt/plexshare" = { + device = "homenas:/var/data/plex"; + fsType = "nfs"; }; - - #X11 Server - services.xserver.videoDrivers = [ "nvidia" ]; - home-manager.users.jon.gtk.cursorTheme = { - package = pkgs.quintom-cursor-theme; - name = "Quintom_Ink"; - size = 12; + + fileSystems."/mnt/share" = { + device = "homenas:/var/data/shared"; + fsType = "nfs"; }; + + swapDevices = + [ + { device = "/dev/disk/by-uuid/acfc7ea5-0787-4e05-bcf1-20b7adb0f35c"; } + ]; + + #Fonts + fonts.packages = with pkgs; [ + fira-code + fira-code-symbols + font-awesome + liberation_ttf + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + (nerdfonts.override { fonts = [ "FiraCode" ]; } ) + ]; - awesome.enable = true; - hyprland.enable = true; - mullvad-vpn.enable = true; - mpd.enable = true; + modules = { + device = { + cpu = "intel"; + gpu = "nvidia"; + drive = "nvme"; + hasBluetooth = true; + }; + desktop = { + hyprland.enable = true; + apps = { + browsers.firefox.enable = true; + games = { + enable = true; + steam.enable = true; + }; + mpd.enable = true; + flatpak.enable = true; + newsboat.enable = true; + }; + }; + }; - games.enable = true; + home.manager.wayland.windowManager.hyprland.extraConfig = '' + monitor=DP-2,1920x1080,0x0,1 + monitor=HDMI-A-2,1920x1080,1920x0,1 + ''; } diff --git a/hosts/jonbox/filesystem.nix b/hosts/jonbox/filesystem.nix deleted file mode 100644 index 5b8ec2b..0000000 --- a/hosts/jonbox/filesystem.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ -} diff --git a/hosts/jonbox/hardware.nix b/hosts/jonbox/hardware.nix deleted file mode 100644 index bbe651f..0000000 --- a/hosts/jonbox/hardware.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ 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 = [ "compress=zstd" "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; - services.btrfs.autoScrub = - { - enable = true; - interval = "weekly"; - }; - - #Hardware - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; - }; - - #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; -} -- cgit v1.2.1