aboutsummaryrefslogtreecommitdiffstats
path: root/modules/nixos/jaki/pamconfig.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/jaki/pamconfig.nix')
-rw-r--r--modules/nixos/jaki/pamconfig.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/nixos/jaki/pamconfig.nix b/modules/nixos/jaki/pamconfig.nix
new file mode 100644
index 0000000..4e9f3eb
--- /dev/null
+++ b/modules/nixos/jaki/pamconfig.nix
@@ -0,0 +1,29 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.sils.pamconfig;
+in {
+ options.sils.pamconfig.enable = lib.mkEnableOption "custom pamconfig";
+ config = lib.mkIf cfg.enable {
+ security.pam = {
+ services = {
+ swaylock = {};
+ sudo = {
+ u2fAuth = true;
+ };
+ login = {
+ u2fAuth = true;
+ };
+ };
+ u2f = {
+ enable = true;
+ settings = {
+ cue = true;
+ authFile = config.age.secrets.pamu2f-mappings.path;
+ };
+ };
+ };
+ };
+}