[feat] Add goread module and config

This commit is contained in:
uttarayan21
2024-03-15 22:24:15 +05:30
parent e2503b1c28
commit 9f6137b858
9 changed files with 830 additions and 181 deletions

42
modules/goread.nix Normal file
View File

@@ -0,0 +1,42 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.programs.goread;
in {
options = {
programs.goread = {
enable = mkEnableOption "goread - a terminal RSS/Atom reader";
config = with types; {
urls = mkOption {
type = attrsOf (listOf attrs);
default = { };
description = ''
Urls that will be fetched ~/.config/goread/urls.yml
'';
example = { };
};
colorscheme = mkOption {
type = attrsOf str;
default = { };
example = { };
description = ''
Colorscheme that will be fetched ~/.config/goread/colorscheme.json
'';
};
};
};
};
config = {
home.packages = mkIf cfg.enable [ pkgs.goread ];
xdg.configFile = mkIf cfg.enable {
"goread/urls.yml".text = generators.toYAML { } cfg.config.urls;
# "goread/colorscheme.json".text = lib.generators.toJSON cfg.config.colorscheme;
};
};
}