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