refactor os configurations
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 2m10s
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 2m10s
This commit is contained in:
@ -1,20 +1,32 @@
|
||||
{ config, lib, inputs, pkgs, ... }:
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# yubikey.nix :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2025/09/05 23:47:20 by tomoron #+# #+# #
|
||||
# Updated: 2025/09/06 01:03:54 by tomoron ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.mods.yubikey = {
|
||||
options.mods.yubikey.pam = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "enable yubikey";
|
||||
};
|
||||
default = false;
|
||||
description = "enable yubikey pam module\nuse `ykpamcfg` to configure";
|
||||
};
|
||||
|
||||
id = lib.mkOption {
|
||||
type = lib.str;
|
||||
description = "yubikey id";
|
||||
};
|
||||
id = lib.mkOption {
|
||||
type = lib.str;
|
||||
description = "id of the yubikey written under connector";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.yubikey.enable {
|
||||
config = lib.mkIf config.mods.yubikey.pam.enable {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
@ -22,8 +34,12 @@
|
||||
|
||||
security.pam.yubico = {
|
||||
enable = true;
|
||||
id = config.mods.yubikey.id;
|
||||
id = config.mods.yubikey.pam.id;
|
||||
mode = "challenge-response";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubico-pam
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user