chore: code cleanup + bluetooth enhancements
This commit is contained in:
parent
fb29497c8f
commit
6cf261629e
@ -9,28 +9,21 @@
|
|||||||
../../modules/nixos/greetd.nix
|
../../modules/nixos/greetd.nix
|
||||||
../../modules/nixos/audio.nix
|
../../modules/nixos/audio.nix
|
||||||
|
|
||||||
# Apps + services
|
# Apps & services
|
||||||
../../modules/nixos/nordvpn.nix
|
../../modules/nixos/nordvpn.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
modules.fingerprint.enable = true;
|
||||||
modules.bluetooth.enable = true;
|
modules.bluetooth.enable = true;
|
||||||
modules.nordvpn.enable = true;
|
modules.nordvpn.enable = true;
|
||||||
modules.nvidia.enable = true;
|
modules.nvidia.enable = true;
|
||||||
modules.audio.enable = true;
|
modules.audio.enable = true;
|
||||||
modules.fingerprint-fix = {
|
|
||||||
enable = true;
|
|
||||||
calibDataFile = ./calib-data.bin;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
tlp.enable = false;
|
tlp.enable = false;
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
upower.enable = true;
|
upower.enable = true;
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
xserver.displayManager = {
|
|
||||||
gdm.enable = true;
|
|
||||||
startx.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
printing = {
|
printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -11,18 +11,52 @@
|
|||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
|
|
||||||
wireplumber.extraConfig.bluetoothEnhancements = {
|
wireplumber.extraConfig.bluetoothEnhancements = lib.mkIf config.modules.bluetooth.enable {
|
||||||
"monitor.bluez.properties" = {
|
"monitor.bluez.properties" = {
|
||||||
"bluez5.enable-sbc-xq" = true;
|
"bluez5.enable-sbc-xq" = true;
|
||||||
"bluez5.enable-msbc" = true;
|
"bluez5.enable-msbc" = true;
|
||||||
"bluez5.enable-hw-volume" = true;
|
"bluez5.enable-hw-volume" = true;
|
||||||
"bluez5.roles" = [
|
};
|
||||||
"hsp_hs"
|
|
||||||
"hsp_ag"
|
"wireplumber.settings" = {
|
||||||
"hfp_hf"
|
"bluetooth.autoswitch-to-headset-profile" = false;
|
||||||
"hfp_ag"
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
pipewire."90-networking" = {
|
||||||
|
"context.modules" = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-zeroconf-discover";
|
||||||
|
args = {
|
||||||
|
"pulse.latency" = 500;
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pipewire."92-low-latency" = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.rate" = 48000;
|
||||||
|
"default.clock.quantum" = 128;
|
||||||
|
"default.clock.min-quantum" = 32;
|
||||||
|
"default.clock.max-quantum" = 1024;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pipewire-pulse."92-low-latency" = {
|
||||||
|
"pulse.properties" = {
|
||||||
|
"pulse.min.req" = "32/48000";
|
||||||
|
"pulse.default.req" = "128/48000";
|
||||||
|
"pulse.max.req" = "1024/48000";
|
||||||
|
"pulse.min.quantum" = "32/48000";
|
||||||
|
"pulse.max.quantum" = "1024/48000";
|
||||||
|
};
|
||||||
|
"stream.properties" = {
|
||||||
|
"node.latency" = "32/48000";
|
||||||
|
"resample.quality" = 8;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -10,15 +10,10 @@ let
|
|||||||
module = inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor";
|
module = inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.fingerprint-fix = {
|
options.modules.fingerprint.enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads.";
|
||||||
enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads.";
|
|
||||||
calibDataFile = lib.mkOption {
|
|
||||||
description = "Path to calibration data file.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [ module ];
|
imports = [ module ];
|
||||||
config = lib.mkIf config.modules.fingerprint-fix.enable {
|
config = lib.mkIf config.modules.fingerprint.enable {
|
||||||
# Needed because we're getting TLS error with open-fprintd-resume
|
# Needed because we're getting TLS error with open-fprintd-resume
|
||||||
systemd.services.validity-restart =
|
systemd.services.validity-restart =
|
||||||
let
|
let
|
||||||
@ -30,7 +25,7 @@ in
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
description = "Restart.modules.to fix fingerprint integration";
|
description = "Restart modules to fix fingerprint integration";
|
||||||
wantedBy = targets;
|
wantedBy = targets;
|
||||||
after = targets;
|
after = targets;
|
||||||
serviceConfig.ExecStart = "systemctl restart open-fprintd python3-validity";
|
serviceConfig.ExecStart = "systemctl restart open-fprintd python3-validity";
|
||||||
@ -39,7 +34,6 @@ in
|
|||||||
services."06cb-009a-fingerprint-sensor" = {
|
services."06cb-009a-fingerprint-sensor" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
backend = "python-validity";
|
backend = "python-validity";
|
||||||
calib-data-file = config.modules.fingerprint-fix.calibDataFile;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pam.services.su.fprintAuth = true;
|
security.pam.services.su.fprintAuth = true;
|
||||||
|
@ -18,7 +18,11 @@
|
|||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${config.modules.greetd.Command}";
|
default_session.command = ''
|
||||||
|
${pkgs.greetd.tuigreet}/bin/tuigreet
|
||||||
|
--time
|
||||||
|
--cmd ${config.modules.greetd.command}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
open = false;
|
open = true;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
forceFullCompositionPipeline = true;
|
forceFullCompositionPipeline = true;
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
modules.fish = {
|
modules.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableStarship = true;
|
enableStarship = true;
|
||||||
functions = import ./fish-functions.nix;
|
functions = import ./apps/fish/functions.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user