krebs types.secret-file: owner-name -> owner :: user

This commit is contained in:
tv 2016-02-21 07:18:13 +01:00
parent 05be525be6
commit e3ddf995e9
5 changed files with 19 additions and 6 deletions

View File

@ -104,6 +104,13 @@ let
retiolum = "hosts"; retiolum = "hosts";
}; };
krebs.users.root = {
home = "/root";
name = "root";
pubkey = config.krebs.build.host.ssh.pubkey;
uid = 0;
};
networking.extraHosts = concatStringsSep "\n" (flatten ( networking.extraHosts = concatStringsSep "\n" (flatten (
mapAttrsToList (hostname: host: mapAttrsToList (hostname: host:
mapAttrsToList (netname: net: mapAttrsToList (netname: net:

View File

@ -25,7 +25,7 @@ in {
--compare \ --compare \
--verbose \ --verbose \
--mode=${shell.escape file.mode} \ --mode=${shell.escape file.mode} \
--owner=${shell.escape file.owner-name} \ --owner=${shell.escape file.owner.name} \
--group=${shell.escape file.group-name} \ --group=${shell.escape file.group-name} \
${shell.escape file.source-path} \ ${shell.escape file.source-path} \
${shell.escape file.path} \ ${shell.escape file.path} \

View File

@ -147,8 +147,14 @@ types // rec {
options = { options = {
path = mkOption { type = str; }; path = mkOption { type = str; };
mode = mkOption { type = str; default = "0400"; }; mode = mkOption { type = str; default = "0400"; };
owner-name = mkOption { type = str; default = "root"; }; owner = mkOption {
group-name = mkOption { type = str; default = "root"; }; type = user;
default = config.krebs.users.root;
};
group-name = mkOption {
type = str;
default = "root";
};
source-path = mkOption { source-path = mkOption {
type = str; type = str;
default = toString <secrets> + "/${config._module.args.name}"; default = toString <secrets> + "/${config._module.args.name}";

View File

@ -18,7 +18,7 @@ in {
type = types.secret-file; type = types.secret-file;
default = { default = {
path = "${cfg.user.home}/dh.pem"; path = "${cfg.user.home}/dh.pem";
owner-name = "charybdis"; owner = cfg.user;
source-path = toString <secrets> + "/charybdis.dh.pem"; source-path = toString <secrets> + "/charybdis.dh.pem";
}; };
}; };
@ -26,7 +26,7 @@ in {
type = types.secret-file; type = types.secret-file;
default = { default = {
path = "${cfg.user.home}/ssl.key.pem"; path = "${cfg.user.home}/ssl.key.pem";
owner-name = "charybdis"; owner = cfg.user;
source-path = toString <secrets> + "/charybdis.key.pem"; source-path = toString <secrets> + "/charybdis.key.pem";
}; };
}; };

View File

@ -7,7 +7,7 @@ in {
type = types.secret-file; type = types.secret-file;
default = { default = {
path = "${cfg.user.home}/ejabberd.pem"; path = "${cfg.user.home}/ejabberd.pem";
owner-name = "ejabberd"; owner = cfg.user;
source-path = toString <secrets> + "/ejabberd.pem"; source-path = toString <secrets> + "/ejabberd.pem";
}; };
}; };