add mfa settings

This commit is contained in:
Sean Buckley 2021-06-09 01:40:26 -04:00
parent eb555f99d5
commit 02322bdf52
3 changed files with 25 additions and 1 deletions

View file

@ -5,6 +5,7 @@
./modules/baseline.nix
./modules/cli.nix
./modules/gnome.nix
./modules/mfa.nix
./modules/phpipam.nix
./modules/plasma.nix
./modules/profiles.nix

View file

@ -17,7 +17,6 @@
];
services = {
pcscd.enable = true;
openssh.enable = true;
zfs.autoSnapshot = { enable = true; monthly = 0; weekly = 0; };
};

24
modules/mfa.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, ... }:
let
pkcslib = "${pkgs.opensc}/lib/opensc-pkcs11.so";
in
{
services.pcscd.enable = true;
programs.ssh.startAgent = true;
programs.ssh.agentPKCS11Whitelist = pkcslib;
environment.systemPackages = [
pkgs.opensc
(pkgs.writeShellScriptBin "mfa" "exec ssh-add -s${pkcslib}")
];
nixpkgs.overlays = [
(self: super: {
gnome = super.gnome // {
gnome-keyring = super.gnome.gnome-keyring.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [ "--disable-ssh-agent" ];
});
};
})
];
}