Format project using nixfmt rfc candidate.
This commit is contained in:
parent
1f63817684
commit
a9f7fe416f
91 changed files with 1347 additions and 1000 deletions
|
@ -5,7 +5,8 @@
|
|||
...
|
||||
}:
|
||||
with builtins;
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.machine;
|
||||
pkgsetList = fn.makeOptionTypeList (toString ../pkgsets);
|
||||
serviceList = fn.makeOptionTypeList (toString ../services);
|
||||
|
@ -13,7 +14,12 @@ with lib; let
|
|||
name = pname;
|
||||
value = rec {
|
||||
pkgwrap = mkOption {
|
||||
type = with types; oneOf [package (listOf package)];
|
||||
type =
|
||||
with types;
|
||||
oneOf [
|
||||
package
|
||||
(listOf package)
|
||||
];
|
||||
default = fn.pkgFilter cfg.pkgsets."${pname}".pkgs;
|
||||
description = ''
|
||||
Package Wrapper for packages using a wrapper function (like python, haskell, ...)
|
||||
|
@ -21,18 +27,19 @@ with lib; let
|
|||
};
|
||||
pkgs = mkOption {
|
||||
type = types.unspecified;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
${pname} package list.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.machine = {
|
||||
pkgs = mkOption {
|
||||
type = types.listOf (types.enum pkgsetList);
|
||||
default = ["base"];
|
||||
default = [ "base" ];
|
||||
description = ''
|
||||
The list of metapackages to be installed.
|
||||
'';
|
||||
|
@ -41,14 +48,14 @@ in {
|
|||
pkgsets = listToAttrs (map pkgOption (lists.filter (v: !(strings.hasInfix "::" v)) pkgsetList));
|
||||
services = mkOption {
|
||||
type = types.listOf (types.enum serviceList);
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of services to be enabled.
|
||||
'';
|
||||
};
|
||||
conffiles = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = ["zsh"];
|
||||
default = [ "zsh" ];
|
||||
description = ''
|
||||
List of configuration files to be enabled.
|
||||
'';
|
||||
|
@ -77,7 +84,7 @@ in {
|
|||
};
|
||||
binaryCaches = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
Adds binary caches to both nix.trustedBinaryCaches and nix.binaryCaches. ("https://cache.nixos.org" is kept by default)
|
||||
'';
|
||||
|
@ -97,28 +104,47 @@ in {
|
|||
};
|
||||
extraDomains = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
Extra domains used in various services.
|
||||
'';
|
||||
};
|
||||
mailAccounts = mkOption {
|
||||
type = types.listOf types.attrs;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of mail account user names.
|
||||
'';
|
||||
};
|
||||
vHosts = mkOption {
|
||||
type = types.listOf types.attrs;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
Domain - Service mappings for nginx vHost config.
|
||||
'';
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
(mkAliasOptionModule ["machine" "firewall"] ["networking" "firewall"])
|
||||
(mkAliasOptionModule ["machine" "allowUnfree"] ["nixpkgs" "config" "allowUnfree"])
|
||||
(mkAliasOptionModule
|
||||
[
|
||||
"machine"
|
||||
"firewall"
|
||||
]
|
||||
[
|
||||
"networking"
|
||||
"firewall"
|
||||
]
|
||||
)
|
||||
(mkAliasOptionModule
|
||||
[
|
||||
"machine"
|
||||
"allowUnfree"
|
||||
]
|
||||
[
|
||||
"nixpkgs"
|
||||
"config"
|
||||
"allowUnfree"
|
||||
]
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue