From 85558d1638a65ed1cc7fb8bd7cfc1a5474b21fdb Mon Sep 17 00:00:00 2001 From: Xelden <117323435+Xelden@users.noreply.github.com> Date: Mon, 10 Jun 2024 21:00:51 +0000 Subject: [PATCH] feat(home-manager): add support for newsboat (#217) --- .sources/sources.json | 12 ++++++++++++ modules/home-manager/all-modules.nix | 1 + modules/home-manager/newsboat.nix | 15 +++++++++++++++ test.nix | 1 + 4 files changed, 29 insertions(+) create mode 100644 modules/home-manager/newsboat.nix diff --git a/.sources/sources.json b/.sources/sources.json index e8ae0ff..7de75ea 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -264,6 +264,18 @@ "url": "https://github.com/catppuccin/mpv/archive/6cbc49a38f23a4c3f3dc816e1d43389ca9675c1b.tar.gz", "hash": "0kmwd1lqk3sa2ixh69k3qnvns998jp3hpbbb5pfq8k9qr9yp3rlv" }, + "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": { diff --git a/modules/home-manager/all-modules.nix b/modules/home-manager/all-modules.nix index 800dc31..d0803c6 100644 --- a/modules/home-manager/all-modules.nix +++ b/modules/home-manager/all-modules.nix @@ -22,6 +22,7 @@ ./kitty.nix ./kvantum.nix ./lazygit.nix + ./newsboat.nix ./mako.nix ./micro.nix ./mpv.nix diff --git a/modules/home-manager/newsboat.nix b/modules/home-manager/newsboat.nix new file mode 100644 index 0000000..0d1ca11 --- /dev/null +++ b/modules/home-manager/newsboat.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: +let + inherit (config.catppuccin) sources; + + cfg = config.programs.newsboat.catppuccin; + enable = cfg.enable && config.programs.newsboat.enable; + theme = if cfg.flavor == "latte" then "latte" else "dark"; +in +{ + options.programs.newsboat.catppuccin = lib.ctp.mkCatppuccinOpt "newsboat"; + + config = lib.mkIf enable { + programs.newsboat.extraConfig = builtins.readFile "${sources.newsboat}/themes/${theme}"; + }; +} diff --git a/test.nix b/test.nix index 9402350..f43c870 100644 --- a/test.nix +++ b/test.nix @@ -101,6 +101,7 @@ testers.runNixOSTest { micro = enable; mpv = enable; neovim = enable; + newsboat = enable; rio = enable; rofi = enable; skim = enable;