niksos/modules/cli/agenix.nix
2024-08-06 17:46:57 +02:00

28 lines
569 B
Nix

{
config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.poz.programs.agenix;
inherit (config.poz.other.system) username;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
in {
options.poz.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
];
};
};
}