From 00f3a285dd3ef33a908e8fc3fe5c41c66876c04d Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 2 Sep 2021 08:54:05 -0400 Subject: [PATCH] feat: create Infini-DESKTOP config, remove default --- hosts/Infini-DESKTOP/default.nix | 102 ++++++++++++++++++ .../Infini-DESKTOP/hardware-configuration.nix | 35 ++++++ 2 files changed, 137 insertions(+) create mode 100644 hosts/Infini-DESKTOP/default.nix create mode 100644 hosts/Infini-DESKTOP/hardware-configuration.nix diff --git a/hosts/Infini-DESKTOP/default.nix b/hosts/Infini-DESKTOP/default.nix new file mode 100644 index 0000000..409c083 --- /dev/null +++ b/hosts/Infini-DESKTOP/default.nix @@ -0,0 +1,102 @@ +{ suites, ... }: { + imports = suites.base ++ [ ./hardware-configuration.nix ]; + + system.stateVersion = "21.05"; + + boot.loader = { + systemd-boot = { + enable = true; + editor = false; + consoleMode = "2"; + }; + + efi.canTouchEfiVariables = true; + timeout = 5; + }; + + time.timeZone = "America/New_York"; + + networking = { + useDHCP = false; # Explicitly disable broad DHCP + interfaces = { + # Enable DHCP per interface + eth0.useDHCP = true; + wlp41s0.useDHCP = true; + }; + + wireless = { + enable = true; # Enable wireless + interfaces = [ "wlp41s0" ]; + + networks = { + Mashtun = { + pskRaw = + "1ccf3e0cc08700f2484e4a0e202836898cc8c084b7e05d6798bf0a7ba9bbc306"; + }; + }; + }; + }; + + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + earlySetup = true; + packages = [ ]; + colors = [ + # Solarized Dark Theme + "002b36" + "dc322f" + "859900" + "b58900" + "268bd2" + "6c71c4" + "2aa198" + "93a1a1" + "657b83" + "dc322f" + "859900" + "b58900" + "268bd2" + "6c71c4" + "2aa198" + "93a1a1" + ]; + }; + services.kmscon.enable = true; + + services.gvfs.enable = true; # MTP support + + services.xserver = { + # Enable X11 Windowing and Qtile Window Manager + enable = true; + windowManager.qtile.enable = true; + + # Configure X11 keymap + layout = "us"; + + videoDrivers = [ "nvidia" ]; + }; + + hardware.nvidia.modesetting.enable = true; + hardware.opengl.driSupport32Bit = true; + + # Enable CUPS to print documents. + services.printing = { + enable = true; + drivers = with pkgs; [ + cnijfilter2 + gutenprintBin + cupsBjnp + cups-bjnp + canon-cups-ufr2 + carps-cups + cnijfilter_2_80 + cnijfilter_4_00 + ]; + }; + + # Enable sound. + sound.enable = true; + hardware.pulseaudio.enable = true; +} diff --git a/hosts/Infini-DESKTOP/hardware-configuration.nix b/hosts/Infini-DESKTOP/hardware-configuration.nix new file mode 100644 index 0000000..5c64c13 --- /dev/null +++ b/hosts/Infini-DESKTOP/hardware-configuration.nix @@ -0,0 +1,35 @@ +# 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 = [ "nvme" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/c40e2655-8f7e-4dd3-95ab-f2d48639cc59"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/21E6-6801"; + fsType = "vfat"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/26438642-0683-4ce3-af6b-b555cb8e388d"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/dfbe858e-5732-48d7-8777-37ed19138d7e"; } + ]; + +}