{ pkgs, inputs, lib, config, ... }: let pkgsUnstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}; in { hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; services.udev.packages = [ pkgs.zsa-udev-rules pkgsUnstable.yubikey-personalization inputs.ksoloti-pr.legacyPackages.${pkgs.system}.ksoloti ]; services.usbmuxd = { enable = true; package = pkgs.usbmuxd; }; services.fwupd = { enable = true; }; services.fprintd.enable = true; services.fstrim.enable = true; security.pam.services.login.fprintAuth = false; # similarly to how other distributions handle the fingerprinting login security.pam.services.gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) { text = '' auth required pam_shells.so auth requisite pam_nologin.so auth requisite pam_faillock.so preauth auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so auth optional pam_permit.so auth required pam_env.so auth [success=ok default=1] ${pkgs.gdm}/lib/security/pam_gdm.so auth optional ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so account include login password required pam_deny.so session include login session optional ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start ''; }; hardware.keyboard.zsa.enable = true; services.logind = { lidSwitch = "suspend"; powerKey = "suspend"; extraConfig = '' IdleAction=suspend ''; }; powerManagement = { enable = true; powerDownCommands = "${pkgs.networkmanager}/bin/nmcli radio wifi off"; powerUpCommands = "${pkgs.networkmanager}/bin/nmcli radio wifi on"; }; services.power-profiles-daemon.enable = false; services.tlp = { enable = true; settings = { CPU_BOOST_ON_BAT = 0; CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave"; START_CHARGE_THRESH_BATx = 85; STOP_CHARGE_THRES_BATx = 90; RUNTIME_PM_ON_BAT = "auto"; }; }; programs.auto-cpufreq.enable = true; hardware.amdgpu.opencl.enable = true; hardware.graphics = { enable = true; extraPackages = with pkgs; [ rocmPackages.clr.icd ]; }; networking.networkmanager.wifi.backend = "iwd"; security.tpm2.enable = true; }