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

25 lines
631 B
Nix
Raw Normal View History

2024-12-07 22:45:31 +00:00
{ 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);
};
};
};
};
}