diff --git a/.sources/sources.json b/.sources/sources.json index c8a5634..9b82da1 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -300,6 +300,18 @@ "url": "https://github.com/catppuccin/nvim/archive/4fd72a9ab64b393c2c22b168508fd244877fec96.tar.gz", "hash": "1fznbifj9xayimdjld2zhn9003mgp93sd87lpaky7pr6nsgsgnb8" }, + "obs": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "obs" + }, + "branch": "main", + "revision": "b17939991545bdd6232e688ec5004b6dfae46f69", + "url": "https://github.com/catppuccin/obs/archive/b17939991545bdd6232e688ec5004b6dfae46f69.tar.gz", + "hash": "15ndpcy8a37997vd14z08arlv3zk5ldlmb7s7i63dz15yxqnaaym" + }, "palette": { "type": "Git", "repository": { diff --git a/modules/home-manager/all-modules.nix b/modules/home-manager/all-modules.nix index 26436de..441e8e0 100644 --- a/modules/home-manager/all-modules.nix +++ b/modules/home-manager/all-modules.nix @@ -41,6 +41,7 @@ ./sway.nix ./tmux.nix ./tofi.nix + ./obs-studio.nix ./waybar.nix ./yazi.nix ./zathura.nix diff --git a/modules/home-manager/obs-studio.nix b/modules/home-manager/obs-studio.nix new file mode 100644 index 0000000..d739bac --- /dev/null +++ b/modules/home-manager/obs-studio.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: +let + inherit (config.catppuccin) sources; + cfg = config.programs.obs-studio.catppuccin; + enable = cfg.enable && config.programs.obs-studio.enable; + + themeName = "Catppuccin_${lib.ctp.mkUpper cfg.flavor}.ovt"; +in +{ + options.programs.obs-studio.catppuccin = lib.ctp.mkCatppuccinOpt {name = "obs-studio";}; + + config = lib.mkIf enable { + xdg.configFile."obs-studio/themes/Catppuccin.obt".source = "${sources.obs}/themes/Catppuccin.obt"; + xdg.configFile."obs-studio/themes/${themeName}".source = "${sources.obs}/themes/${themeName}"; + }; +} diff --git a/tests/darwin.nix b/tests/darwin.nix index 8e5b81c..d7e230c 100644 --- a/tests/darwin.nix +++ b/tests/darwin.nix @@ -22,6 +22,7 @@ hyprlock.enable = lib.mkForce false; imv.enable = lib.mkForce false; mpv.enable = lib.mkForce false; # NOTE: same as cava, but `mpv` fails to build currently + obs-studio.enable = lib.mkForce false; rio.enable = lib.mkForce false; # marked as broken rofi.enable = lib.mkForce false; swaylock.enable = lib.mkForce false; diff --git a/tests/home.nix b/tests/home.nix index 494c322..f13cba0 100644 --- a/tests/home.nix +++ b/tests/home.nix @@ -54,6 +54,7 @@ swaylock.enable = true; tmux.enable = true; tofi.enable = true; + obs-studio.enable = true; waybar.enable = true; yazi.enable = true; zathura.enable = true;