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