❄️ Dotfiles and NixOS configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

host/misc: configure sudo stuff

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>

+33 -19
+27 -19
host/common/misc.nix
··· 29 29 QML2_IMPORT_PATH = map (qt: "/${qt.qtbase.qtQmlPrefix}") qtVersions; 30 30 }; 31 31 32 - security.sudo.extraRules = [ 33 - { 34 - groups = ["wheel"]; 35 - commands = [ 36 - { 37 - command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; 38 - options = ["NOPASSWD"]; 39 - } 40 - { 41 - command = "${pkgs.systemd}/bin/systemctl"; 42 - options = ["NOPASSWD"]; 43 - } 44 - { 45 - command = "/run/current-system/sw/bin/podman"; 46 - options = ["NOPASSWD"]; 47 - } 48 - ]; 49 - } 50 - ]; 32 + security.sudo = { 33 + extraConfig = '' 34 + Defaults lecture = always 35 + Defaults lecture_file = ${../../misc/lecture.txt} 36 + Defaults pwfeedback 37 + Defaults passwd_timeout=0 38 + ''; 39 + extraRules = [ 40 + { 41 + groups = ["wheel"]; 42 + commands = [ 43 + { 44 + command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; 45 + options = ["NOPASSWD"]; 46 + } 47 + { 48 + command = "${pkgs.systemd}/bin/systemctl"; 49 + options = ["NOPASSWD"]; 50 + } 51 + { 52 + command = "/run/current-system/sw/bin/podman"; 53 + options = ["NOPASSWD"]; 54 + } 55 + ]; 56 + } 57 + ]; 58 + }; 51 59 52 60 services.udisks2.enable = true; 53 61
+6
misc/lecture.txt
··· 1 + 2 +  "Bee" careful __ 3 + with sudo! // \ 4 + \\_/ // 5 + ''-.._.-''-.._.. -(||)(') 6 + '''