declutter fingerprint module
This commit is contained in:
parent
7eb580c33b
commit
a0b3de5875
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
hardware-configuration.nix
|
||||
networking.nix
|
||||
calib-data.bin
|
||||
|
@ -1,20 +1,20 @@
|
||||
{ self, ... }:
|
||||
|
||||
let
|
||||
inherit (self) inputs;
|
||||
system = "x86_64-linux";
|
||||
homeDir = self + /profiles;
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
mkSystem = pkgs: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./base-configuration.nix
|
||||
./${hostname}
|
||||
homeDir
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
inherit (self) inputs;
|
||||
system = "x86_64-linux";
|
||||
homeDir = self + /profiles;
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
mkSystem = pkgs: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./base-configuration.nix
|
||||
./${hostname}
|
||||
homeDir
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
in {
|
||||
hulk = mkSystem inputs.nixpkgs "hulk";
|
||||
hulk = mkSystem inputs.nixpkgs "hulk";
|
||||
}
|
||||
|
11
hosts/hulk/networking.nix
Normal file
11
hosts/hulk/networking.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
networkManagerEnabled = true;
|
||||
wirelessEnabled = false;
|
||||
in {
|
||||
networking.networkmanager.enable = pkgs.lib.mkIf networkManagerEnabled true;
|
||||
|
||||
networking.wireless.enable = pkgs.lib.mkIf wirelessEnabled true;
|
||||
networking.wireless.userControlled.enable = pkgs.lib.mkIf wirelessEnabled true;
|
||||
}
|
@ -1,17 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services."06cb-009a-fingerprint-sensor" = {
|
||||
enable = true;
|
||||
backend = "python-validity";
|
||||
calib-data-file = ./calib-data.bin;
|
||||
};
|
||||
|
||||
services.greetd-hyprland.enable = true;
|
||||
services.nvidia.enable = true;
|
||||
services.fingerprint-fix.enable = true;
|
||||
|
||||
services.fprintd.enable = pkgs.lib.mkForce true;
|
||||
services.fingerprint-fix = {
|
||||
enable = true;
|
||||
calibDataFile = ./calib-data.bin;
|
||||
};
|
||||
|
||||
services.upower.enable = true;
|
||||
services.udev.enable = true;
|
||||
@ -29,13 +24,6 @@
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
extraConfig.pipewire.context.properties = {
|
||||
default.clock.allowed-rates = [ 44100 48000 96000 ];
|
||||
log.level = 4;
|
||||
default.clock.quantum = 256;
|
||||
default.clock.min-quantum = 256;
|
||||
default.clock.max-quantum = 256;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.bluetooth.serviceConfig.ExecStart = pkgs.lib.mkForce [
|
||||
@ -56,4 +44,6 @@
|
||||
STOP_CHARGE_THRESH_BAT0 = 80;
|
||||
};
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
}
|
||||
|
@ -1,19 +1,30 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.services.fingerprint-fix.enable = lib.mkEnableOption "Enable systemd service to restart fingerprint services after suspend.";
|
||||
options.services.fingerprint-fix.enable = lib.mkEnableOption "Enable systemd service to restart fingerprint services after suspend.";
|
||||
options.services.fingerprint-fix.calibDataFile = lib.mkOption {
|
||||
description = "Path to calibration data file.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.fingerprint-fix.enable {
|
||||
systemd.services.validity-restart = let
|
||||
targets = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
|
||||
in {
|
||||
description = "Restart services to fix fingerprint integration";
|
||||
wantedBy = targets;
|
||||
after = targets;
|
||||
serviceConfig = {
|
||||
type = "oneshot";
|
||||
ExecStart = "systemctl restart python3-validity.service";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.services.fingerprint-fix.enable {
|
||||
systemd.services.validity-restart = let
|
||||
targets = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
|
||||
in {
|
||||
description = "Restart services to fix fingerprint integration";
|
||||
wantedBy = targets;
|
||||
after = targets;
|
||||
serviceConfig = {
|
||||
type = "oneshot";
|
||||
ExecStart = "systemctl restart python3-validity.service";
|
||||
};
|
||||
};
|
||||
services."06cb-009a-fingerprint-sensor" = {
|
||||
enable = true;
|
||||
backend = "python-validity";
|
||||
calib-data-file = config.services.fingerprint-fix.calibDataFile;
|
||||
};
|
||||
|
||||
services.open-fprintd.enable = lib.mkForce true; # Fprintd is not working with P51s
|
||||
systemd.services.open-fprintd-resume.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ in {
|
||||
imports = [
|
||||
./packages.nix # Packages to install
|
||||
./programs.nix # Programs to enable
|
||||
./files.nix # Files to create
|
||||
./theme.nix # System-wide/GTK theme
|
||||
./portal.nix # Desktop portals
|
||||
];
|
||||
|
||||
home = {
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
xdg.configFile."gtk-3.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-icon-theme-name=Adwaita
|
||||
'';
|
||||
}
|
@ -28,9 +28,6 @@ in {
|
||||
'';
|
||||
packages = with pkgs; [
|
||||
hyprland hyprlock hypridle hyprshot wl-clipboard cliphist swww
|
||||
lxqt.lxqt-policykit
|
||||
stdenv.cc.cc.lib
|
||||
|
||||
pywal pywalfox-native
|
||||
|
||||
(python3.withPackages (py: with py; [
|
||||
|
29
profiles/hulk/portal.nix
Normal file
29
profiles/hulk/portal.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
portals-config = pkgs.writeTextDir "share/xdg-desktop-portal/portals/portals.conf" ''
|
||||
[preferred]
|
||||
default=hyprland
|
||||
org.freedesktop.impl.portal.Settings=darkman
|
||||
'';
|
||||
packages = [
|
||||
pkgs.xdg-desktop-portal
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.darkman
|
||||
];
|
||||
portals = pkgs.symlinkJoin {
|
||||
name = "xdg-portals";
|
||||
paths = [ portals-config ] ++ packages;
|
||||
pathsToLink = [
|
||||
"/share/xdg-desktop-portal/portals"
|
||||
"/share/applications"
|
||||
];
|
||||
};
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
XDG_DESKTOP_PORTAL_DIR = "${portals}/share/xdg-desktop-portal/portals";
|
||||
};
|
||||
|
||||
home.packages = packages;
|
||||
}
|
@ -20,15 +20,23 @@
|
||||
${pkgs.dconf}/bin/dconf write\
|
||||
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
||||
'';
|
||||
|
||||
wallpaper = ''
|
||||
$HOME/.config/hypr/scripts/random-wallpaper.sh
|
||||
'';
|
||||
};
|
||||
|
||||
lightModeScripts = {
|
||||
gtk-theme = ''
|
||||
${pkgs.dconf}/bin/dconf write\
|
||||
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
||||
'';
|
||||
|
||||
wallpaper = ''
|
||||
$HOME/.config/hypr/scripts/random-wallpaper.sh
|
||||
'';
|
||||
};
|
||||
settings = {
|
||||
usegeoclue = true;
|
||||
};
|
||||
|
||||
settings.usegeoclue = false;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user