@cryptotaxi247 / infra / commits / 43a27604

Remove delft cruft

Eelco Dolstra committed Sep 20, 2021 at 13:15 UTC 43a27604c68147a2b3da5c8a858857ca97ee3c30
6 files changed +1 -180
delft/build-machines-common.nix deleted
-20
@@ -1,20 +0,0 @@
1 -{ config, lib, pkgs, ... }:
2 -
3 -with lib;
4 -
5 -{
6 - imports = [ ./common.nix ];
7 -
8 - nix.gc.automatic = true;
9 - nix.gc.dates = "*:45";
10 - nix.gc.options = ''--max-freed "$((128 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
11 -
12 - # Randomize GC start times do we don't block all build machines at
13 - # the same time.
14 - systemd.timers.nix-gc.timerConfig.RandomizedDelaySec = "1800";
15 -
16 - users.extraUsers.root.openssh.authorizedKeys.keys = singleton
17 - ''
18 - command="nix-store --serve --write" ${readFile ./id_buildfarm.pub}
19 - '';
20 -}
delft/common.nix
+1 -2
@@ -4,8 +4,7 @@ with lib;
4
5 {
6 imports =
7 - [ ./static-net-config.nix
8 - ./diffoscope.nix
7 + [ ./diffoscope.nix
8 ../modules/common.nix
9 ../modules/prometheus
10 ];
delft/machines.nix deleted
-76
@@ -1,76 +0,0 @@
1 -lib: with lib;
2 -
3 -[ /* Physical machines. */
4 -
5 - /*
6 - { # APC UPS.
7 - hostName = "ups";
8 - ipAddress = "192.168.1.6";
9 - ethernetAddress = "00:c0:b7:5b:16:56";
10 - }
11 - */
12 -
13 - { # 8-core NixOS build machine.
14 - hostName = "stan";
15 - ipAddress = "131.180.119.74"; # fe80::222:19ff:fe55:bf2e
16 - ethernetAddress = "00:22:19:55:bf:2e";
17 - systems = [ "x86_64-linux" "i686-linux" ];
18 - maxJobs = 8;
19 - speedFactor = 2;
20 - #buildUser = "buildfarm";
21 - }
22 -
23 - /*
24 - { # 48-core NixOS build machine.
25 - hostName = "shelley";
26 - ipAddress = "192.168.1.28";
27 - ethernetAddress = "f0:4d:a2:40:10:6c";
28 - systems = [ "x86_64-linux" ];
29 - }
30 - */
31 -
32 -
33 - /* KVM VMs hosted on stan. */
34 -
35 - { # 32-bit OpenIndiana 151a (in a VM).
36 - hostName = "tweek";
37 - ipAddress = "192.168.1.50";
38 - ethernetAddress = "00:16:3e:00:00:01";
39 - systems = [ "i686-solaris" ];
40 - maxJobs = 1;
41 - buildUser = "nix";
42 - }
43 -
44 - { # Legacy FreeBSD machine.
45 - hostName = "losser";
46 - ipAddress = "192.168.1.53";
47 - ethernetAddress = "00:16:3e:00:00:04";
48 - systems = [ "i686-freebsd" ];
49 - }
50 -
51 - { # Ubuntu 10.10 test machine.
52 - hostName = "meerkat";
53 - ipAddress = "192.168.1.54";
54 - ethernetAddress = "00:16:3e:00:00:05";
55 - systems = [ "i686-linux" ];
56 - }
57 -
58 - { # 64-bit FreeBSD build machine (in a VM).
59 - hostName = "beastie";
60 - ipAddress = "192.168.1.56";
61 - ethernetAddress = "00:16:3e:00:00:07";
62 - system = "x86_64-freebsd";
63 - maxJobs = 1;
64 - buildUser = "nix";
65 - }
66 -
67 - { # 32-bit FreeBSD build machine (in a VM).
68 - hostName = "demon";
69 - ipAddress = "192.168.1.57";
70 - ethernetAddress = "00:16:3e:00:00:08";
71 - system = "i686-freebsd";
72 - maxJobs = 1;
73 - buildUser = "nix";
74 - }
75 -
76 -]
delft/megacli.nix deleted
-4
@@ -1,4 +0,0 @@
1 -{ config, pkgs, ...}:
2 -{
3 - environment.systemPackages = [ pkgs.megacli ];
4 -}
delft/static-net-config.nix deleted
-53
@@ -1,53 +0,0 @@
1 -{ name, config, lib, pkgs, ... }:
2 -
3 -with lib;
4 -
5 -let
6 -
7 - machines = import ./machines.nix pkgs.lib;
8 -
9 - machine = findSingle (m: m.hostName == name) {} {} machines;
10 -
11 - iface = "enx" + replaceChars [":"] [""] machine.ethernetAddress;
12 -
13 -in
14 -
15 -{
16 - config = mkIf (machine != {}) {
17 -
18 - # Name network interfaces after their MAC address.
19 - services.udev.extraRules =
20 - ''
21 - SUBSYSTEM!="net", GOTO="my_end"
22 - IMPORT{builtin}="net_id"
23 - KERNEL=="vnet*", GOTO="my_end"
24 - ENV{ID_NET_NAME_MAC}!="", NAME="$env{ID_NET_NAME_MAC}"
25 - LABEL="my_end"
26 - '';
27 -
28 - #networking.useDHCP = false;
29 -
30 - networking.domain = "ewi.tudelft.nl";
31 -
32 - networking.defaultGateway = mkDefault "131.180.119.1";
33 -
34 - networking.nameservers = mkDefault [ "130.161.180.1" "130.161.180.65" "131.155.0.38" ];
35 -
36 - /*
37 - networking.extraHosts =
38 - ''
39 - 2001:610:685:1:216:3eff:fe00:1 tweek
40 - 2001:610:685:1:216:3eff:fe00:5 meerkat
41 - 2001:610:685:1:216:3eff:fe00:7 beastie
42 - 2001:610:685:1:216:3eff:fe00:8 demon
43 - '';
44 - */
45 -
46 - system.build.mainPhysicalInterface = iface;
47 -
48 - networking.interfaces = listToAttrs (singleton (nameValuePair (config.system.build.mainVirtualInterface or config.system.build.mainPhysicalInterface)
49 - { ipv4.addresses = singleton { address = machine.ipAddress; prefixLength = 25; };
50 - }));
51 -
52 - };
53 -}
delft/sysstat.nix deleted
-25
@@ -1,25 +0,0 @@
1 -{ pkgs, ...}:
2 -{
3 - environment.systemPackages = [ pkgs.sysstat ];
4 -
5 - systemd.services.sa1 =
6 - { script =
7 - ''
8 - mkdir -p /var/log/sa
9 - exec ${pkgs.sysstat}/lib/sa/sa1 -S DISK 1 1
10 - '';
11 - serviceConfig.Type = "oneshot";
12 - startAt = "*:1";
13 - };
14 -
15 - systemd.services.sa2 =
16 - { path = [ pkgs.xz ];
17 - script =
18 - ''
19 - mkdir -p /var/log/sa
20 - exec ${pkgs.sysstat}/lib/sa/sa2 -A
21 - '';
22 - serviceConfig.Type = "oneshot";
23 - startAt = "23:53";
24 - };
25 -}