mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
Merge pull request #1734 from ocharles/network-manager
NetworkManager: Fix aliases and dependencies
This commit is contained in:
commit
adf007be2b
|
@ -89,7 +89,7 @@ in {
|
|||
to change network settings to this group.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
packages = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [ ];
|
||||
|
@ -178,7 +178,7 @@ in {
|
|||
description = "NetworkManager initialisation";
|
||||
wantedBy = [ "network.target" ];
|
||||
partOf = [ "NetworkManager.service" ];
|
||||
wants = [ "ModemManager.service" ];
|
||||
wants = [ "ModemManager.service" "NetworkManager.service" ];
|
||||
before = [ "NetworkManager.service" ];
|
||||
script = ''
|
||||
mkdir -m 700 -p /etc/NetworkManager/system-connections
|
||||
|
|
|
@ -57,12 +57,14 @@ stdenv.mkDerivation rec {
|
|||
postInstall =
|
||||
''
|
||||
mkdir -p $out/lib/NetworkManager
|
||||
|
||||
|
||||
# FIXME: Workaround until NixOS' dbus+systemd supports at_console policy
|
||||
substituteInPlace $out/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf --replace 'at_console="true"' 'group="networkmanager"'
|
||||
|
||||
# As NixOS doesn't seem to handle systemd Aliases, we just rename the dispatcher service file
|
||||
mv $out/etc/systemd/system/NetworkManager-dispatcher.service $out/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
|
||||
# systemd in NixOS doesn't use `systemctl enable`, so we need to establish
|
||||
# aliases ourselves.
|
||||
ln -s $out/etc/systemd/system/NetworkManager-dispatcher.service $out/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
|
||||
ln -s $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue