Allow configuriong systemd-networkd
This commit is contained in:
parent
ab8a6f8609
commit
19871a2e49
2 changed files with 25 additions and 2 deletions
|
@ -65,7 +65,6 @@ let
|
||||||
[ "plasma" "Plasma" ]
|
[ "plasma" "Plasma" ]
|
||||||
[ "pyenv" "pyenv" ]
|
[ "pyenv" "pyenv" ]
|
||||||
[ "sddm" "SDDM" ]
|
[ "sddm" "SDDM" ]
|
||||||
[ "systemd-networkd" "systemd-networkd" ]
|
|
||||||
[ "vim" "Vim" ]
|
[ "vim" "Vim" ]
|
||||||
[ "virt-manager" "Virtual Machine Manager" ]
|
[ "virt-manager" "Virtual Machine Manager" ]
|
||||||
[ "waydroid" "Waydroid" ]
|
[ "waydroid" "Waydroid" ]
|
||||||
|
@ -96,10 +95,10 @@ in
|
||||||
./programs/btrfs.nix
|
./programs/btrfs.nix
|
||||||
./programs/docker.nix
|
./programs/docker.nix
|
||||||
./programs/git.nix
|
./programs/git.nix
|
||||||
./programs/systemd-networkd.nix
|
|
||||||
./programs/nextcloud.nix
|
./programs/nextcloud.nix
|
||||||
./programs/oh-my-posh.nix
|
./programs/oh-my-posh.nix
|
||||||
./programs/rclone.nix
|
./programs/rclone.nix
|
||||||
|
./programs/systemd-networkd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
24
lib/modules/programs/systemd-networkd.nix
Normal file
24
lib/modules/programs/systemd-networkd.nix
Normal 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);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue