nix-config/lib/hq.nix

28 lines
733 B
Nix

{ config, lib, ... }:
let
notHydra = config.networking.hostName != "hydra";
notServer7 = config.networking.hostName != "server7";
port = toString config.services.nix-serve.port;
in {
networking.domain = "hq.c3d2.de";
nix = {
binaryCaches = [ ]
++ (lib.optional notHydra "https://nix-serve.hq.c3d2.de")
++ (lib.optional notServer7 "http://server7.hq.c3d2.de:${port}");
binaryCachePublicKeys = [
"nix-serve.hq.c3d2.de:FEi9GyFkou1Ua8INaEKmuGaww9E5y3XwrNGNRfKYeLo="
"server7:PxMuG2KvTibHSqOWi+6bY6fbv2ztjzbSEZHVIna/sRA="
];
};
# Please import only things that are configurable and OFF BY DEFAULT!
imports = [
./yggdrasil-hq.nix
];
users.motd = builtins.readFile ./motd;
}