From 64f2d42a1160067ef55fcb5e69b6b454e9588e39 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 5 Sep 2019 17:05:14 +0200 Subject: [PATCH] Add Hydra binary cache to common config --- lib/common/c3d2.nix | 15 +++++++++++---- lib/{ => common}/motd | 0 lib/users.nix | 2 -- 3 files changed, 11 insertions(+), 6 deletions(-) rename lib/{ => common}/motd (100%) diff --git a/lib/common/c3d2.nix b/lib/common/c3d2.nix index f3b0625e..5d66d5d9 100644 --- a/lib/common/c3d2.nix +++ b/lib/common/c3d2.nix @@ -1,11 +1,18 @@ { config, pkgs, ... }: { - imports = [./common.nix]; + imports = [ ./common.nix ]; - networking = { - domain = "hq.c3d2.de"; - defaultGateway.address = "172.22.99.1"; + users.motd = builtins.readFile ./motd; + + networking.domain = "hq.c3d2.de"; + + nix = if config.services.nix-serve.enable then + { } + else { + binaryCaches = [ "https://nix-serve.hq.c3d2.de" ]; + binaryCachePublicKeys = + [ "nix-serve.hq.c3d2.de:FEi9GyFkou1Ua8INaEKmuGaww9E5y3XwrNGNRfKYeLo=" ]; }; } diff --git a/lib/motd b/lib/common/motd similarity index 100% rename from lib/motd rename to lib/common/motd diff --git a/lib/users.nix b/lib/users.nix index 55e485e7..818432e5 100644 --- a/lib/users.nix +++ b/lib/users.nix @@ -1,8 +1,6 @@ { pkgs, ... }: { - users.motd = builtins.readFile ./motd; - users.users.k-ot = { packages = with pkgs; [ screen tmux ];