PortValhalla/lib/modules/programs/systemd-networkd.nix

24 lines
631 B
Nix

{ lib, ... }:
let
inherit (lib) mkEnableOption mkOption types;
in
{
options = {
valhalla = {
linux.programs.systemd-networkd = {
enable = mkEnableOption "systemd-networkd";
networks = mkOption {
type = types.attrsOf types.attrs;
description = "The networks to configure.";
};
networkFiles = mkOption {
type = types.attrsOf types.str;
description = "The files for configuring the networks.";
default = builtins.mapAttrs (name: network: lib.generators.toINI { listsAsDuplicateKeys = true; } network);
};
};
};
};
}