From 45ae40c04d29283670eddec6e9c59c70bf4c5bad Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Sun, 24 Mar 2024 23:19:09 -0400 Subject: [PATCH] Enable fprintd for fingerprints with overlay patch. Change suspend delay on lid close from 5 to 10. Tell HM to use global packages. --- configuration.nix | 19 +++++++++++++++++-- flake.nix | 4 ---- home.nix | 6 ++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/configuration.nix b/configuration.nix index 366c1e7..9af10bf 100644 --- a/configuration.nix +++ b/configuration.nix @@ -60,6 +60,9 @@ config.common.default = "*"; }; + # Home manager: make user home-manager configs use system nixpkgs + home-manager.useGlobalPkgs = true; + ################################### # SECTION 2: HARDWARE CONFIGURATION ################################### @@ -96,7 +99,7 @@ }; # Enable fingerprint reader - # services.fprintd.enable = true; + services.fprintd.enable = true; # Enable Bluetooth. hardware.bluetooth.enable = true; @@ -119,8 +122,10 @@ security.pam.services.swaylock = { }; # Make sure suspend actually happens + # what this does is set the time it waits before sleeping to 10 (default 30) + # default is 30 for, say, if you plug in an external monitor after shutting the lid services.logind.extraConfig = '' - InhibitDelayMaxSec=5 + InhibitDelayMaxSec=10 ''; # Allow steam to run nonfree @@ -128,6 +133,16 @@ # "steam" "steam-original" "steam-run" "zoom-5.16.10.668" # ]; nixpkgs.config.allowUnfreePredicate = _: true; + nixpkgs.overlays = [ + (final: prev: { + fprintd = prev.fprintd.overrideAttrs (old: { + mesonCheckFlags = (old.mesonCheckFlags or [ ]) ++ [ + # PAM related checks are timing out + "--no-suite" "fprintd:TestPamFprintd" + ]; + }); + }) + ]; # List packages installed in system profile. To search, run: # $ nix search wget diff --git a/flake.nix b/flake.nix index eaf212e..e13921a 100644 --- a/flake.nix +++ b/flake.nix @@ -23,16 +23,12 @@ outputs = { self, nixpkgs, home-manager }: let system = "x86_64-linux"; - # overlays = [ (final: prev: { xdgTerminalExec = xdg-terminal-exec.defaultPackage; }) ]; in { nixosConfigurations = { oyvoLaptop = nixpkgs.lib.nixosSystem { inherit system; modules = [ - # ({pkgs, ...}: { - # nixpkgs.overlays = overlays; - # }) ./configuration.nix home-manager.nixosModules.home-manager # nur.nixosModules.nur diff --git a/home.nix b/home.nix index eb3101f..1acf776 100644 --- a/home.nix +++ b/home.nix @@ -104,8 +104,10 @@ in { event = "before-sleep"; command = "${pkgs.lib.getExe pkgs.swaylock} -f"; } ]; }; - - # programs.waybar = import ./wayland/waybar.nix { inherit config lib pkgs; }; + + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; + }; # configure fonts correctly fonts.fontconfig.enable = true;