{ config, lib, pkgs, ... }: { imports = [ ../../configs/bluetooth.nix ../../configs/btrfs-scrub.nix ../../configs/initrd/sshd.nix ../../configs/retiolum.nix ../../configs/wiregrill.nix ../../configs/earlyoom.nix ../../configs/networkd.nix ../../configs/x11 { ### from https://github.com/gkovacs/udev-key-remapping ### Input device ID: bus 0x11 vendor 0x1 product 0x1 version 0xab83 # /dev/input/event1 # /dev/input/by-path/platform-i8042-serio-0-event-kbd # evdev:input:bvpe- # KEY_COMPOSE is Menu in X11 # Keep in sync with pkgs/haskell/xmonad-tv/src/main.hs. # Changing values here requires udevadm trigger /dev/input/event1 after rebuild. services.udev.extraHwdb = /* sh */ '' # Remap top left buttons from KEY_VOLUME{DOWN,UP} to KEY_{CALC,COMPUTER} evdev:input:b0011v0001p0001* KEYBOARD_KEY_ae=calc KEYBOARD_KEY_b0=computer ''; } ]; services.fwupd.enable = true; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "amd-pstate" "kvm-amd" ]; boot.kernelParams = [ "amd_pstate=active" # for ryzenadj -i "iomem=relaxed" ]; boot.loader.efi.canTouchEfiVariables = true; boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.consoleMode = "max"; boot.initrd.luks.devices.main.device = "/dev/nvme0n1p2"; fileSystems."/" = { device = "/dev/mapper/legvg0-root"; fsType = "btrfs"; options = ["defaults" "noatime" "compress=zstd"]; }; fileSystems."/boot" = { device = "/dev/nvme0n1p1"; fsType = "vfat"; }; fileSystems."/home" = { device = "/dev/mapper/legvg0-home"; fsType = "btrfs"; options = ["defaults" "noatime" "compress=zstd"]; }; zramSwap.enable = true; zramSwap.swapDevices = 1; hardware.cpu.amd.updateMicrocode = true; hardware.enableRedistributableFirmware = true; hardware.sensor.iio.enable = true; nix.settings.cores = 4; users.users.root.packages = [ pkgs.ryzenadj ]; boot.kernelPackages = pkgs.linuxPackages_latest; krebs.build.host = config.krebs.hosts.leg; system.stateVersion = "23.11"; networking.interfaces.eth1.useDHCP = true; networking.interfaces.eth1.wakeOnLan.enable = true; # via EV2740X-BK networking.interfaces.eth2.useDHCP = true; networking.interfaces.lindy1.useDHCP = true; networking.interfaces.lindy2.useDHCP = true; networking.interfaces.prime1.useDHCP = true; networking.interfaces.dong4.useDHCP = true; hrm.network.interfaces = { eth1.medium = "ethernet"; eth2.medium = "ethernet"; lindy1.medium = "ethernet"; lindy2.medium = "ethernet"; prime1.medium = "ethernet"; dong4.medium = "ethernet"; }; networking.wireless.enable = true; networking.wireless.interfaces = [ "wlan0" ]; networking.interfaces.wlan0.useDHCP = true; services.logind.settings.Login.HandlePowerKey = "suspend"; # No need for amdgpu, modesetting is the preferred module, but since 25.11, # modesetting doesn't show anything beyond the cursor. services.xserver.modules = [ pkgs.xf86videoamdgpu ]; # The built-in screen is mounted in portrait orientation. hrm.xserver.configs = { "80-monitor.conf" = { Section.Monitor.eDP = { DisplaySize = [ 120 190 ]; Option.Rotate = "left"; Option.UseEdidDpi = "False"; Option.DPI = "337x342"; }; }; "99-rotate.conf" = { Section.InputClass."libinput touchscreen catchall" = { MatchProduct = "NVTK0603:00 0603:F001"; MatchIsTouchscreen = true; Option.TransformationMatrix = "0 -1 1 1 0 0 0 0 1"; }; Section.Monitor."" = { Option.Rotate = "left"; }; }; }; services.illum.enable = true; # master width = master terminal columns * column width / screen width systemd.user.services."xmonad@".environment = { XMONAD_MASTER_WIDTH = toString (80 * 14 / 2560.); XMONAD_MASTER_DELTA = toString (8 * 14 / 2560.); }; hrm.xresources."*" = { "DesktopPagerFloat*renderFont" = "true"; "DesktopPagerFloat*faceName" = "iosevka tv 2 Semibold"; "DesktopPagerFloat*faceSize" = "7"; }; hrm.alacritty.variant = "hidpi"; hrm.alacritty.settings.font.size = 5; }