mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
polkit WIP: enable forgotten config for NetworkManager
and only authorize "active" sessions.
This commit is contained in:
parent
cd49dfd335
commit
1c0fdf2309
@ -40,10 +40,11 @@ let
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
subject.isInGroup("networkmanager")
|
||||
&& subject.active
|
||||
&& (action.id.indexOf("org.freedesktop.NetworkManager.") == 0
|
||||
|| action.id.indexOf("org.freedesktop.ModemManager.") == 0
|
||||
))
|
||||
{ return polkit.Result.YES; } #TODO: active/inactive
|
||||
{ return polkit.Result.YES; }
|
||||
});
|
||||
'';
|
||||
|
||||
@ -189,8 +190,7 @@ in {
|
||||
systemctl restart NetworkManager
|
||||
'';
|
||||
|
||||
#TODO
|
||||
#security.polkit.permissions = polkitConf;
|
||||
security.polkit.extraConfig = polkitConf;
|
||||
|
||||
# openvpn plugin has only dbus interface
|
||||
services.dbus.packages = cfg.packages ++ [
|
||||
|
Loading…
Reference in New Issue
Block a user