2021-11-25 11:55:30 +00:00
|
|
|
# A module that automates setting up agenix for your system.
|
|
|
|
{ inputs, lib, options, config, ... }:
|
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
let cfg = config.modules.agenix;
|
2021-11-25 11:55:30 +00:00
|
|
|
in {
|
2021-11-25 13:45:48 +00:00
|
|
|
options.modules.agenix.enable =
|
|
|
|
lib.mkEnableOption "Enable agenix on your system";
|
2021-11-25 11:55:30 +00:00
|
|
|
|
|
|
|
imports = [ inputs.agenix.nixosModules.age ];
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
# Enable all relevant services.
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
|
|
|
};
|
|
|
|
services.sshd.enable = true;
|
|
|
|
services.openssh.enable = true;
|
|
|
|
};
|
|
|
|
}
|