niksos/modules/cli/agenix.nix

27 lines
552 B
Nix

{
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
];
};
};
}