krebs.{backup.plans,hosts,users}.*.name: add default value

This commit is contained in:
tv 2016-02-06 18:54:01 +01:00
parent c784d271c5
commit 29746aec06
9 changed files with 18 additions and 15 deletions

View File

@ -12,7 +12,7 @@ let
enable = mkEnableOption "krebs.backup" // { default = true; };
plans = mkOption {
default = {};
type = types.attrsOf (types.submodule ({
type = types.attrsOf (types.submodule ({ config, ... }: {
# TODO enable = mkEnableOption "TODO" // { default = true; };
options = {
method = mkOption {
@ -20,6 +20,7 @@ let
};
name = mkOption {
type = types.str;
default = config._module.args.name;
};
src = mkOption {
type = types.krebs.file-location;

View File

@ -3,7 +3,7 @@
with lib;
{
hosts = addNames {
hosts = {
echelon = {
cores = 2;
dc = "lass"; #dc = "cac";
@ -214,7 +214,7 @@ with lib;
};
};
users = addNames {
users = {
lass = {
pubkey = readFile ../../Zpubkeys/lass.ssh.pub;
mail = "lass@mors.retiolum";

View File

@ -3,7 +3,7 @@
with lib;
{
hosts = addNames {
hosts = {
pnp = {
cores = 1;
dc = "makefu"; #vm on 'omo'
@ -364,7 +364,7 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIcxWFEPzke/Sdd9qNX6rSJgXal8NmINYajpFCxXfYdj root@gum";
};
};
users = addNames rec {
users = rec {
makefu = {
mail = "makefu@pornocauster.retiolum";
pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl3RTOHd5DLiVeUbUr/GSiKoRWknXQnbkIf+uNiFO+XxiqZVojPlumQUVhasY8UzDzj9tSDruUKXpjut50FhIO5UFAgsBeMJyoZbgY/+R+QKU00Q19+IiUtxeFol/9dCO+F4o937MC0OpAC10LbOXN/9SYIXueYk3pJxIycXwUqhYmyEqtDdVh9Rx32LBVqlBoXRHpNGPLiswV2qNe0b5p919IGcslzf1XoUzfE3a3yjk/XbWh/59xnl4V7Oe7+iQheFxOT6rFA30WYwEygs5As//ZYtxvnn0gA02gOnXJsNjOW9irlxOUeP7IOU6Ye3WRKFRR0+7PS+w8IJLag2xb makefu@pornocauster";

View File

@ -3,7 +3,7 @@
with lib;
{
hosts = addNames {
hosts = {
stro = {
cores = 4;
dc = "mv";
@ -31,7 +31,7 @@ with lib;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+7Qa51l0NSkBiaK2s8vQEoeObV3UPZyEzMxfUK/ZAO root@stro";
};
};
users = addNames {
users = {
mv_stro = {
mail = "mv@stro.retiolum";
pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCxM34g1GUm5EtU00DAOlGSx8MsCWunhGTrozurj460QT7EdUbZvj0AcrQC0lP9kaZyhX+KueTjmLC+ICsnlHYeg4zoSEnSAUkccuyZxfgynVc4wrpfNAc1nHjDhDb/ulnC+8wNxvxUpI0XlBgu/Y7AbbChZj3ofv6uGGHJKfG3uSyCkt9VTCi1KwydHpe9P252N8NbopnbnkT0EMkRHruh7ICEKr4/ivmUL/IUrbFicEeCy4SeRAl8+00x4WqqvbBPzgdXn0AIjKLvus3dBoQubJNpUoXnyXJbElnit5a7QcgZJNLMbV0kf9zzCGduxkADzHkAFB9D4PuSMYt62iy12QlGbm80A9ncuwaSyJf7hPTvNbU8VyCblyfRz/SCaudUrfk5Xbxxu26FHi4hZqr3IUQt4T8pD8JWYGl4n2ZKnD8hHz/jrmNBK8h9d+VFafU9t1hRxlFsW1AhMEM+kfWClyhfTcKBKbml2a657lgUEVmlZt+18kwwsivM1QhHNTgxn5urRXRkh1VQ40UQroVuV1OUmvAngyAthF441VPGc5z7kEI+D4qjmUjSy6k4dvEy/RGfsAgJCf63zilRuUbL68f2OpxE8aeZZUXPvgdLml284pry7+C5sjlnCDoJfCj/yhdVx6mU9pWUd/Q97CLQewbsYhMzsqlBlIkXuipkDQ== mv@stro";

View File

@ -32,7 +32,7 @@ let
};
});
in {
hosts = addNames {
hosts = {
wolf = {
dc = "shack";
nets = {
@ -68,7 +68,7 @@ in {
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKYMXMWZIK0jjnZDM9INiYAKcwjXs2241vew54K8veCR";
};
} // testHosts;
users = addNames {
users = {
shared = {
mail = "spam@krebsco.de";
pubkey = "lol"; # TODO krebs.users.shared.pubkey should be unnecessary

View File

@ -6,7 +6,7 @@ with lib;
dns.providers = {
de.viljetic = "regfish";
};
hosts = addNames {
hosts = {
cd = rec {
cores = 2;
dc = "tv"; #dc = "cac";
@ -351,7 +351,7 @@ with lib;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPnjfceKuHNQu7S4eYFN1FqgzMqiL7haNZMh2ZLhvuhK root@xu";
};
};
users = addNames rec {
users = rec {
mv = {
mail = "mv@cd.retiolum";
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGer9e2+Lew7vnisgBbsFNECEIkpNJgEaqQqgb9inWkQ mv@vod";

View File

@ -10,6 +10,7 @@ types // rec {
options = {
name = mkOption {
type = label;
default = config._module.args.name;
};
dc = mkOption {
type = label;
@ -155,19 +156,20 @@ types // rec {
merge = mergeOneOption;
};
user = submodule {
user = submodule ({ config, ... }: {
options = {
mail = mkOption {
type = str; # TODO retiolum mail address
};
name = mkOption {
type = str; # TODO
default = config._module.args.name;
};
pubkey = mkOption {
type = str;
};
};
};
});
# TODO
addr = str;

View File

@ -24,7 +24,7 @@ let
};
};
in {
krebs.backup.plans = addNames {
krebs.backup.plans = {
wry-to-omo_var-www = defaultPull wry "/var/www";
};
}

View File

@ -1,7 +1,7 @@
{ config, lib, ... }:
with lib;
{
krebs.backup.plans = addNames {
krebs.backup.plans = {
wu-home-xu = {
method = "push";
src = { host = config.krebs.hosts.wu; path = "/home"; };