mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
17 lines
521 B
Nix
17 lines
521 B
Nix
{ lib, config, nix-secrets, ... }:
|
|
let
|
|
secretsDirectory = builtins.toString nix-secrets;
|
|
yubikey1 = lib.swarselsystems.getSecret "${secretsDirectory}/yubikey/yubikey1";
|
|
yubikey2 = lib.swarselsystems.getSecret "${secretsDirectory}/yubikey/yubikey2";
|
|
in
|
|
{
|
|
options.swarselsystems.modules.yubikey = lib.mkEnableOption "yubikey settings";
|
|
config = lib.mkIf config.swarselsystems.modules.yubikey {
|
|
pam.yubico.authorizedYubiKeys = {
|
|
ids = [
|
|
"${yubikey1}"
|
|
"${yubikey2}"
|
|
];
|
|
};
|
|
};
|
|
}
|