mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-17 14:49:10 +02:00
wip: migrate client modules
This commit is contained in:
parent
f6d2ff1544
commit
7ce27d5d2f
245 changed files with 20254 additions and 188 deletions
29
modules-clone/nixos/client/polkit.nix
Normal file
29
modules-clone/nixos/client/polkit.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, config, minimal, ... }:
|
||||
{
|
||||
options.swarselmodules.security = lib.mkEnableOption "security config";
|
||||
config = lib.mkIf config.swarselmodules.security {
|
||||
|
||||
security = {
|
||||
# pki.certificateFiles = [
|
||||
# config.sops.secrets.harica-root-ca.path
|
||||
# ];
|
||||
pam.services = lib.mkIf (!minimal) {
|
||||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
sshd.u2fAuth = false;
|
||||
swaylock = {
|
||||
u2fAuth = true;
|
||||
fprintAuth = false;
|
||||
};
|
||||
};
|
||||
polkit.enable = lib.mkIf (!minimal) true;
|
||||
|
||||
sudo.extraConfig = ''
|
||||
Defaults env_keep+=SSH_AUTH_SOCK
|
||||
'' + lib.optionalString (!minimal) ''
|
||||
Defaults env_keep+=XDG_RUNTIME_DIR
|
||||
Defaults env_keep+=WAYLAND_DISPLAY
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue