me like nix
1{ ... }: {
2 flake.modules.nixos.framework-laptop =
3 { pkgs, ... }:
4 {
5 networking.hostName = "framework16";
6
7 boot.initrd.luks.devices."luks-ee306bda-c450-4a56-b4fe-537899e38e0d" = {
8 device = "/dev/disk/by-uuid/ee306bda-c450-4a56-b4fe-537899e38e0d";
9 bypassWorkqueues = true;
10 };
11
12 # Reduce swap pressure to avoid thrashing through dm-crypt
13 boot.kernel.sysctl."vm.swappiness" = 10;
14
15 # Disable ABM (Active Backlight Management) to maintain color accuracy
16 boot.kernelParams = [ "amdgpu.abmlevel=0" ];
17
18 # Enable QEMU emulation for aarch64 (for building Pi images)
19 boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
20
21 # Use power-profiles-daemon instead of TLP (recommended for AMD Framework)
22 services.power-profiles-daemon.enable = true;
23
24 # Disable keyboard/touchpad wake from suspend (prevents wake in bags)
25 services.udev.extraRules = ''
26 # Framework Laptop 16 - Disable wakeup for internal keyboard to prevent wake in bags
27 ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTR{power/wakeup}="disabled"
28 '';
29
30 environment.systemPackages = with pkgs; [
31 gdm
32 ];
33
34 # SSH
35 services.openssh = {
36 enable = true;
37 settings = {
38 PasswordAuthentication = false;
39 KbdInteractiveAuthentication = false;
40 PermitRootLogin = "no";
41 AllowUsers = [ "sean" ];
42 };
43 };
44
45 # Firewall
46 networking.firewall.allowedUDPPorts = [ ];
47 networking.firewall.enable = false;
48
49 system.stateVersion = "25.05";
50 };
51}