mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add mfa settings
This commit is contained in:
parent
eb555f99d5
commit
02322bdf52
3 changed files with 25 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
24
modules/mfa.nix
Normal 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" ];
|
||||
});
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
}
|
Loading…
Reference in a new issue