mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
hardware/yubikey: init from nitrokey
This commit is contained in:
parent
ae77e8c649
commit
29b0fb499c
4 changed files with 26 additions and 22 deletions
|
@ -22,8 +22,8 @@ in
|
||||||
};
|
};
|
||||||
graphics.cpuFlavor = cpuFlavor;
|
graphics.cpuFlavor = cpuFlavor;
|
||||||
keychron.enable = true;
|
keychron.enable = true;
|
||||||
nitrokey.enable = true;
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
thunderbolt.enable = true;
|
thunderbolt.enable = true;
|
||||||
|
yubikey.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
./firmware
|
./firmware
|
||||||
./graphics
|
./graphics
|
||||||
./keychron
|
./keychron
|
||||||
./nitrokey
|
./yubikey
|
||||||
./sound
|
./sound
|
||||||
./thunderbolt
|
./thunderbolt
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.my.hardware.nitrokey;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my.hardware.nitrokey = {
|
|
||||||
enable = lib.mkEnableOption "nitrokey configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
|
|
||||||
programs = {
|
|
||||||
ssh.startAgent = false;
|
|
||||||
gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
24
modules/hardware/yubikey/default.nix
Normal file
24
modules/hardware/yubikey/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.hardware.yubikey;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.hardware.yubikey = {
|
||||||
|
enable = lib.mkEnableOption "yubikey configuration";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
|
programs = {
|
||||||
|
ssh.startAgent = false;
|
||||||
|
gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
yubikey-manager
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue