This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / machines / aergia / physical.nix
2.4 kB 105 lines
1{ pkgs, modulesPath, ... }: 2{ 3 imports = [ 4 ./config.nix 5 (modulesPath + "/installer/scan/not-detected.nix") 6 ./disk.nix 7 ]; 8 9 networking.hostId = "deadbeef"; 10 # boot.loader.efi.canTouchEfiVariables = true; 11 boot.loader.grub = { 12 enable = true; 13 device = "/dev/nvme0n1"; 14 efiSupport = true; 15 efiInstallAsRemovable = true; 16 }; 17 18 # boot.kernelPackages = pkgs.linuxPackages_latest; 19 20 boot.kernelParams = [ 21 # use less power with pstate 22 "amd_pstate=passive" 23 24 # suspend 25 "resume_offset=178345675" 26 ]; 27 28 boot.kernelModules = [ 29 # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html 30 # On recent AMD CPUs this can be more energy efficient. 31 "amd-pstate" 32 "kvm-amd" 33 ]; 34 35 # hardware.cpu.amd.updateMicrocode = true; 36 37 services.xserver.videoDrivers = [ 38 "amdgpu" 39 ]; 40 41 boot.initrd.availableKernelModules = [ 42 "nvme" 43 "thunderbolt" 44 "xhci_pci" 45 "usbhid" 46 ]; 47 48 boot.initrd.kernelModules = [ 49 "amdgpu" 50 ]; 51 52 environment.systemPackages = [ 53 pkgs.vulkan-tools 54 ]; 55 56 # corectrl 57 programs.corectrl = { 58 enable = true; 59 gpuOverclock = { 60 enable = true; 61 ppfeaturemask = "0xffffffff"; 62 }; 63 }; 64 users.users.mainUser.extraGroups = [ "corectrl" ]; 65 66 # keyboard quirks 67 services.xserver.displayManager.sessionCommands = '' 68 ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keycode 96 = F12 Insert F12 F12' # rebind shift + F12 to shift + insert 69 ''; 70 services.udev.extraHwdb = # sh 71 '' 72 # disable back buttons 73 evdev:input:b0003v2F24p0135* # /dev/input/event2 74 KEYBOARD_KEY_70026=reserved 75 KEYBOARD_KEY_70027=reserved 76 ''; 77 78 # update cpu microcode 79 hardware.cpu.amd.updateMicrocode = true; 80 81 hardware.graphics.enable = true; 82 83 # suspend to disk 84 swapDevices = [ 85 { 86 device = "/swapfile"; 87 } 88 ]; 89 boot.resumeDevice = "/dev/mapper/aergia1"; 90 services.logind.lidSwitch = "suspend-then-hibernate"; 91 # systemd.sleep.extraConfig = '' 92 # HibernateDelaySec=1800 93 # ''; 94 95 # firefox touchscreen support 96 environment.sessionVariables.MOZ_USE_XINPUT2 = "1"; 97 98 # enable thunderbolt 99 services.hardware.bolt.enable = true; 100 101 # reinit usb after docking station connect 102 services.udev.extraRules = '' 103 SUBSYSTEM=="drm", ACTION=="change", RUN+="${pkgs.dash}/bin/dash -c 'echo 0 > /sys/bus/usb/devices/usb9/authorized; echo 1 > /sys/bus/usb/devices/usb9/authorized'" 104 ''; 105}