mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
allow users to restart/stop wireguard vpn
This commit is contained in:
parent
a12f6f5f96
commit
07ef08868d
@ -59,6 +59,21 @@
|
|||||||
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ]; # Enable ‘sudo’ for the user.
|
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ]; # Enable ‘sudo’ for the user.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Allow users to start/stop wireguard vpn
|
||||||
|
security.sudo.extraRules = [{
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemc}/bin/systemctl restart wg-quick-wg0";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemc}/bin/systemctl stop wg-quick-wg0";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
}];
|
||||||
|
|
||||||
# List packages installed in system profile.
|
# List packages installed in system profile.
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# One-off stable packages
|
# One-off stable packages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user