added stuff

This commit is contained in:
vali 2024-04-09 23:11:33 +02:00
commit 236b8c2a6b
907 changed files with 70990 additions and 0 deletions

View file

@ -0,0 +1,16 @@
{
dconf.settings = {
# this is like a system-wide dark mode switch that some apps respect
# equivalent of the following dconf command:
# `conf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"`
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
# tell virt-manager to use the system connection
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./dconf.nix # dconf settings, courtesy of the dconf module
./rnnoise.nix # rnnoise plugin for pipewire
];
}

View file

@ -0,0 +1,56 @@
{
osConfig,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (osConfig.modules) device;
format = pkgs.formats.json {};
acceptedTypes = ["desktop" "laptop"];
in {
config = mkIf (builtins.elem device.type acceptedTypes) {
# Write a PipeWire userspace configuration based on werman's noise-supression-for-voice
# for usage instructions, see:
# <https://github.com/werman/noise-suppression-for-voice?tab=readme-ov-file#linux>
xdg.configFile."pipewire/pipewire.conf.d/99-input-denoising.conf".source = format.generate "99-input-denoising.conf" {
"context.modules" = [
{
"name" = "libpipewire-module-filter-chain";
"args" = {
"node.description" = "Noise Canceling source";
"media.name" = "Noise Canceling source";
"filter.graph" = {
"nodes" = [
{
"type" = "ladspa";
"name" = "rnnoise";
"plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
"label" = "noise_suppressor_mono"; # or "noise_suppressor_stereo", consumes twice the resources
"control" = {
"VAD Threshold (%)" = 50.0;
"VAD Grace Period (ms)" = 200;
"Retroactive VAD Grace (ms)" = 0;
};
}
];
};
"audio.position" = ["FL" "FR"];
"capture.props" = {
"node.name" = "effect_input.rnnoise";
"node.passive" = true;
"audio.rate" = 48000;
};
"playback.props" = {
"node.name" = "effect_output.rnnoise";
"media.class" = "Audio/Source";
"audio.rate" = 48000;
};
};
}
];
};
};
}