Remove OBS declarative resolution

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-05-20 09:38:53 +01:00
parent 1c554f1700
commit ab1c9a4a78
4 changed files with 4 additions and 92 deletions

View File

@@ -2,10 +2,7 @@
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ config, pkgs, ... }:
let
hmConfig = config.home-manager.users.${user};
in
{ config, ... }:
{
boot = {
kernelModules = [ "v4l2loopback" ];
@@ -19,27 +16,5 @@ in
"/persist"."${home}/.config/obs-studio" = { };
};
home-manager.users.${user} = {
imports = [ ./options.nix ];
programs.obs-studio.enable = true;
xdg.configFile."obs-studio/basic/profiles/Untitled/basic.ini".source =
(pkgs.formats.ini { }).generate "basic.ini"
{
SimpleOutput = {
FilePath = "${home}/Videos";
VBitrate = 4000;
ABitrate = 320;
RecEncoder = "nvenc_hevc";
FileNameWithoutSpace = true;
};
Video = with hmConfig.programs.obs-studio.resolution; {
BaseCX = base.x;
BaseCY = base.y;
OutputCX = output.x;
OutputCY = output.y;
};
};
};
home-manager.users.${user}.programs.obs-studio.enable = true;
}

View File

@@ -1,35 +0,0 @@
{ lib, ... }:
{
options.programs.obs-studio.resolution =
with lib;
with types;
{
base = {
x = mkOption {
type = int;
description = "Base resolution width.";
default = 1920;
};
y = mkOption {
type = int;
description = "Base resolution height.";
default = 1080;
};
};
output = {
x = mkOption {
type = int;
description = "Output resolution width.";
default = 1920;
};
y = mkOption {
type = int;
description = "Output resolution height.";
default = 1080;
};
};
};
}