Allow configuriong systemd-networkd

This commit is contained in:
Manuel Thalmann 2024-12-07 23:45:31 +01:00
parent 726dd5da4a
commit 31da52f412
2 changed files with 25 additions and 2 deletions

View file

@ -65,7 +65,6 @@ let
[ "plasma" "Plasma" ]
[ "pyenv" "pyenv" ]
[ "sddm" "SDDM" ]
[ "systemd-networkd" "systemd-networkd" ]
[ "vim" "Vim" ]
[ "virt-manager" "Virtual Machine Manager" ]
[ "waydroid" "Waydroid" ]
@ -96,10 +95,10 @@ in
./programs/btrfs.nix
./programs/docker.nix
./programs/git.nix
./programs/systemd-networkd.nix
./programs/nextcloud.nix
./programs/oh-my-posh.nix
./programs/rclone.nix
./programs/systemd-networkd.nix
];
options = {

View file

@ -0,0 +1,24 @@
{ 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);
};
};
};
};
}