infra/roles/nix-daemon.nix
Jonas Chevalier 37e48b712e
move things around a bit ()
* keep ./services for instances

./profiles is for config-only modules

./services are like profiles, but configure a single instance of a
service. Those are fronted by Nginx as the load-balancer and have a DNS
entry as well.

* ci: build build03 as well

* move hydra to services

* move matterbridge to services

* move marvin-mk2 to services

* build01: share the remainder profiles

* build02: use the nix-community-cache

* fixup kexec

* rename profiles to roles

* README: sync with reality
2021-03-07 16:28:44 +00:00

39 lines
855 B
Nix

{ config, lib, pkgs, ... }:
let
asGB = size: toString (size * 1024 * 1024);
in
{
nix = {
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
binaryCaches = [
"https://nix-community.cachix.org"
];
# useful for ad-hoc nix-shell's for debugging
nixPath = [ "nixpkgs=${pkgs.path}" ];
extraOptions = ''
# auto-free the /nix/store
min-free = ${asGB 10}
max-free = ${asGB 200}
# avoid copying unecessary stuff over SSH
builders-use-substitutes = true
# allow flakes
experimental-features = nix-command flakes
'';
# Hard-link duplicated files
autoOptimiseStore = true;
# Add support for flakes
package = pkgs.nixUnstable;
gc.automatic = true;
gc.options = "--delete-older-than 30d";
};
}