move mfa to pofiles

This commit is contained in:
Sean Buckley 2021-06-11 16:36:50 -04:00
parent fe9cd1b680
commit 73e40f81c6
3 changed files with 20 additions and 25 deletions

View file

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

View file

@ -1,24 +0,0 @@
{ 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" ];
});
};
})
];
}

View file

@ -2,6 +2,9 @@
with lib;
let
cfg = config.sconfig.profile;
pkcslib = "${pkgs.opensc}/lib/opensc-pkcs11.so";
in
{
options.sconfig.profile = mkOption {
@ -22,6 +25,20 @@ in
(mkIf (cfg == "desktop") {
services.pcscd.enable = true;
programs.ssh.startAgent = true;
programs.ssh.agentPKCS11Whitelist = pkcslib;
nixpkgs.overlays = [
(self: super: {
gnome = super.gnome // {
gnome-keyring = super.gnome.gnome-keyring.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [ "--disable-ssh-agent" ];
});
};
})
];
environment.systemPackages = with pkgs; [
brave
gimp
@ -34,6 +51,9 @@ in
glxinfo
steam-run
pkgs.opensc
(pkgs.writeShellScriptBin "mfa" "exec ssh-add -s${pkcslib}")
(vscode-with-extensions.override {
vscode = vscodium;
vscodeExtensions = with pkgs.vscode-extensions; [