audio latency shit idk
This commit is contained in:
parent
3db35ea68b
commit
5501e0b62b
4 changed files with 32 additions and 4 deletions
|
|
@ -19,6 +19,10 @@
|
|||
niri = {
|
||||
url = "github:epireyn/niri-flake";
|
||||
};
|
||||
system76-scheduler-niri = {
|
||||
url = "github:Kirottu/system76-scheduler-niri";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ in {
|
|||
inputs.niri.homeModules.niri
|
||||
|
||||
inputs.noctalia.homeModules.default
|
||||
inputs.system76-scheduler-niri.homeModules.default
|
||||
];
|
||||
options.ezpcusr = {
|
||||
enable = mkEnableOption "Enable simple PC user config";
|
||||
|
|
@ -48,6 +49,8 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.system76-scheduler-niri.enable = true;
|
||||
|
||||
services.hypridle = {
|
||||
enable = lib.mkDefault true;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,18 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
pipewire."99-custom.conf" = {
|
||||
context.modules = [
|
||||
{
|
||||
name = "libpipewire-module-rt";
|
||||
args = {
|
||||
nice.level = -11;
|
||||
rt.prio = 19;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
pipewire-pulse."92-low-latency" = mkIf cfg.lowLatency {
|
||||
context.modules = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ in {
|
|||
);
|
||||
initrd.verbose = lib.mkDefault (!cfg.fancyBoot);
|
||||
plymouth.enable = lib.mkDefault cfg.fancyBoot;
|
||||
kernelParams = lib.mkIf cfg.fancyBoot [
|
||||
kernelParams = (lib.optionals cfg.fancyBoot [
|
||||
"quiet"
|
||||
"rd.systemd.show_status=auto"
|
||||
"vt.global_cursor_default=0"
|
||||
];
|
||||
]) ++ ["threadirqs"];
|
||||
|
||||
loader.timeout = lib.mkIf cfg.fancyBoot 0;
|
||||
};
|
||||
|
|
@ -66,7 +66,7 @@ in {
|
|||
|
||||
# Make battery usage and performance sane
|
||||
# hardware.system76.power-daemon.enable = lib.mkDefault true;
|
||||
zramSwap.enable = true;
|
||||
boot.zswap.enable = lib.mkDefault true;
|
||||
services.tlp.enable = false;
|
||||
services.power-profiles-daemon.enable = lib.mkDefault false;
|
||||
services.system76-scheduler = {
|
||||
|
|
@ -101,6 +101,9 @@ in {
|
|||
services.udev.extraRules = ''
|
||||
KERNEL=="rtc0", GROUP="users"
|
||||
KERNEL=="hpet", GROUP="users"
|
||||
|
||||
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
||||
DEVPATH=="/devices/virtual/misc/hpet", OWNER="root", GROUP="audio", MODE="0660"
|
||||
'';
|
||||
|
||||
# Allows more open files, useful for sync software and some other stuff
|
||||
|
|
@ -129,6 +132,12 @@ in {
|
|||
}
|
||||
|
||||
# Allows greater realtime priority, useful for audio, emulators, games, etc
|
||||
{
|
||||
domain = "@audio";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = "90";
|
||||
}
|
||||
{
|
||||
domain = "@users";
|
||||
type = "-";
|
||||
|
|
@ -150,7 +159,7 @@ in {
|
|||
extraGroups = [
|
||||
"adbusers" # run ADB commands
|
||||
"audio" # soundcard access
|
||||
"rtkit" # realtime stuff?
|
||||
"rtkit" # realtime stuff (incl audio)
|
||||
"video" # webcam access (and maybe wayland too?)
|
||||
"libvirtd" # run VMs through libvirt
|
||||
"kvm" # run KVM VMs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue