Split off sudo module.

This commit is contained in:
2023-06-30 10:26:19 +01:00
parent f5105acf66
commit 1b60dc3e87
3 changed files with 11 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
imports = [ imports = [
./impermanence.nix ./impermanence.nix
./sshd.nix ./sshd.nix
./sudo.nix
./user-ppetru.nix ./user-ppetru.nix
]; ];
@@ -14,14 +15,6 @@
keyFile = "/dev/sda"; keyFile = "/dev/sda";
}; };
security.sudo = {
extraConfig = ''
# rollback results in sudo lectures after each reboot
Defaults lecture = never
'';
wheelNeedsPassword = false;
};
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -0,0 +1,5 @@
{
security.sudo = {
wheelNeedsPassword = false;
};
}

View File

@@ -24,6 +24,11 @@
fileSystems."/var/log".options = ["compress=zstd" "noatime" ]; fileSystems."/var/log".options = ["compress=zstd" "noatime" ];
fileSystems."/var/log".neededForBoot = true; fileSystems."/var/log".neededForBoot = true;
# rollback results in sudo lectures after each reboot
security.sudo.extraConfig = ''
Defaults lecture = never
'';
# reset / at each boot # reset / at each boot
# Note `lib.mkBefore` is used instead of `lib.mkAfter` here. # Note `lib.mkBefore` is used instead of `lib.mkAfter` here.
boot.initrd.postDeviceCommands = pkgs.lib.mkBefore '' boot.initrd.postDeviceCommands = pkgs.lib.mkBefore ''