hosts: move to new structure

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-03 21:52:55 +03:00
parent 5fe09a598a
commit 7e2458b322
55 changed files with 538 additions and 405 deletions

View File

@ -0,0 +1,46 @@
{pkgs, ...}: let
cb-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs {
wttsrc = pkgs.fetchFromGitHub {
owner = "WeirdTreeThing";
repo = "chromebook-ucm-conf";
rev = "b6ce2a7";
hash = "sha256-QRUKHd3RQmg1tnZU8KCW0AmDtfw/daOJ/H3XU5qWTCc=";
};
postInstall = ''
cp -R $wttsrc/common/* $out/share/alsa/ucm2/common
cp -R $wttsrc/codecs/* $out/share/alsa/ucm2/codecs
cp -R $wttsrc/platforms/* $out/share/alsa/ucm2/platforms
cp -R $wttsrc/sof-rt5682 $out/share/alsa/ucm2/conf.d
cp -R $wttsrc/sof-cs42l42 $out/share/alsa/ucm2/conf.d
'';
};
in {
system.replaceDependencies.replacements = [
{
original = pkgs.alsa-ucm-conf;
replacement = cb-ucm-conf;
}
];
services.pipewire.wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/main.lua.d/51-increase-headroom.lua" ''
rule = {
matches = {
{
{ "node.name", "matches", "alsa_output.*" },
},
},
apply_properties = {
["api.alsa.headroom"] = 4096,
},
}
table.insert(alsa_monitor.rules,rule)
'')
];
boot = {
extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=3
'';
};
}