diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-11-29 12:50:51 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-11-29 12:50:51 +0100 |
commit | 60f2c59471b29dc45803a02071a965cdea06a5b1 (patch) | |
tree | cce1645bff27ef45993627dd609c757e90e6104a /nixos/modules/system/boot/networkd.nix | |
parent | 0ee0489d42e6f0df5991113caee6feae97bca057 (diff) | |
download | nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.tar nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.tar.gz nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.tar.bz2 nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.tar.lz nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.tar.xz nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.tar.zst nixpkgs-60f2c59471b29dc45803a02071a965cdea06a5b1.zip |
nixos/networkd: mark `units` option as internal
The options at `systemd.network` (`links`, `netdevs` and `networks`) are directly mapped to the three different unit types of `systemd-networkd(8)`. However there's also the option `systemd.network.units` which is basically used as a container for generated unit-configs that are linked to `/etc/systemd/networkd`[1]. This should not be exposed to the user as it's unclear whether or not it should be used directly which can be pretty confusing which is why I decided to declare this option as internal (including all sub-options as `internal` doesn't seem to be propagated to submodules). [1] https://github.com/NixOS/nixpkgs/blob/9db75ed88fd87e17ec448ad7a43b62acb4842854/nixos/modules/system/boot/networkd.nix#L933-L937
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 226769f1059..71668fdfccc 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -911,9 +911,10 @@ in systemd.network.units = mkOption { description = "Definition of networkd units."; default = {}; + internal = true; type = with types; attrsOf (submodule ( { name, config, ... }: - { options = concreteUnitOptions; + { options = mapAttrs (_: x: x // { internal = true; }) concreteUnitOptions; config = { unit = mkDefault (makeUnit name config); }; |