Add suppport for multiple Domains.

This commit is contained in:
Kevin Baensch 2019-10-08 13:15:38 +02:00
parent a4fde6972f
commit bc22db3e1b
5 changed files with 79 additions and 32 deletions

View file

@ -4,26 +4,23 @@ with lib;
{
options.machine = {
allowUnfree = mkOption {
type = types.bool;
description = ''
Wether to allow the installation of unfree packages.
'';
};
pkgs = mkOption {
type = types.listOf types.str;
default = [ "base" ];
description = ''
The list of metapackages to be installed.
'';
};
services = mkOption {
type = types.listOf types.str;
default = [];
description = ''
List of services to be enabled.
'';
};
conffiles = mkOption {
type = types.listOf types.str;
default = [ "zsh" ];
description = ''
List of configuration files to be enabled.
'';
@ -54,14 +51,23 @@ with lib;
The Machines domain name.
'';
};
extraDomains = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra domains used in various services.
'';
};
mailAccounts = mkOption {
type = types.listOf types.attrs;
default = [];
description = ''
List of mail account user names.
'';
};
vHosts = mkOption {
type = types.listOf types.attrs;
default = [];
description = ''
Domain - Service mappings for nginx vHost config.
'';
@ -74,5 +80,8 @@ with lib;
'';
};
};
imports = [(mkAliasOptionModule [ "machine" "firewall" ] [ "networking" "firewall" ])];
imports = [
(mkAliasOptionModule [ "machine" "firewall" ] [ "networking" "firewall" ])
(mkAliasOptionModule [ "machine" "allowUnfree" ] [ "nixpkgs" "config" "allowUnfree" ])
];
}