2024-07-15 21:53:54 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-07-15 23:18:25 +02:00
|
|
|
cfg = config.poz.programs.agenix;
|
2024-07-15 21:53:54 +02:00
|
|
|
|
2024-07-15 23:18:25 +02:00
|
|
|
inherit (config.poz.other.system) username;
|
2024-07-15 21:53:54 +02:00
|
|
|
|
2024-07-25 11:45:44 +02:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.options) mkEnableOption;
|
2024-07-15 21:53:54 +02:00
|
|
|
in {
|
2024-07-15 23:18:25 +02:00
|
|
|
options.poz.programs.agenix = {
|
2024-07-15 21:53:54 +02:00
|
|
|
enable = mkEnableOption "agenix";
|
|
|
|
};
|
|
|
|
|
|
|
|
imports = [ inputs.agenix.nixosModules.default ];
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home-manager.users.${username} = {
|
|
|
|
home.packages = [
|
|
|
|
inputs.agenix.packages.${pkgs.system}.default
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|