My NixOS dotfiles
0

Configure Feed

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

♻️ change to nixos-hardware

Simon R. - fantomitechno (Jun 8, 2026, 6:18 PM +0200) 57dc4353 78ddd883

+45 -31
-21
flake.lock
··· 81 81 "type": "github" 82 82 } 83 83 }, 84 - "nixos-hardware": { 85 - "inputs": { 86 - "nixpkgs": [ 87 - "nixpkgs" 88 - ] 89 - }, 90 - "locked": { 91 - "lastModified": 1780310866, 92 - "narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", 93 - "owner": "NixOS", 94 - "repo": "nixos-hardware", 95 - "rev": "4ed851c979641e28597a05086332d75cdc9e395f", 96 - "type": "github" 97 - }, 98 - "original": { 99 - "owner": "NixOS", 100 - "repo": "nixos-hardware", 101 - "type": "github" 102 - } 103 - }, 104 84 "nixpkgs": { 105 85 "locked": { 106 86 "lastModified": 1780453794, ··· 122 102 "home-manager": "home-manager", 123 103 "niri-float-sticky": "niri-float-sticky", 124 104 "nix4vscode": "nix4vscode", 125 - "nixos-hardware": "nixos-hardware", 126 105 "nixpkgs": "nixpkgs" 127 106 } 128 107 },
+1 -9
flake.nix
··· 23 23 url = "github:nix-community/nix4vscode?tag=nix4vscode-v0.0.12"; 24 24 inputs.nixpkgs.follows = "nixpkgs"; 25 25 }; 26 - 27 - nixos-hardware = { 28 - url = "github:NixOS/nixos-hardware"; 29 - inputs.nixpkgs.follows = "nixpkgs"; 30 - }; 31 26 }; 32 27 33 28 outputs = ··· 36 31 home-manager, 37 32 niri-float-sticky, 38 33 nix4vscode, 39 - nixos-hardware, 40 34 ... 41 35 }: 42 36 let ··· 66 60 nixosConfigurations = { 67 61 fantomitechno-laptop = nixpkgs.lib.nixosSystem { 68 62 inherit system; 69 - modules = commonModules "laptop" ++ [ 70 - nixos-hardware.nixosModules.framework-13-7040-amd 71 - ]; 63 + modules = commonModules "laptop"; 72 64 }; 73 65 fantomitechno-desktop = nixpkgs.lib.nixosSystem { 74 66 inherit system;
+44 -1
hosts/laptop/hardware-configuration.nix
··· 21 21 "thunderbolt" 22 22 "usb_storage" 23 23 "sd_mod" 24 + "cros_ec" 25 + "cros_ec_lpcs" 24 26 ]; 25 27 kernelModules = [ ]; 26 28 }; 27 29 kernelModules = [ "kvm-amd" ]; 28 - extraModulePackages = [ ]; 30 + extraModulePackages = with config.boot.kernelPackages; [ 31 + framework-laptop-kmod 32 + ]; 33 + kernelParams = [ 34 + "quiet" 35 + "loglevel=3" 36 + "systemd.show_status=auto" 37 + "rd.udev.log_level=3" 38 + # There seems to be an issue with panel self-refresh (PSR) that 39 + # causes hangs for users. 40 + # 41 + # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 42 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 43 + "amdgpu.dcdebugmask=0x10" 44 + # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html 45 + # On recent AMD CPUs this can be more energy efficient. 46 + "amd_pstate=active" 47 + ]; 29 48 }; 30 49 50 + # Custom udev rules 51 + services.udev.extraRules = '' 52 + # Ethernet expansion card support 53 + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" 54 + ''; 55 + 56 + # Needed for desktop environments to detect/manage display brightness 57 + hardware.sensor.iio.enable = true; 58 + 31 59 fileSystems."/" = { 32 60 device = "/dev/disk/by-uuid/b3eaa7e8-812e-4a8b-b491-5a9d3fe50b08"; 33 61 fsType = "ext4"; ··· 42 70 ]; 43 71 }; 44 72 73 + services.xserver.videoDrivers = [ "modesetting" ]; 74 + 75 + hardware.graphics = { 76 + enable = true; 77 + enable32Bit = true; 78 + }; 79 + 80 + hardware.amdgpu.initrd.enable = true; 81 + 45 82 swapDevices = [ ]; 46 83 47 84 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 48 85 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 86 + 87 + # AMD has better battery life with PPD over TLP: 88 + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 89 + services.power-profiles-daemon.enable = true; 90 + 91 + services.fstrim.enable = true; 49 92 }