summaryrefslogtreecommitdiffstats
path: root/systems/jonbox
diff options
context:
space:
mode:
Diffstat (limited to 'systems/jonbox')
-rw-r--r--systems/jonbox/default.nix49
-rw-r--r--systems/jonbox/filesystem.nix18
2 files changed, 67 insertions, 0 deletions
diff --git a/systems/jonbox/default.nix b/systems/jonbox/default.nix
new file mode 100644
index 0000000..4456e6e
--- /dev/null
+++ b/systems/jonbox/default.nix
@@ -0,0 +1,49 @@
+{ inputs, config, lib, modulesPath, pkgs, ... }:
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ./filesystem.nix
+ ];
+
+ nixpkgs.config.allowUnfreePredicate = pkg:
+ builtins.elem (lib.getName pkg) [
+ "nvidia-x11"
+ "nvidia-settings"
+ "nvidia-persistenced"
+ ];
+
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ hardware.opengl = {
+ enable = true;
+ driSupport = true;
+ driSupport32Bit = true;
+ };
+
+ services.xserver.videoDrivers = [ "nvidia" ];
+
+ hardware.nvidia = {
+ modesetting.enable = true;
+ powerManagment.enable = false;
+ powerManagment.finegrained = false;
+ open = true;
+ nvidiaSettings = true;
+ package = config.boot.kernelPackages.nvidiaPackages.stable;
+ };
+
+ hardware.bluetooth.enable = true;
+ services.blueman.enable = true;
+
+ programs.light.enable = true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/systems/jonbox/filesystem.nix b/systems/jonbox/filesystem.nix
new file mode 100644
index 0000000..30dafc6
--- /dev/null
+++ b/systems/jonbox/filesystem.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ 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";
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/acfc7ea5-0787-4e05-bcf1-20b7adb0f35c"; }
+ ];
+}