simple impl of exposes thingy
This commit is contained in:
parent
882b2840d9
commit
f9819aa99c
11 changed files with 78 additions and 20 deletions
|
@ -1,3 +1,3 @@
|
|||
{ ... }: {
|
||||
imports = [ ./dns.nix ./flood.nix ./gnome ./unpackerr.nix ./vault.nix ];
|
||||
imports = [ ./meta.nix ./dns.nix ./flood.nix ./gnome ./unpackerr.nix ./vault.nix ];
|
||||
}
|
||||
|
|
42
nixos/common/modules/meta.nix
Normal file
42
nixos/common/modules/meta.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
exposesOpts = {
|
||||
options = {
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
example = "<name>.example.com";
|
||||
description = ''
|
||||
The domain under which this service should be available
|
||||
'';
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
example = 4242;
|
||||
description = ''
|
||||
The port under which the service runs on the host
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
meta.exposes = mkOption {
|
||||
type = with types; attrsOf (submodule exposesOpts);
|
||||
description = ''
|
||||
Exposed services
|
||||
'';
|
||||
};
|
||||
|
||||
meta.ipv4 = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
Own IPv4 Address
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue