flake: rework modules folder structure

This commit is contained in:
Veneficium 2024-12-23 19:49:03 +01:00
parent 5d64c56d40
commit 0952665f6b
56 changed files with 3 additions and 3 deletions

View file

@ -0,0 +1,21 @@
{ config, lib, ... }:
{
options.settings.services.pam = {
enable = lib.mkEnableOption "enables PAM";
sshd = {
useGoogleAuth = lib.mkEnableOption "use pam_google_authenticator.so module";
gnupg = lib.mkEnableOption "enable gnuPG integration";
};
};
config = lib.mkIf config.settings.services.pam.enable {
security.pam = {
services.sshd = {
name = "sshd";
unixAuth = true;
googleAuthenticator.enable = config.settings.services.pam.sshd.useGoogleAuth;
gnupg.enable = config.settings.services.pam.sshd.gnupg;
};
};
};
}