This commit is contained in:
2026-05-28 13:26:03 +01:00
parent e45cc182ee
commit acb6fb1677
3 changed files with 71 additions and 69 deletions
+1 -1
View File
@@ -271,7 +271,7 @@
]; ];
settings = { settings = {
highlight.enable = true; highlight.enable = true;
indent.enable = true; indent.enable = false;
}; };
}; };
}; };
+66 -64
View File
@@ -1,70 +1,72 @@
{ den, modules, ... }:
{ {
den,
modules,
...
}: {
modules.obs = settings: { modules.obs = settings: {
homeManager = homeManager = {
{ pkgs,
pkgs, lib,
lib, config,
config, ...
... }: {
}: programs = {
{ obs-studio = {
programs = { enable = true;
obs-studio = { package = (
enable = true; pkgs.obs-studio.override {
package = ( cudaSupport = true;
pkgs.obs-studio.override { }
cudaSupport = true; );
} plugins = with pkgs.obs-studio-plugins; [
); obs-pipewire-audio-capture
plugins = with pkgs.obs-studio-plugins; [ obs-vkcapture
obs-pipewire-audio-capture obs-vaapi #optional AMD hardware acceleration
obs-vkcapture obs-gstreamer
]; ];
};
};
systemd.user.services =
let
audio-set = lib.mkIf settings.audio {
pw-discordaudio-virtual-device = {
Unit = {
Description = "OBS daemon";
After = [ "hyprland-session.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" ''
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink
''}";
Restart = "on-failure";
RestartSec = "5s";
};
};
pw-gameaudio-virtual-device = {
Unit = {
Description = "OBS daemon";
After = [ "hyprland-session.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" ''
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink
''}";
Restart = "on-failure";
RestartSec = "5s";
};
};
};
in
lib.mergeAttrsList [ audio-set ];
wayland.windowManager.hyprland.settings = {
exec-once = [ "${config.programs.obs-studio.finalPackage}/bin/obs --startreplaybuffer" ];
}; };
}; };
systemd.user.services = let
audio-set = lib.mkIf settings.audio {
pw-discordaudio-virtual-device = {
Unit = {
Description = "OBS daemon";
After = ["hyprland-session.target"];
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" ''
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink
''}";
Restart = "on-failure";
RestartSec = "5s";
};
};
pw-gameaudio-virtual-device = {
Unit = {
Description = "OBS daemon";
After = ["hyprland-session.target"];
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" ''
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink
''}";
Restart = "on-failure";
RestartSec = "5s";
};
};
};
in
lib.mergeAttrsList [audio-set];
wayland.windowManager.hyprland.settings = {
# exec-once = ["${config.programs.obs-studio.finalPackage}/bin/obs --startreplaybuffer"];
};
};
}; };
} }
Generated
+4 -4
View File
@@ -1293,11 +1293,11 @@
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1779840216, "lastModified": 1779876223,
"narHash": "sha256-fU9m8FTjZ94muIKE5jcCYBvdGKs2qzdPgGQfNCuYlzI=", "narHash": "sha256-n7kC2IF9jUSnomS+gwwD2tuwBwRiBVNEmVlTUBVqZzs=",
"ref": "main", "ref": "main",
"rev": "2213f5814708b2734143f73385a81278d9827a64", "rev": "f0ebca7595fa8211d1b8eae0cf5850ff45a62d29",
"revCount": 81, "revCount": 83,
"type": "git", "type": "git",
"url": "https://git.molez.org/mandlm/omp-nix" "url": "https://git.molez.org/mandlm/omp-nix"
}, },