chore: code cleanup + bluetooth enhancements
This commit is contained in:
parent
fb29497c8f
commit
6cf261629e
@ -9,28 +9,21 @@
|
||||
../../modules/nixos/greetd.nix
|
||||
../../modules/nixos/audio.nix
|
||||
|
||||
# Apps + services
|
||||
# Apps & services
|
||||
../../modules/nixos/nordvpn.nix
|
||||
];
|
||||
|
||||
modules.fingerprint.enable = true;
|
||||
modules.bluetooth.enable = true;
|
||||
modules.nordvpn.enable = true;
|
||||
modules.nvidia.enable = true;
|
||||
modules.audio.enable = true;
|
||||
modules.fingerprint-fix = {
|
||||
enable = true;
|
||||
calibDataFile = ./calib-data.bin;
|
||||
};
|
||||
|
||||
services = {
|
||||
tlp.enable = false;
|
||||
gvfs.enable = true;
|
||||
upower.enable = true;
|
||||
power-profiles-daemon.enable = true;
|
||||
xserver.displayManager = {
|
||||
gdm.enable = true;
|
||||
startx.enable = true;
|
||||
};
|
||||
|
||||
printing = {
|
||||
enable = true;
|
||||
|
@ -11,18 +11,52 @@
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
wireplumber.extraConfig.bluetoothEnhancements = {
|
||||
wireplumber.extraConfig.bluetoothEnhancements = lib.mkIf config.modules.bluetooth.enable {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
};
|
||||
|
||||
"wireplumber.settings" = {
|
||||
"bluetooth.autoswitch-to-headset-profile" = false;
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
in
|
||||
{
|
||||
options.modules.fingerprint-fix = {
|
||||
enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads.";
|
||||
calibDataFile = lib.mkOption {
|
||||
description = "Path to calibration data file.";
|
||||
};
|
||||
};
|
||||
options.modules.fingerprint.enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads.";
|
||||
|
||||
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
|
||||
systemd.services.validity-restart =
|
||||
let
|
||||
@ -30,7 +25,7 @@ in
|
||||
];
|
||||
in
|
||||
{
|
||||
description = "Restart.modules.to fix fingerprint integration";
|
||||
description = "Restart modules to fix fingerprint integration";
|
||||
wantedBy = targets;
|
||||
after = targets;
|
||||
serviceConfig.ExecStart = "systemctl restart open-fprintd python3-validity";
|
||||
@ -39,7 +34,6 @@ in
|
||||
services."06cb-009a-fingerprint-sensor" = {
|
||||
enable = true;
|
||||
backend = "python-validity";
|
||||
calib-data-file = config.modules.fingerprint-fix.calibDataFile;
|
||||
};
|
||||
|
||||
security.pam.services.su.fprintAuth = true;
|
||||
|
@ -18,7 +18,11 @@
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
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 = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
open = false;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
forceFullCompositionPipeline = true;
|
||||
|
@ -68,7 +68,7 @@
|
||||
modules.fish = {
|
||||
enable = true;
|
||||
enableStarship = true;
|
||||
functions = import ./fish-functions.nix;
|
||||
functions = import ./apps/fish/functions.nix;
|
||||
};
|
||||
|
||||
programs.obs-studio = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user