Convert some older nixos-system code
This commit is contained in:
parent
1a3c10ea78
commit
84bf6d0350
45 changed files with 1653 additions and 54 deletions
31
nix/modules/nixos/security/yubikey/default.nix
Normal file
31
nix/modules/nixos/security/yubikey/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue