Skip to content

Commit

Permalink
feat(home-manager): add support for obs-studio
Browse files Browse the repository at this point in the history
  • Loading branch information
arminius-smh committed Aug 30, 2024
1 parent 874e668 commit 0aefe34
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .sources/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
./sway.nix
./tmux.nix
./tofi.nix
./obs-studio.nix
./waybar.nix
./yazi.nix
./zathura.nix
Expand Down
16 changes: 16 additions & 0 deletions modules/home-manager/obs-studio.nix
Original file line number Diff line number Diff line change
@@ -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}";
};
}
1 change: 1 addition & 0 deletions tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
swaylock.enable = true;
tmux.enable = true;
tofi.enable = true;
obs-studio.enable = true;
waybar.enable = true;
yazi.enable = true;
zathura.enable = true;
Expand Down

0 comments on commit 0aefe34

Please sign in to comment.