dotfiles/modules/programs/himalaya.nix

31 lines
693 B
Nix
Raw Permalink Normal View History

2024-12-21 10:29:58 +01:00
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.himalaya;
toml = pkgs.formats.toml { };
in
{
options.my.programs.himalaya.enable = mkEnableOption "himalaya";
options.my.programs.himalaya.package = mkPackageOption pkgs "himalaya" { };
options.my.programs.himalaya.settings = mkOption {
inherit (toml) type;
default = { };
apply = toml.generate "config.toml";
};
config = mkIf cfg.enable {
home-manager.users.moritz.xdg.configFile."himalaya/config.toml".source = cfg.settings;
home-manager.users.moritz.home.packages = [ cfg.package ];
age.secrets.email = {
file = ../../secrets/email.age;
owner = "1000";
};
};
}