refactor(gs/chupacabra): Centralize all config
I previously had some stuff jammed into a hardware-configuration.nix not committed anywhere, which is silly but also prevented building this config as a top-level derivation, so this vendors them all in there Change-Id: Ia76f1d75dcd44aa3e9d86a66c45176afc0946d12 Reviewed-on: https://cl.tvl.fyi/c/depot/+/881 Reviewed-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									a564f36443
								
							
						
					
					
						commit
						ca25c8d600
					
				
					 1 changed files with 31 additions and 0 deletions
				
			
		| 
						 | 
					@ -1,9 +1,12 @@
 | 
				
			||||||
{ config, lib, pkgs, ... }:
 | 
					{ config, lib, pkgs, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
 | 
					    <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
 | 
				
			||||||
 | 
					    ../modules/common.nix
 | 
				
			||||||
    ../modules/reusable/battery.nix
 | 
					    ../modules/reusable/battery.nix
 | 
				
			||||||
    <nixos-hardware/common/cpu/intel>
 | 
					    <nixos-hardware/common/cpu/intel>
 | 
				
			||||||
    <nixos-hardware/common/pc/laptop>
 | 
					    <nixos-hardware/common/pc/laptop>
 | 
				
			||||||
 | 
					    ../modules/tvl.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  networking.hostName = "chupacabra";
 | 
					  networking.hostName = "chupacabra";
 | 
				
			||||||
| 
						 | 
					@ -47,4 +50,32 @@
 | 
				
			||||||
      echo -1 > /sys/module/usbcore/parameters/autosuspend
 | 
					      echo -1 > /sys/module/usbcore/parameters/autosuspend
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # From hardware-configuration.nix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
 | 
				
			||||||
 | 
					  boot.initrd.kernelModules = [ ];
 | 
				
			||||||
 | 
					  boot.kernelModules = [ "kvm-intel" ];
 | 
				
			||||||
 | 
					  boot.extraModulePackages = [ ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fileSystems."/" =
 | 
				
			||||||
 | 
					    { device = "/dev/mapper/cryptroot";
 | 
				
			||||||
 | 
					      fsType = "ext4";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c2fc7ce7-a45e-48a1-8cde-be966ef601db";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fileSystems."/boot" =
 | 
				
			||||||
 | 
					    { device = "/dev/disk/by-uuid/3492-9E3A";
 | 
				
			||||||
 | 
					      fsType = "vfat";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  swapDevices =
 | 
				
			||||||
 | 
					    [ { device = "/dev/disk/by-uuid/caa7e2ff-475b-4024-b29e-4f88f733fc4c"; }
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  nix.maxJobs = lib.mkDefault 12;
 | 
				
			||||||
 | 
					  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
 | 
				
			||||||
 | 
					  # High-DPI console
 | 
				
			||||||
 | 
					  console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue