yubikey: New module

This commit is contained in:
PapaTutuWawa 2023-07-19 16:23:10 +02:00
parent e429bdb946
commit 6699d5488a
3 changed files with 44 additions and 4 deletions

View File

@ -56,6 +56,7 @@
direnv.enable = true; direnv.enable = true;
}; };
services = { services = {
yubikey.enable = true;
cups.enable = true; cups.enable = true;
gnome.enable = false; gnome.enable = false;
kanshi = let kanshi = let
@ -120,10 +121,16 @@
enable = true; enable = true;
layout = "de"; layout = "de";
libinput.enable = true; libinput.enable = true;
}; };
}; };
virtualisation.docker.enable = true; virtualisation = {
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ansible ansible
@ -135,10 +142,11 @@
mgba mupen64plus melonds desmume dolphin mgba mupen64plus melonds desmume dolphin
]; ];
}) })
]; ];
programs = { programs = {
gnupg.agent.pinentryFlavor = "qt"; gnupg.agent = {
pinentryFlavor = "qt";
};
}; };
} }

View File

@ -36,6 +36,7 @@
./services/greetd ./services/greetd
./services/cups ./services/cups
./services/logiops ./services/logiops
./services/yubikey
# User # User
#./users/default.nix #./users/default.nix

View File

@ -0,0 +1,31 @@
{ lib, config, pkgs, ...}:
let
cfg = config.ptw.services.yubikey;
in {
options.ptw.services.yubikey = {
enable = lib.mkEnableOption "Enable everything for using a YubiKey";
};
config = lib.mkIf cfg.enable {
services = {
# Unprivileged access to the YubiKey
udev.packages = [ pkgs.yubikey-personalization ];
# Allow using the YubiKey as a smart card
pcscd.enable = true;
};
environment.systemPackages = with pkgs; [
# Management
yubikey-manager-qt yubikey-manager yubico-piv-tool
];
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
}