@@ -3,6 +3,9 @@
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
boot = {
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
@@ -17,6 +20,8 @@
|
||||
};
|
||||
|
||||
home-manager.users.${user} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
programs.obs-studio.enable = true;
|
||||
|
||||
xdg.configFile."obs-studio/basic/profiles/Untitled/basic.ini".source =
|
||||
@@ -29,6 +34,12 @@
|
||||
RecEncoder = "nvenc_hevc";
|
||||
FileNameWithoutSpace = true;
|
||||
};
|
||||
Video = with hmConfig.programs.obs-studio.resolution; {
|
||||
BaseCX = base.x;
|
||||
BaseCY = base.y;
|
||||
OutputCX = output.x;
|
||||
OutputCY = output.y;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
31
hosts/common/user/configs/gui/obs/options.nix
Normal file
31
hosts/common/user/configs/gui/obs/options.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.programs.obs-studio.resolution =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
base = {
|
||||
x = mkOption {
|
||||
type = int;
|
||||
description = "Base resolution width.";
|
||||
};
|
||||
|
||||
y = mkOption {
|
||||
type = int;
|
||||
description = "Base resolution height.";
|
||||
};
|
||||
};
|
||||
|
||||
output = {
|
||||
x = mkOption {
|
||||
type = int;
|
||||
description = "Output resolution width.";
|
||||
};
|
||||
|
||||
y = mkOption {
|
||||
type = int;
|
||||
description = "Output resolution height.";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user