niksos/modules/cli/agenix.nix

28 lines
552 B
Nix
Raw Normal View History

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