mirror of
https://forgejo.merr.is/annika/nixos.git
synced 2025-12-11 12:03:11 -05:00
Adding yubikey-manager
This commit is contained in:
parent
2c324ff635
commit
0ffe9635ba
3 changed files with 37 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||
vscode.enable = true;
|
||||
# Utilities
|
||||
# git is not optional
|
||||
yubikey.enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./yubikey-manager.nix
|
||||
];
|
||||
}
|
||||
35
modules/common/utilities/yubikey-manager.nix
Normal file
35
modules/common/utilities/yubikey-manager.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue