mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-10 21:00:06 +00:00
fix: disable git warn-dirty messages
feat: finish yubikey login and sudo requests setup
This commit is contained in:
parent
6443c085d4
commit
9a1f243b49
4 changed files with 50 additions and 14 deletions
40
modules/nixos/security/yubikey/default.nix
Normal file
40
modules/nixos/security/yubikey/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.security.yubikey;
|
||||
in
|
||||
{
|
||||
options.${namespace}.security.yubikey = with types; {
|
||||
enable = mkEnableOption "Enable the Yubikey as a security device.";
|
||||
key-id = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "30650551" ];
|
||||
example = [ "123456" "1234567" ];
|
||||
description = "Register additional Yubikey IDs.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ yubikey-manager yubioath-flutter ];
|
||||
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
services.pcscd.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
security.pam.yubico = {
|
||||
enable = true;
|
||||
debug = false;
|
||||
mode = "challenge-response";
|
||||
id = cfg.key-id;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue