Add luminance and external monitor kernel modules
This commit is contained in:
parent
56a8c33f9c
commit
ea331093bb
|
@ -26,15 +26,13 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
graphics = { config, ... }: {
|
||||
hardware =
|
||||
if config.system.nixos.release == "24.05" then {
|
||||
opengl.enable = true;
|
||||
opengl.driSupport32Bit = true;
|
||||
} else {
|
||||
graphics.enable = true;
|
||||
graphics.enable32Bit = true;
|
||||
};
|
||||
graphics = { config, pkgs, ... }: {
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
# Monitor backlight
|
||||
hardware.i2c.enable = true;
|
||||
services.ddccontrol.enable = true;
|
||||
environment.systemPackages = [ pkgs.luminance pkgs.ddcutil ];
|
||||
};
|
||||
|
||||
accounts = { pkgs, ... }: mkIf (config.common.linux.enable && !pkgs.stdenv.isAarch64) {
|
||||
|
@ -88,7 +86,7 @@ let
|
|||
enable = true;
|
||||
# defaults (no need to be set unless modified)
|
||||
quantum = 32;
|
||||
rate = 48000;
|
||||
rate = 44100;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
@ -240,6 +238,8 @@ in
|
|||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"plugdev" # Enable openrazer-daemon privileges
|
||||
"audio"
|
||||
"video"
|
||||
"input"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
environment.etc = {
|
||||
"wireplumber/main.lua.d/51-sdac.lua".source = ./sdac.lua;
|
||||
"wireplumber/wireplumber.conf.d/51-sdac.conf".source = ./sdac.conf.json;
|
||||
};
|
||||
}
|
||||
|
|
19
nki-home/audio/sdac.conf.json
Normal file
19
nki-home/audio/sdac.conf.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
monitor.alsa.rules = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
device.name = "alsa_output.usb-Grace_Design_SDAC-00.*"
|
||||
}
|
||||
]
|
||||
actions = {
|
||||
update-props = {
|
||||
# audio.format = "S24_3LE"
|
||||
audio.rate = 88200
|
||||
api.alsa.period-size = 2
|
||||
api.alsa.headroom = 0
|
||||
api.alsa.disable-batch = true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -6,7 +6,7 @@ rule = {
|
|||
},
|
||||
apply_properties = {
|
||||
["audio.format"] = "S24_3LE",
|
||||
["audio.rate"] = 96000,
|
||||
["audio.rate"] = 44100,
|
||||
["api.alsa.period-size"] = 2,
|
||||
["api.alsa.headroom"] = 0,
|
||||
["api.alsa.disable-batch"] = true
|
||||
|
|
10
overlay.nix
10
overlay.nix
|
@ -75,6 +75,14 @@ let
|
|||
builtins.seq
|
||||
(final.lib.assertMsg (prev.vikunja.version == "0.24.5") "Vikunja probably doesn't need custom versions anymore")
|
||||
(final.callPackage ./packages/common/vikunja.nix { });
|
||||
|
||||
luminance = prev.luminance.overrideAttrs (attrs: {
|
||||
nativeBuildInputs = attrs.nativeBuildInputs ++ [ final.wrapGAppsHook ];
|
||||
buildInputs = attrs.buildInputs ++ [ final.glib ];
|
||||
postInstall = attrs.postInstall + ''
|
||||
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
overlay-libs = final: prev: {
|
||||
|
@ -125,3 +133,5 @@ in
|
|||
# Bug fixes
|
||||
] # we assign the overlay created before to the overlays of nixpkgs.
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue