From 928ac9f153682aa2a98213a39b6732591a8c27a6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 9 Sep 2016 19:38:12 +0200 Subject: k 4 types: add default value for user.mail --- krebs/4lib/types.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs/4lib/types.nix') diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 37d44606..02ca2b8d 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -284,6 +284,7 @@ types // rec { }; mail = mkOption { type = str; # TODO retiolum mail address + default = "${config._module.args.name}@${config.networking.hostName}.r"; }; name = mkOption { type = username; -- cgit v1.2.3 From 7c91a1954992db9fa06619753faa3a193a196040 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:49:04 +0200 Subject: lib: don't define defaults that require config --- krebs/4lib/types.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'krebs/4lib/types.nix') diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 02ca2b8d..8d6ace2e 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -1,14 +1,9 @@ -{ config, lib, ... }: +{ lib, ... }: with builtins; with lib; with types; -let - # Inherited attributes are used in submodules that have their own `config`. - inherit (config.krebs) build users; -in - types // rec { host = submodule ({ config, ... }: { @@ -27,7 +22,6 @@ types // rec { owner = mkOption { type = user; - default = users.krebs; }; extraZones = mkOption { @@ -49,10 +43,6 @@ types // rec { ssh.pubkey = mkOption { type = nullOr ssh-pubkey; default = null; - apply = x: - optionalTrace (x == null && config.owner.name == build.user.name) - "The option `krebs.hosts.${config.name}.ssh.pubkey' is unused." - x; }; ssh.privkey = mkOption { type = nullOr ssh-privkey; @@ -187,7 +177,6 @@ types // rec { }; owner = mkOption { type = user; - default = users.root; }; group-name = mkOption { type = str; -- cgit v1.2.3