WIP: network module
This commit is contained in:
parent
ade7b261ae
commit
e4cdc2cae5
4 changed files with 354 additions and 0 deletions
29
nixos/default.nix
Normal file
29
nixos/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
vmixLib = import ./../lib {inherit pkgs lib; };
|
||||
vmixCfg = config.vmix;
|
||||
vmixNetwork = import ./modules/network.nix { inherit config pkgs lib ;};
|
||||
vmixNetworkFunctions = import ./functions/network.nix { inherit pkgs lib ;};
|
||||
#vmixVM = import ./modules/network.nix { inherit config pkgs lib ;};
|
||||
in
|
||||
{
|
||||
options.vmix = {
|
||||
networks = lib.mkOption {
|
||||
type = types.attrsOf
|
||||
(types.submodule vmixNetwork);
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
with vmixNetworkFunctions;
|
||||
#with vmixVMFunctions;
|
||||
let
|
||||
networkServices = lib.concatMapAttrs mkNetworkService vmixCfg.networks;
|
||||
#vmServices = lib.concatMapAttrs mkVMService vmixCfg.vms;
|
||||
in
|
||||
{
|
||||
systemd.services = namespaceGlobalService // networkServices;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue