From ca25c8d60022c22ce792dd3b393a996a322ac514 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Thu, 2 Jul 2020 18:41:01 -0400 Subject: 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 Tested-by: BuildkiteCI --- .../system/system/machines/chupacabra.nix | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/users/glittershark/system/system/machines/chupacabra.nix b/users/glittershark/system/system/machines/chupacabra.nix index 99225e3545..5a7c00fc68 100644 --- a/users/glittershark/system/system/machines/chupacabra.nix +++ b/users/glittershark/system/system/machines/chupacabra.nix @@ -1,9 +1,12 @@ { config, lib, pkgs, ... }: { imports = [ + + ../modules/common.nix ../modules/reusable/battery.nix + ../modules/tvl.nix ]; networking.hostName = "chupacabra"; @@ -47,4 +50,32 @@ 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"; } -- cgit 1.4.1