2021-11-25 11:55:30 +00:00
|
|
|
# A module that automates setting up agenix for your system.
|
2021-12-11 05:16:45 +00:00
|
|
|
{ inputs, lib, options, config, system, ... }:
|
2021-11-25 11:55:30 +00:00
|
|
|
|
2022-01-09 05:38:59 +00:00
|
|
|
let cfg = config.profiles.agenix;
|
2021-11-25 11:55:30 +00:00
|
|
|
in {
|
2022-01-09 05:38:59 +00:00
|
|
|
options.profiles.agenix.enable =
|
2021-12-11 05:16:45 +00:00
|
|
|
lib.mkEnableOption "agenix-related config 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;
|
|
|
|
};
|
|
|
|
}
|