Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(home-manager): add support for obs-studio #324

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
fuzzel.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;
Expand Down
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
Loading