aboutsummaryrefslogtreecommitdiff
path: root/cluster/staging/node/cariacou.nix
blob: 818a88e3f098f89d8625be23560b3945c8966234 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Configuration file local to this node

{ config, pkgs, ... }:

{
  imports =
    [
      ./remote-unlock.nix
    ];

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.timeout = 20;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "cariacou";

  deuxfleurs.network_interface = "eno1";
  deuxfleurs.lan_ip = "192.168.1.21";
  deuxfleurs.ipv6 = "2001:910:1204:1::21";

  deuxfleurs.cluster_ip = "10.14.1.1";
  deuxfleurs.is_raft_server = true;

  # ----

  # experimental: config for nomad nix driver
  services.nomad.dropPrivileges = false;
  services.nomad.extraPackages = [
    pkgs.nix
    pkgs.git
  ];
  services.nomad.extraSettingsPlugins =
    let nomad_driver_nix = import ./nomad-driver-nix.nix { inherit pkgs; };
    in [ nomad_driver_nix ];
  # the nix driver requires flakes to be enabled
  nix.settings.experimental-features = [ "nix-command" "flakes" ];

  # use our cache as additionnal substituer
  nix.settings.substituers = [ "https://nix.web.deuxfleurs.fr" ];
  nix.settings.trusted-public-keys = [ "nix.web.deuxfleurs.fr:eTGL6kvaQn6cDR/F9lDYUIP9nCVR/kkshYfLDJf1yKs=" ];
}