diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-05-11 15:54:16 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-22 12:23:45 +0200 |
commit | 6bd4e0b8cd8a5f043492846d7ee4531349962102 (patch) | |
tree | 57ffa0b5a08410d4bea68cb85ea3ffe1e0f3af6f /nixos/modules | |
parent | 65700b435c8a495e5ff7071e41db34bf49b9ef89 (diff) | |
download | nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.tar nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.tar.gz nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.tar.bz2 nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.tar.lz nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.tar.xz nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.tar.zst nixlib-6bd4e0b8cd8a5f043492846d7ee4531349962102.zip |
Create systemd-{network,resolve} user/group unconditionally
This shuts up this error from dbus: May 11 13:52:16 machine dbus-daemon[259]: Unknown username "systemd-network" in message bus configuration file May 11 13:52:16 machine dbus-daemon[259]: Unknown username "systemd-resolve" in message bus configuration file which happens because the D-Bus config for networkd/resolved is enabled unconditionally, and we don't have an easy way to turn it off. (cherry picked from commit f19b58fb6a5cc55af6d8d8ca7979f8e64255d2d0)
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 3 | ||||
-rw-r--r-- | nixos/modules/system/boot/resolved.nix | 3 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index b183c0f32366..34eea9af83b1 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -641,9 +641,6 @@ in environment.etc."systemd/network".source = generateUnits "network" cfg.units [] []; - users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network; - users.extraGroups.systemd-network.gid = config.ids.gids.systemd-network; - systemd.services.systemd-networkd = { wantedBy = [ "multi-user.target" ]; before = [ "network-interfaces.target" ]; diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix index ecd547322d3c..5a98b9b6d480 100644 --- a/nixos/modules/system/boot/resolved.nix +++ b/nixos/modules/system/boot/resolved.nix @@ -30,9 +30,6 @@ with lib; DNS=${concatStringsSep " " config.networking.nameservers} ''; - users.extraUsers.systemd-resolve.uid = config.ids.uids.systemd-resolve; - users.extraGroups.systemd-resolve.gid = config.ids.gids.systemd-resolve; - }; } diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index d001feb063b4..557dc204fca3 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -648,6 +648,11 @@ in ${pkgs.acl}/bin/setfacl -nm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal || true ''; + users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network; + users.extraGroups.systemd-network.gid = config.ids.gids.systemd-network; + users.extraUsers.systemd-resolve.uid = config.ids.uids.systemd-resolve; + users.extraGroups.systemd-resolve.gid = config.ids.gids.systemd-resolve; + # Target for ‘charon send-keys’ to hook into. users.extraGroups.keys.gid = config.ids.gids.keys; |