kartei tv: move around hostFiles & co.
This commit is contained in:
parent
cda9bcfaff
commit
9cb022698e
@ -1,7 +1,17 @@
|
|||||||
with import ../../lib;
|
with import ../../lib;
|
||||||
{ config, ... }: let
|
{ config, ... }: {
|
||||||
|
dns.providers = {
|
||||||
evalHost = hostName: hostConfig: evalSubmodule types.host [
|
"viljetic.de" = "regfish";
|
||||||
|
};
|
||||||
|
hosts =
|
||||||
|
mapAttrs
|
||||||
|
(hostName: hostFile: let
|
||||||
|
hostSource = import hostFile;
|
||||||
|
hostConfig = getAttr (typeOf hostSource) {
|
||||||
|
lambda = hostSource { inherit config lib; };
|
||||||
|
set = hostSource;
|
||||||
|
};
|
||||||
|
in evalSubmodule types.host [
|
||||||
hostConfig
|
hostConfig
|
||||||
{
|
{
|
||||||
name = hostName;
|
name = hostName;
|
||||||
@ -31,31 +41,13 @@ with import ../../lib;
|
|||||||
type = head (toList (match "ssh-([^ ]+) .*" host.config.ssh.pubkey));
|
type = head (toList (match "ssh-([^ ]+) .*" host.config.ssh.pubkey));
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
])
|
||||||
|
(mapAttrs'
|
||||||
hostFiles =
|
|
||||||
mapAttrs'
|
|
||||||
(name: type: {
|
(name: type: {
|
||||||
name = removeSuffix ".nix" name;
|
name = removeSuffix ".nix" name;
|
||||||
value = ./hosts + "/${name}";
|
value = ./hosts + "/${name}";
|
||||||
})
|
})
|
||||||
(readDir ./hosts);
|
(readDir ./hosts));
|
||||||
|
|
||||||
in {
|
|
||||||
dns.providers = {
|
|
||||||
"viljetic.de" = "regfish";
|
|
||||||
};
|
|
||||||
hosts =
|
|
||||||
mapAttrs
|
|
||||||
(hostName: hostFile: let
|
|
||||||
hostSource = import hostFile;
|
|
||||||
hostConfig = getAttr (typeOf hostSource) {
|
|
||||||
lambda = hostSource { inherit config lib; };
|
|
||||||
set = hostSource;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
evalHost hostName hostConfig)
|
|
||||||
hostFiles;
|
|
||||||
sitemap = {
|
sitemap = {
|
||||||
"http://cgit.krebsco.de" = {
|
"http://cgit.krebsco.de" = {
|
||||||
desc = "Git repositories";
|
desc = "Git repositories";
|
||||||
|
Loading…
Reference in New Issue
Block a user