Convert some older nixos-system code

This commit is contained in:
Kaare Hoff Skovgaard 2025-07-08 23:43:17 +02:00
parent 1a3c10ea78
commit 84bf6d0350
Signed by: khs
GPG key ID: C7D890804F01E9F0
45 changed files with 1653 additions and 54 deletions

View file

@ -0,0 +1,31 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.khscodes.security.yubikey;
in
{
options.khscodes.security.yubikey = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf cfg.enable {
services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ];
environment.systemPackages = [
pkgs.yubikey-manager
pkgs.yubico-piv-tool
];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
}