feat: fixup modules and add Darkman integration into XDG portals
This commit is contained in:
parent
ff55eb457d
commit
a429896dfa
@ -23,6 +23,7 @@
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
nvidia.acceptLicense = true;
|
||||
allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (pkgs.lib.getName pkg) [
|
||||
|
@ -51,6 +51,7 @@
|
||||
"default" = [ "hyprland" "wlr" ];
|
||||
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
"org.freedesktop.impl.portal.Settings" = "darkman";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -6,10 +6,9 @@
|
||||
config = lib.mkIf config.modules.audio.enable {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
audio.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
jack.enable = false;
|
||||
|
||||
wireplumber.extraConfig.bluetoothEnhancements = lib.mkIf config.modules.bluetooth.enable {
|
||||
"monitor.bluez.properties" = {
|
||||
@ -22,42 +21,6 @@
|
||||
"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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -17,8 +17,15 @@
|
||||
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings.General = {
|
||||
Experimental = true;
|
||||
ControllerMode = "dual";
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,34 +1,23 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, pkgs, lib, prefs, ... }:
|
||||
|
||||
{
|
||||
options.modules.nvidia.enable = lib.mkEnableOption "Enable NVIDIA kernel and modprobe configurations.";
|
||||
|
||||
config = lib.mkIf config.modules.nvidia.enable {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_1; # LTS
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
nvidiaSettings = true;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
forceFullCompositionPipeline = true;
|
||||
open = false; # Maxwell is not supported by open drivers
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
prime = {
|
||||
sync.enable = true;
|
||||
intelBusId = prefs.hosts.hulk.intelBusId;
|
||||
nvidiaBusId = prefs.hosts.hulk.nvidiaBusId;
|
||||
};
|
||||
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.modeset=1"
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options nvidia-drm modeset=1
|
||||
softdep nvidia pre: nvidia-drm
|
||||
'';
|
||||
|
||||
boot.initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ ... }: rec {
|
||||
{ inputs }: rec {
|
||||
users = {
|
||||
hulk = {
|
||||
username = "sadorowo";
|
||||
@ -22,6 +22,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
hosts = {
|
||||
hulk = {
|
||||
nvidiaBusId = "PCI:2:0:0";
|
||||
intelBusId = "PCI:0:2:0";
|
||||
};
|
||||
};
|
||||
|
||||
homes = {
|
||||
sadorowo = ./profiles/hulk;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user