feat: add pimalaya profile
This commit is contained in:
parent
6913bb4ee3
commit
d2a4ec7f03
9 changed files with 638 additions and 29 deletions
30
modules/programs/himalaya.nix
Normal file
30
modules/programs/himalaya.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue