Adding yubikey-manager

This commit is contained in:
Annika Merris 2024-05-27 09:36:51 -04:00
parent 2c324ff635
commit 0ffe9635ba
3 changed files with 37 additions and 0 deletions

View file

@ -75,6 +75,7 @@ inputs.nixpkgs.lib.nixosSystem {
vscode.enable = true; vscode.enable = true;
# Utilities # Utilities
# git is not optional # git is not optional
yubikey.enable = true;
} }
]; ];
} }

View file

@ -2,5 +2,6 @@
{ {
imports = [ imports = [
./git.nix ./git.nix
./yubikey-manager.nix
]; ];
} }

View file

@ -0,0 +1,35 @@
{ config, pkgs, lib, ... }:
{
options = {
yubikey = {
enable = lib.mkEnableOption {
description = "Enable yubikey utilities";
default = false;
};
};
};
config = lib.mkIf (config.yubikey.enable)
(
lib.mkMerge [
(
lib.mkIf (config.gui.enable) {
home-manager.users.${config.user} = {
home.packages = [
pkgs.yubikey-manager-qt
pkgs.yubikey-manager
];
};
}
)
(
lib.mkIf (!config.gui.enable) {
home-manager.users.${config.user} = {
home.packages = [
pkgs.yubikey-manager
];
};
}
)
];
);
}