Skip to content

Commit

Permalink
feat(home-manager): add support for newsboat
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelden committed Jun 8, 2024
1 parent 0cdfa29 commit 8d67390
Show file tree
Hide file tree
Showing 4 changed files with 33 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 @@ -288,6 +288,18 @@
"url": "https://github.com/catppuccin/mpv/archive/7fc6ed93dec891865d0b42be42ba9b4fb7d5a338.tar.gz",
"hash": "10h7xl9fxrakibi1f61ca9l1i528fnhbyqfz16k096yiklr2aa22"
},
"newsboat": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "catppuccin",
"repo": "newsboat"
},
"branch": "main",
"revision": "be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0f",
"url": "https://github.com/catppuccin/newsboat/archive/be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0f.tar.gz",
"hash": "04ib4lvma5959n943f7myzbc2blmb8n2dd7bkb0xgl2rnpfx2fvk"
},
"nvim": {
"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 @@ -22,6 +22,7 @@
./kitty.nix
./kvantum.nix
./lazygit.nix
./newsboat.nix
./mako.nix
./micro.nix
./mpv.nix
Expand Down
19 changes: 19 additions & 0 deletions modules/home-manager/newsboat.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;

cfg = config.programs.newsboat.catppuccin;
enable = cfg.enable && config.programs.newsboat.enable;
theme = "themes/" + (if cfg.flavor == "latte" then "latte" else "dark");
in
{
options.programs.newsboat.catppuccin = lib.ctp.mkCatppuccinOpt "newsboat";

config = lib.mkIf enable {
xdg.configFile."newsboat/${theme}".source = "${sources.newsboat}/${theme}";

programs.newsboat.extraConfig = ''
include ${config.xdg.configHome}/newsboat/${theme}
'';
};
}
1 change: 1 addition & 0 deletions test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ testers.runNixOSTest {
micro = enable;
mpv = enable;
neovim = enable;
newsboat = enable;
rio = enable;
rofi = enable;
skim = enable;
Expand Down

0 comments on commit 8d67390

Please sign in to comment.