mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +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) {
|
polkit.addRule(function(action, subject) {
|
||||||
if (
|
if (
|
||||||
subject.isInGroup("networkmanager")
|
subject.isInGroup("networkmanager")
|
||||||
|
&& subject.active
|
||||||
&& (action.id.indexOf("org.freedesktop.NetworkManager.") == 0
|
&& (action.id.indexOf("org.freedesktop.NetworkManager.") == 0
|
||||||
|| action.id.indexOf("org.freedesktop.ModemManager.") == 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
|
systemctl restart NetworkManager
|
||||||
'';
|
'';
|
||||||
|
|
||||||
#TODO
|
security.polkit.extraConfig = polkitConf;
|
||||||
#security.polkit.permissions = polkitConf;
|
|
||||||
|
|
||||||
# openvpn plugin has only dbus interface
|
# openvpn plugin has only dbus interface
|
||||||
services.dbus.packages = cfg.packages ++ [
|
services.dbus.packages = cfg.packages ++ [
|
||||||
|
Loading…
Reference in New Issue
Block a user