cleanup nas I think or something
This commit is contained in:
54
modules/nixos/security/common/default.nix
Normal file
54
modules/nixos/security/common/default.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
security = {
|
||||
rtkit.enable = lib.mkDefault true;
|
||||
|
||||
pam.u2f = {
|
||||
enable = true;
|
||||
settings.cue = true;
|
||||
};
|
||||
|
||||
# configure sudo
|
||||
sudo.enable = lib.mkDefault false;
|
||||
sudo-rs = {
|
||||
enable = lib.mkDefault true;
|
||||
extraRules = [
|
||||
{
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/reboot";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/poweroff";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
groups = [ "wheel" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
age-plugin-yubikey
|
||||
yubikey-manager
|
||||
yubikey-personalization
|
||||
yubioath-flutter
|
||||
];
|
||||
|
||||
services = {
|
||||
yubikey-agent.enable = true;
|
||||
pcscd.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
yubikey-touch-detector = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user