nix-home/modules/personal/u2f.nix

30 lines
593 B
Nix
Raw Permalink Normal View History

2022-05-15 18:46:17 +00:00
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.personal.u2f;
in
{
options.personal.u2f = {
enable = mkEnableOption "Enable personal U2F login modules and stuff";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
pam_u2f # for pamu2fcfg
];
2022-10-27 19:05:33 +00:00
security.pam = mkIf pkgs.stdenv.isLinux {
2022-05-15 18:46:17 +00:00
u2f = {
enable = true;
cue = true;
};
# Services
2023-03-16 17:16:21 +00:00
services.sudo.u2fAuth = false;
2022-05-15 18:46:17 +00:00
services.login.u2fAuth = true;
2023-03-16 17:16:21 +00:00
services.swaylock.u2fAuth = false;
services.sshd.u2fAuth = false;
2022-05-15 18:46:17 +00:00
};
};
}