aboutsummaryrefslogtreecommitdiff
path: root/site/neptune.nix
blob: b29442c5784267e7668a240e6a4d176d89c807ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ config, pkgs, ... }:

{
  networking.defaultGateway = {
    address = "192.168.1.254";
    interface = "eno1";
  };

  services.nomad.settings.datacenter = "neptune";

  networking.firewall.allowedTCPPorts = [ 80 443 ];

  services.cron = {
    enable = true;
    systemCronJobs = [
      "0 2 * * * ${config.system.path}/bin/nix-collect-garbage --delete-older-than 10d >> /root/nix_gc_log 2>&1"
      "30 2 * * * ${config.system.path}/bin/docker run --rm -it -v /var/lib/drone/nix:/nix nixpkgs/nix:nixos-21.05 nix-collect-garbage --delete-older-than 10d >> /root/drone_nix_gc_log 2>&1"
    ];
  };
}