@cryptotaxi247 / infra / commits / 423ca86c

move ngi0 to separate repo (#333)

See #326

Jonas Chevalier committed Jan 17, 2024 at 12:48 UTC 423ca86cb303f9d15bc55e827fa450c1185cf56f
13 files changed -856
ngi0/makemake/flake.lock deleted
-128
@@ -1,128 +0,0 @@
1 -{
2 - "nodes": {
3 - "flake-compat": {
4 - "flake": false,
5 - "locked": {
6 - "lastModified": 1673956053,
7 - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
8 - "owner": "edolstra",
9 - "repo": "flake-compat",
10 - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
11 - "type": "github"
12 - },
13 - "original": {
14 - "owner": "edolstra",
15 - "repo": "flake-compat",
16 - "type": "github"
17 - }
18 - },
19 - "hydra": {
20 - "inputs": {
21 - "nix": "nix",
22 - "nixpkgs": "nixpkgs"
23 - },
24 - "locked": {
25 - "lastModified": 1701903565,
26 - "narHash": "sha256-CBiJjoReHRMPvDFHxTnrfgte/i6D2s1dmAOeAKKA7Uc=",
27 - "owner": "NixOS",
28 - "repo": "hydra",
29 - "rev": "11f8030b0f4c75ed7640563d68200cf3ec59edec",
30 - "type": "github"
31 - },
32 - "original": {
33 - "owner": "NixOS",
34 - "ref": "ca-derivations-prep",
35 - "repo": "hydra",
36 - "type": "github"
37 - }
38 - },
39 - "lowdown-src": {
40 - "flake": false,
41 - "locked": {
42 - "lastModified": 1633514407,
43 - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
44 - "owner": "kristapsdz",
45 - "repo": "lowdown",
46 - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
47 - "type": "github"
48 - },
49 - "original": {
50 - "owner": "kristapsdz",
51 - "repo": "lowdown",
52 - "type": "github"
53 - }
54 - },
55 - "nix": {
56 - "inputs": {
57 - "flake-compat": "flake-compat",
58 - "lowdown-src": "lowdown-src",
59 - "nixpkgs": [
60 - "hydra",
61 - "nixpkgs"
62 - ],
63 - "nixpkgs-regression": "nixpkgs-regression"
64 - },
65 - "locked": {
66 - "lastModified": 1701122567,
67 - "narHash": "sha256-iA8DqS+W2fWTfR+nNJSvMHqQ+4NpYMRT3b+2zS6JTvE=",
68 - "owner": "NixOS",
69 - "repo": "nix",
70 - "rev": "50f8f1c8bc019a4c0fd098b9ac674b94cfc6af0d",
71 - "type": "github"
72 - },
73 - "original": {
74 - "owner": "NixOS",
75 - "ref": "2.19.2",
76 - "repo": "nix",
77 - "type": "github"
78 - }
79 - },
80 - "nixpkgs": {
81 - "locked": {
82 - "lastModified": 1687379288,
83 - "narHash": "sha256-cSuwfiqYfeVyqzCRkU9AvLTysmEuSal8nh6CYr+xWog=",
84 - "owner": "NixOS",
85 - "repo": "nixpkgs",
86 - "rev": "ef0bc3976340dab9a4e087a0bcff661a8b2e87f3",
87 - "type": "github"
88 - },
89 - "original": {
90 - "owner": "NixOS",
91 - "ref": "nixos-23.05",
92 - "repo": "nixpkgs",
93 - "type": "github"
94 - }
95 - },
96 - "nixpkgs-regression": {
97 - "locked": {
98 - "lastModified": 1643052045,
99 - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
100 - "owner": "NixOS",
101 - "repo": "nixpkgs",
102 - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
103 - "type": "github"
104 - },
105 - "original": {
106 - "owner": "NixOS",
107 - "repo": "nixpkgs",
108 - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
109 - "type": "github"
110 - }
111 - },
112 - "root": {
113 - "inputs": {
114 - "hydra": "hydra",
115 - "nix": [
116 - "hydra",
117 - "nix"
118 - ],
119 - "nixpkgs": [
120 - "hydra",
121 - "nixpkgs"
122 - ]
123 - }
124 - }
125 - },
126 - "root": "root",
127 - "version": 7
128 -}
ngi0/makemake/flake.nix deleted
-110
@@ -1,110 +0,0 @@
1 -{
2 - inputs.nixpkgs.follows = "hydra/nixpkgs";
3 - inputs.nix.follows = "hydra/nix";
4 - inputs.hydra.url = "github:NixOS/hydra/ca-derivations-prep";
5 -
6 - outputs = { self, nixpkgs, nix, hydra }: {
7 -
8 - nixosConfigurations.makemake = nixpkgs.lib.nixosSystem {
9 - system = "x86_64-linux";
10 -
11 - modules = [
12 - ../../modules/common.nix
13 - hydra.nixosModules.hydra
14 - ./hydra.nix
15 - ./hydra-proxy.nix
16 - ./hardware.nix
17 -
18 - ({ config, lib, pkgs, ... }: {
19 -
20 - networking.hostName = "makemake";
21 -
22 - nixpkgs.overlays =
23 - [ nix.overlays.default
24 - ];
25 -
26 - #system.configurationRevision = self.rev
27 - # or (throw "Cannot deploy from an unclean source tree!");
28 -
29 - nix.registry.nixpkgs.flake = nixpkgs;
30 - nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
31 -
32 - /*
33 - deployment.targetEnv = "hetzner";
34 - deployment.hetzner.mainIPv4 = "116.202.113.248"; # 2a01:4f8:231:4187::2
35 - deployment.hetzner.createSubAccount = false;
36 -
37 - deployment.hetzner.partitionCommand =
38 - ''
39 - if ! [ -e /usr/local/sbin/zfs ]; then
40 - echo "installing zfs..."
41 - bash -i -c 'echo y | zfsonlinux_install'
42 - fi
43 -
44 - umount -R /mnt || true
45 -
46 - zpool destroy rpool || true
47 -
48 - for disk in /dev/nvme0n1 /dev/nvme1n1; do
49 - echo "partitioning $disk..."
50 - index="''${disk: -3:1}"
51 - parted -s $disk "mklabel msdos"
52 - parted -a optimal -s $disk "mkpart primary ext4 1m 256m"
53 - parted -a optimal -s $disk "mkpart primary zfs 256m 100%"
54 - udevadm settle
55 - mkfs.ext4 -L boot$index ''${disk}p1
56 - done
57 -
58 - echo "creating ZFS pool..."
59 - zpool create -f -o ashift=12 -O atime=off -O compression=lz4 -O xattr=sa -O acltype=posixacl \
60 - rpool mirror /dev/nvme0n1p2 /dev/nvme1n1p2
61 - zfs set mountpoint=legacy rpool
62 -
63 - zfs create -o primarycache=all -o recordsize=16k -o logbias=throughput rpool/root
64 - zfs create -o primarycache=all -o recordsize=16k -o logbias=throughput rpool/postgres
65 - '';
66 -
67 - deployment.hetzner.mountCommand =
68 - ''
69 - mkdir -p /mnt
70 - mount -t zfs rpool/root /mnt
71 - mkdir -p /mnt/postgres
72 - mount -t zfs rpool/postgres /mnt/postgres
73 - mkdir -p /mnt/boot
74 - mount /dev/disk/by-label/boot0 /mnt/boot
75 - '';
76 - */
77 -
78 - fileSystems."/" =
79 - { device = "rpool/root";
80 - fsType = "zfs";
81 - };
82 -
83 - fileSystems."/boot" =
84 - { device = "/dev/disk/by-label/boot0";
85 - fsType = "ext4";
86 - };
87 -
88 - fileSystems."/postgres" =
89 - { device = "rpool/postgres";
90 - fsType = "zfs";
91 - };
92 -
93 - networking = {
94 - hostId = "5240310e";
95 - firewall.allowedTCPPorts = [ 80 443 ];
96 - firewall.allowPing = true;
97 - firewall.logRefusedConnections = true;
98 - };
99 -
100 - boot.loader.grub.devices = [ "/dev/nvme0n1" "/dev/nvme1n1" ];
101 - boot.loader.grub.copyKernels = true;
102 -
103 - users.extraUsers.root.openssh.authorizedKeys.keys =
104 - (import ../../ssh-keys.nix).ngi-admins;
105 - })
106 - ];
107 - };
108 -
109 - };
110 -}
ngi0/makemake/hardware.nix deleted
-38
@@ -1,38 +0,0 @@
1 -{ lib, ... }:
2 -
3 -{
4 - system.stateVersion = lib.mkDefault "23.05";
5 -
6 - networking = {
7 - defaultGateway = {
8 - address = "116.202.113.193";
9 - interface = "eth0";
10 - };
11 - defaultGateway6 = { address = "fe80::1"; interface = "eth0"; };
12 - interfaces.eth0 = {
13 - ipv4.addresses = [
14 - { address = "116.202.113.248"; prefixLength = 26; }
15 - ];
16 - ipv6.addresses = [
17 - { address = "2a01:4f8:231:4187::"; prefixLength = 64; }
18 - ];
19 - };
20 - nameservers = [
21 - "213.133.98.98"
22 - "213.133.99.99"
23 - "213.133.100.100"
24 - "2a01:4f8:0:a0a1::add:1010"
25 - "2a01:4f8:0:a102::add:9999"
26 - "2a01:4f8:0:a111::add:9898"
27 - ];
28 - };
29 -
30 - services.udev.extraRules = ''
31 - ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="70:85:c2:f4:7d:27", NAME="eth0"
32 - '';
33 -
34 - boot.initrd.availableKernelModules = [ "ahci" "nvme" ];
35 - boot.kernelModules = [ "kvm-amd" ];
36 -
37 - nix.maxJobs = lib.mkDefault 16;
38 -}
ngi0/makemake/hydra-proxy.nix deleted
-68
@@ -1,68 +0,0 @@
1 -{ config, lib, pkgs, ...}:
2 -
3 -let
4 -
5 - hydraProxyConfig =
6 - ''
7 - TimeOut 900
8 -
9 - <Proxy *>
10 - Order deny,allow
11 - Allow from all
12 - </Proxy>
13 -
14 - ProxyRequests Off
15 - ProxyPreserveHost On
16 - ProxyPass /apache-errors !
17 - ProxyPass /.well-known !
18 - ErrorDocument 503 /apache-errors/503.html
19 - ProxyPass / http://127.0.0.1:3000/ retry=5 disablereuse=on
20 - ProxyPassReverse / http://127.0.0.1:3000/
21 -
22 - <Location />
23 - SetOutputFilter DEFLATE
24 - BrowserMatch ^Mozilla/4\.0[678] no-gzip\
25 - BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
26 - SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|narinfo)$ no-gzip dont-vary
27 - SetEnvIfNoCase Request_URI /api/ no-gzip dont-vary
28 - SetEnvIfNoCase Request_URI /download/ no-gzip dont-vary
29 - SetEnvIfNoCase Request_URI /nar/ no-gzip dont-vary
30 - </Location>
31 - '';
32 -
33 -in
34 -
35 -{
36 -
37 - services.httpd = {
38 - enable = true;
39 - adminAddr = "ngi@nixos.org";
40 - logFormat = ''"%h %l %u %t \"%r\" %>s %b %D"'';
41 - extraConfig = hydraProxyConfig +
42 - ''
43 - RewriteEngine On
44 - RewriteCond %{HTTPS} off
45 - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
46 - '';
47 -
48 - virtualHosts."hydra.ngi0.nixos.org" =
49 - { forceSSL = true;
50 - enableACME = true;
51 - extraConfig = ''
52 - # Required by Catalyst.
53 - RequestHeader set X-Forwarded-Proto https
54 - RequestHeader set X-Forwarded-Port 443
55 - Header always set Strict-Transport-Security "max-age=15552000"
56 - '';
57 - servedDirs =
58 - [ { urlPath = "/apache-errors";
59 - dir = ../../delft/apache-errors;
60 - }
61 - ];
62 - };
63 -
64 - };
65 -
66 - security.acme.acceptTerms = true;
67 - security.acme.defaults.email = "webmaster@nixos.org";
68 -}
ngi0/makemake/hydra.nix deleted
-62
@@ -1,62 +0,0 @@
1 -{ config, lib, pkgs, ... }:
2 -
3 -let
4 - narCache = "/var/cache/hydra/nar-cache";
5 -in
6 -
7 -{
8 - services.hydra-dev.enable = true;
9 - services.hydra-dev.logo = ./ngi-logo.svg;
10 - services.hydra-dev.hydraURL = "https://hydra.ngi0.nixos.org";
11 - services.hydra-dev.notificationSender = "ngi@nixos.org";
12 - services.hydra-dev.smtpHost = "localhost";
13 - services.hydra-dev.useSubstitutes = true;
14 - services.hydra-dev.extraConfig =
15 - ''
16 - max_servers 15
17 -
18 - enable_google_login = 1
19 - google_client_id = 816926039128-splu8iepg00ntgp9ngm6ic6fu8uenuir.apps.googleusercontent.com
20 -
21 - github_client_id = 18d98ddcf417b17601a1
22 - github_client_secret_file = /var/lib/hydra/www/keys/hydra-github-client-secret
23 -
24 - store_uri = s3://ngi0-cache?secret-key=/var/lib/hydra/queue-runner/keys/cache.ngi0.nixos.org-1/secret&write-nar-listing=1&ls-compression=br&log-compression=br&region=eu-west-1
25 - server_store_uri = https://cache.ngi0.nixos.org?local-nar-cache=${narCache}
26 - binary_cache_public_uri = https://cache.ngi0.nixos.org
27 -
28 - <Plugin::Session>
29 - cache_size = 32m
30 - </Plugin::Session>
31 -
32 - # patchelf:master:3
33 - xxx-jobset-repeats = nixos:reproducibility:1
34 -
35 - # https://monitoring.nixos.org/prometheus/graph?g0.range_input=2w&g0.expr=hydra_memory_tokens_in_use&g0.tab=0
36 - nar_buffer_size = ${let gb = 8; in toString (gb * 1024 * 1024 * 1024)}
37 -
38 - #upload_logs_to_binary_cache = true
39 -
40 - # FIXME: Cloudfront messes up CORS
41 - #log_prefix = https://cache.ngi0.nixos.org/
42 -
43 - log_prefix = https://ngi0-cache.s3.eu-west-1.amazonaws.com/
44 -
45 - evaluator_workers = 4
46 - evaluator_max_memory_size = 4096
47 -
48 - max_concurrent_evals = 2
49 - '';
50 -
51 - nix.extraOptions = lib.mkForce
52 - ''
53 - experimental-features = nix-command flakes ca-derivations
54 - allowed-uris = https://github.com/ https://git.savannah.gnu.org/
55 - '';
56 -
57 - systemd.tmpfiles.rules =
58 - [ "d /var/cache/hydra 0755 hydra hydra - -"
59 - "d ${narCache} 0775 hydra hydra 1d -"
60 - ];
61 -
62 -}
ngi0/makemake/ngi-logo.svg deleted
-149
@@ -1,149 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
3 -
4 -<svg
5 - xmlns:dc="http://purl.org/dc/elements/1.1/"
6 - xmlns:cc="http://creativecommons.org/ns#"
7 - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 - xmlns:svg="http://www.w3.org/2000/svg"
9 - xmlns="http://www.w3.org/2000/svg"
10 - xmlns:xlink="http://www.w3.org/1999/xlink"
11 - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 - version="1.1"
14 - id="svg2"
15 - xml:space="preserve"
16 - width="553.96533"
17 - height="170.64532"
18 - viewBox="0 0 553.96533 170.64532"
19 - sodipodi:docname="NGI0_tag.svg"
20 - inkscape:version="0.92.1 r15371"><metadata
21 - id="metadata8"><rdf:RDF><cc:Work
22 - rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23 - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
24 - id="defs6"><linearGradient
25 - inkscape:collect="always"
26 - id="linearGradient845"><stop
27 - style="stop-color:#98bf00;stop-opacity:1;"
28 - offset="0"
29 - id="stop841" /><stop
30 - style="stop-color:#98bf00;stop-opacity:0.85958904"
31 - offset="1"
32 - id="stop843" /></linearGradient><linearGradient
33 - id="linearGradient1220"
34 - inkscape:collect="always"><stop
35 - id="stop1216"
36 - offset="0"
37 - style="stop-color:#98bf00;stop-opacity:1;" /><stop
38 - id="stop1218"
39 - offset="1"
40 - style="stop-color:#98bf00;stop-opacity:0.51" /></linearGradient><linearGradient
41 - x1="0"
42 - y1="0"
43 - x2="1"
44 - y2="0"
45 - gradientUnits="userSpaceOnUse"
46 - gradientTransform="matrix(-139.45511,-135.52185,-135.52185,139.45511,177.4727,131.75308)"
47 - spreadMethod="pad"
48 - id="linearGradient28"><stop
49 - style="stop-opacity:1;stop-color:#00afbc"
50 - offset="0"
51 - id="stop24" /><stop
52 - style="stop-opacity:1;stop-color:#205374"
53 - offset="1"
54 - id="stop26" /></linearGradient><clipPath
55 - clipPathUnits="userSpaceOnUse"
56 - id="clipPath38"><path
57 - d="M 0,127.984 H 415.474 V 0 H 0 Z"
58 - id="path36"
59 - inkscape:connector-curvature="0" /></clipPath><linearGradient
60 - inkscape:collect="always"
61 - xlink:href="#linearGradient845"
62 - id="linearGradient898"
63 - x1="14.915152"
64 - y1="14.167241"
65 - x2="213.75"
66 - y2="112.50001"
67 - gradientUnits="userSpaceOnUse" /><linearGradient
68 - inkscape:collect="always"
69 - xlink:href="#linearGradient1220"
70 - id="linearGradient947"
71 - gradientUnits="userSpaceOnUse"
72 - x1="14.915152"
73 - y1="14.167241"
74 - x2="214.11908"
75 - y2="111.76186" /></defs><sodipodi:namedview
76 - pagecolor="#ffffff"
77 - bordercolor="#666666"
78 - borderopacity="1"
79 - objecttolerance="10"
80 - gridtolerance="10"
81 - guidetolerance="10"
82 - inkscape:pageopacity="0"
83 - inkscape:pageshadow="2"
84 - inkscape:window-width="1920"
85 - inkscape:window-height="1015"
86 - id="namedview4"
87 - showgrid="true"
88 - inkscape:zoom="1.4142136"
89 - inkscape:cx="397.77263"
90 - inkscape:cy="79.881046"
91 - inkscape:window-x="0"
92 - inkscape:window-y="0"
93 - inkscape:window-maximized="1"
94 - inkscape:current-layer="g40"><inkscape:grid
95 - type="xygrid"
96 - id="grid924" /></sodipodi:namedview><g
97 - id="g10"
98 - inkscape:groupmode="layer"
99 - inkscape:label="Logo-NGI_Tag-rgb_Editable-text"
100 - transform="matrix(1.3333333,0,0,-1.3333333,0,170.64533)"><g
101 - id="g12"
102 - style="fill-opacity:1;fill:url(#linearGradient898)"><g
103 - id="g14"
104 - style="fill-opacity:1.0;fill:url(#linearGradient898)"><g
105 - id="g20"
106 - style="fill-opacity:1.0;fill:url(#linearGradient898)"><g
107 - id="g22"
108 - style="fill-opacity:1.0;fill:url(#linearGradient898)"><path
109 - d="m 25.228,113.805 c -6.079,0 -11.051,-4.973 -11.051,-11.051 v 0 -77.523 c 0,-6.079 4.972,-11.051 11.051,-11.051 v 0 h 165.035 c 6.078,0 11.051,4.973 11.051,11.051 v 0 18.26 c 0,2.022 0.803,3.962 2.234,5.393 v 0 l 9.096,9.096 c 2.54,2.539 2.533,6.657 -0.013,9.188 v 0 l -9.067,9.017 c -1.44,1.431 -2.25,3.379 -2.25,5.409 v 0 21.16 c 0,6.078 -4.973,11.051 -11.051,11.051 v 0 z"
110 - style="fill:url(#linearGradient947);stroke:none;fill-opacity:1.0"
111 - id="path30"
112 - inkscape:connector-curvature="0" /></g></g></g></g><g
113 - id="g32"><g
114 - id="g34"
115 - clip-path="url(#clipPath38)"><g
116 - id="g40"
117 - transform="translate(175.9982,95.8645)"><path
118 - d="m 0,0 v 0 c 4.074,0 7.376,-3.302 7.376,-7.376 v -48.993 c 0,-4.074 -3.302,-7.376 -7.376,-7.376 -4.074,0 -7.376,3.302 -7.376,7.376 V -7.376 C -7.376,-3.302 -4.074,0 0,0"
119 - style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
120 - id="path42"
121 - inkscape:connector-curvature="0" /></g><g
122 - id="g44"
123 - transform="translate(152.1193,64.9934)"><path
124 - d="M 0,0 H -0.506 C -0.57,0 -0.633,-0.008 -0.698,-0.01 -0.762,-0.008 -0.825,0 -0.89,0 h -7.283 c -3.929,0 -7.359,-2.965 -7.613,-6.885 -0.278,-4.296 3.124,-7.867 7.361,-7.867 0.776,0 1.343,-0.754 1.111,-1.494 -0.658,-2.088 -2.341,-3.751 -4.547,-4.333 -2.074,-0.547 -4.276,-0.821 -6.605,-0.821 -4.007,0 -7.574,0.865 -10.7,2.595 -3.127,1.73 -5.57,4.144 -7.331,7.24 -1.761,3.096 -2.641,6.617 -2.641,10.564 0,4.006 0.88,7.558 2.641,10.654 1.761,3.097 4.219,5.493 7.377,7.195 3.156,1.698 6.768,2.549 10.836,2.549 4.681,0 8.865,-1.269 12.55,-3.807 2.341,-1.612 5.524,-1.588 7.757,0.171 3.48,2.741 3.289,8.045 -0.315,10.452 -1.7,1.136 -3.538,2.112 -5.512,2.928 -4.553,1.881 -9.623,2.823 -15.208,2.823 -6.679,0 -12.69,-1.412 -18.03,-4.235 -5.344,-2.822 -9.517,-6.738 -12.522,-11.747 -3.005,-5.008 -4.508,-10.67 -4.508,-16.983 0,-6.315 1.503,-11.975 4.508,-16.984 3.005,-5.009 7.148,-8.924 12.43,-11.747 5.282,-2.824 11.231,-4.235 17.849,-4.235 4.613,0 9.197,0.699 13.751,2.095 0.045,0.014 0.091,0.028 0.136,0.042 7.104,2.202 11.884,8.86 11.884,16.297 v 9.047 C 6.486,-2.904 3.583,0 0,0"
125 - style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
126 - id="path46"
127 - inkscape:connector-curvature="0" /></g><g
128 - id="g48"
129 - transform="translate(90.5807,88.5798)"><path
130 - d="m 0,0 v -49.176 c 0,-4.023 -3.262,-7.285 -7.286,-7.285 h -1.381 c -2.181,0 -4.247,0.977 -5.631,2.662 l -24.229,29.505 c -1.804,2.197 -5.368,0.921 -5.368,-1.922 v -22.96 c 0,-4.023 -3.261,-7.285 -7.285,-7.285 -4.023,0 -7.285,3.262 -7.285,7.285 V 0 c 0,4.024 3.262,7.285 7.285,7.285 h 1.468 c 2.184,0 4.253,-0.979 5.636,-2.669 l 24.135,-29.475 c 1.802,-2.202 5.37,-0.927 5.37,1.918 V 0 c 0,4.024 3.261,7.285 7.285,7.285 C -3.262,7.285 0,4.024 0,0"
131 - style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
132 - id="path50"
133 - inkscape:connector-curvature="0" /></g></g></g><g
134 - aria-label="Z E R O"
135 - transform="scale(1,-1)"
136 - style="font-variant:normal;font-weight:600;font-stretch:normal;font-size:31.76000023px;font-family:'Montserrat SemiBold';-inkscape-font-specification:Montserrat-SemiBold;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:0.7171717;fill-rule:nonzero;stroke:none"
137 - id="text56"><path
138 - d="m 243.58117,-73.015206 h 19.46231 v 3.613321 l -12.42176,15.02707 h 12.77844 v 4.512774 h -20.17567 v -3.613321 l 12.42176,-15.02707 h -12.06508 z"
139 - style=""
140 - id="path2325" /><path
141 - d="m 278.7684,-73.015206 h 16.11262 v 4.512774 h -10.14211 v 4.311172 h 9.5373 v 4.512773 h -9.5373 v 5.303672 h 10.48328 v 4.512774 H 278.7684 Z"
142 - style=""
143 - id="path2327" /><path
144 - d="m 320.00367,-62.749034 q 1.87645,0 2.68285,-0.697851 0.82192,-0.697852 0.82192,-2.295157 0,-1.581796 -0.82192,-2.26414 -0.8064,-0.682344 -2.68285,-0.682344 h -2.51226 v 5.939492 z m -2.51226,4.125078 v 8.761915 h -5.97051 v -23.153165 h 9.11859 q 4.57481,0 6.69938,1.535274 2.14008,1.535273 2.14008,4.853945 0,2.295156 -1.11657,3.768399 -1.10105,1.473242 -3.33418,2.171093 1.22512,0.279141 2.18661,1.271641 0.97699,0.976992 1.96949,2.9775 l 3.24113,6.575313 h -6.3582 l -2.82242,-5.753399 q -0.85293,-1.736875 -1.73688,-2.372695 -0.86844,-0.635821 -2.32617,-0.635821 z"
145 - style=""
146 - id="path2329" /><path
147 - d="m 357.57911,-69.107237 q -2.72938,0 -4.23364,2.016016 -1.50425,2.016015 -1.50425,5.675859 0,3.644336 1.50425,5.660352 1.50426,2.016015 4.23364,2.016015 2.74488,0 4.24914,-2.016015 1.50426,-2.016016 1.50426,-5.660352 0,-3.659844 -1.50426,-5.675859 -1.50426,-2.016016 -4.24914,-2.016016 z m 0,-4.32668 q 5.58281,0 8.7464,3.19461 3.1636,3.194609 3.1636,8.823945 0,5.613828 -3.1636,8.808438 -3.16359,3.194609 -8.7464,3.194609 -5.56731,0 -8.74641,-3.194609 -3.16359,-3.19461 -3.16359,-8.808438 0,-5.629336 3.16359,-8.823945 3.1791,-3.19461 8.74641,-3.19461 z"
148 - style=""
149 - id="path2331" /></g></g></svg>
\ No newline at end of file
ngi0/silvan-demo/flake.lock deleted
-26
@@ -1,26 +0,0 @@
1 -{
2 - "nodes": {
3 - "nixpkgs": {
4 - "locked": {
5 - "lastModified": 1628523294,
6 - "narHash": "sha256-qMkH/JRRmcqb/eOa/pKksrKGOy2YEPQNH/457QyoyFg=",
7 - "owner": "NixOS",
8 - "repo": "nixpkgs",
9 - "rev": "b09c989b82f7a4f7319802a1dcf8bfe859d65362",
10 - "type": "github"
11 - },
12 - "original": {
13 - "id": "nixpkgs",
14 - "ref": "nixos-21.05",
15 - "type": "indirect"
16 - }
17 - },
18 - "root": {
19 - "inputs": {
20 - "nixpkgs": "nixpkgs"
21 - }
22 - }
23 - },
24 - "root": "root",
25 - "version": 7
26 -}
ngi0/silvan-demo/flake.nix deleted
-34
@@ -1,34 +0,0 @@
1 -# To bootstrap:
2 -# $ nix-shell -p nixUnstable git --run "nix build --experimental-features 'nix-command flakes' ~/nixos-org-configurations/ngi0/silvan-demo#nixosConfigurations.modules.config.system.build.toplevel"
3 -# $ ./result/bin/switch-to-configuration test
4 -#
5 -# To update:
6 -# $ nixos-rebuild test --flake ~/nixos-org-configurations/ngi0/silvan-demo
7 -
8 -{
9 - inputs.nixpkgs.url = "nixpkgs/nixos-21.05";
10 -
11 - outputs = { self, nixpkgs }: rec {
12 -
13 - nixosConfigurations.modules = nixpkgs.lib.nixosSystem {
14 - system = "x86_64-linux";
15 - modules =
16 - [
17 - "${nixpkgs}/nixos/modules/virtualisation/amazon-image.nix"
18 - ../../modules/common.nix
19 - ({ config, pkgs, ... }:
20 - {
21 - ec2.hvm = true;
22 - networking.hostName = "modules";
23 - networking.firewall.allowedTCPPorts = [ 222 ];
24 - system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
25 - nix.package = pkgs.nixUnstable;
26 - nix.registry.nixpkgs.flake = nixpkgs;
27 - users.users.root.openssh.authorizedKeys.keys = with import ../../ssh-keys.nix; [ silvan ];
28 - })
29 - ];
30 - };
31 -
32 - };
33 -
34 -}
ngi0/silvan-demo/main.tf deleted
-97
@@ -1,97 +0,0 @@
1 -provider "aws" {
2 - region = "eu-west-1"
3 -}
4 -
5 -output "public_ip" {
6 - value = aws_instance.server.public_ip
7 -}
8 -
9 -resource "aws_instance" "server" {
10 - ami = "ami-048dbc738074a3083"
11 - instance_type = "t3a.xlarge"
12 - subnet_id = aws_subnet.main.id
13 - #availability_zone = var.availability_zone
14 -
15 - vpc_security_group_ids = [ aws_security_group.ssh_and_egress.id ]
16 - key_name = aws_key_pair.generated_key.key_name
17 -
18 - root_block_device {
19 - volume_size = 50 # GiB
20 - }
21 -
22 - lifecycle {
23 - ignore_changes = [ami]
24 - }
25 -}
26 -
27 -resource "aws_vpc" "vpc" {
28 - cidr_block = "10.0.0.0/16"
29 - enable_dns_support = "true"
30 - enable_dns_hostnames = "true"
31 - enable_classiclink = "false"
32 - instance_tenancy = "default"
33 -}
34 -
35 -resource "aws_internet_gateway" "igw" {
36 - vpc_id = aws_vpc.vpc.id
37 -}
38 -
39 -resource "aws_subnet" "main" {
40 - vpc_id = aws_vpc.vpc.id
41 - cidr_block = "10.0.0.0/24"
42 - map_public_ip_on_launch = "true"
43 - availability_zone = "eu-west-1a"
44 -}
45 -
46 -resource "aws_route_table" "rt" {
47 - vpc_id = aws_vpc.vpc.id
48 - route {
49 - cidr_block = "0.0.0.0/0"
50 - gateway_id = aws_internet_gateway.igw.id
51 - }
52 -}
53 -
54 -resource "aws_route_table_association" "rt_assoc" {
55 - subnet_id = aws_subnet.main.id
56 - route_table_id = aws_route_table.rt.id
57 -}
58 -
59 -resource "aws_security_group" "ssh_and_egress" {
60 - vpc_id = aws_vpc.vpc.id
61 -
62 - ingress {
63 - from_port = 22
64 - to_port = 22
65 - protocol = "tcp"
66 - cidr_blocks = [ "0.0.0.0/0" ]
67 - }
68 -
69 - ingress {
70 - from_port = 222
71 - to_port = 222
72 - protocol = "tcp"
73 - cidr_blocks = [ "0.0.0.0/0" ]
74 - }
75 -
76 - egress {
77 - from_port = 0
78 - to_port = 0
79 - protocol = "-1"
80 - cidr_blocks = ["0.0.0.0/0"]
81 - }
82 -}
83 -
84 -resource "tls_private_key" "state_ssh_key" {
85 - algorithm = "RSA"
86 -}
87 -
88 -resource "local_file" "machine_ssh_key" {
89 - sensitive_content = tls_private_key.state_ssh_key.private_key_pem
90 - filename = "${path.module}/id_rsa.pem"
91 - file_permission = "0600"
92 -}
93 -
94 -resource "aws_key_pair" "generated_key" {
95 - key_name = "generated-key-${sha256(tls_private_key.state_ssh_key.public_key_openssh)}"
96 - public_key = tls_private_key.state_ssh_key.public_key_openssh
97 -}
ngi0/terraform/cache.tf deleted
-97
@@ -1,97 +0,0 @@
1 -resource "aws_s3_bucket" "cache" {
2 - provider = aws
3 - bucket = "ngi0-cache"
4 -
5 - lifecycle_rule {
6 - enabled = true
7 -
8 - transition {
9 - days = 365
10 - storage_class = "STANDARD_IA"
11 - }
12 - }
13 -
14 - cors_rule {
15 - allowed_headers = ["Authorization"]
16 - allowed_methods = ["GET"]
17 - allowed_origins = ["*"]
18 - max_age_seconds = 3000
19 - }
20 -}
21 -
22 -resource "aws_s3_bucket_policy" "cache" {
23 - provider = aws
24 - bucket = aws_s3_bucket.cache.id
25 - policy = <<EOF
26 -{
27 - "Version": "2008-10-17",
28 - "Statement": [
29 - {
30 - "Sid": "AllowPublicRead",
31 - "Effect": "Allow",
32 - "Principal": {
33 - "AWS": "*"
34 - },
35 - "Action": "s3:GetObject",
36 - "Resource": "arn:aws:s3:::${aws_s3_bucket.cache.id}/*"
37 - }
38 - ]
39 -}
40 -EOF
41 -}
42 -
43 -resource "aws_cloudfront_distribution" "cache" {
44 - enabled = true
45 - is_ipv6_enabled = true
46 - price_class = "PriceClass_All"
47 - aliases = ["cache.ngi0.nixos.org"]
48 -
49 - origin {
50 - origin_id = "S3-nix-cache"
51 - domain_name = aws_s3_bucket.cache.bucket_domain_name
52 -
53 - #s3_origin_config {
54 - # origin_access_identity = "origin-access-identity/cloudfront/E11I84008FX6W9"
55 - #}
56 - }
57 -
58 - default_cache_behavior {
59 - allowed_methods = ["HEAD", "GET"]
60 - cached_methods = ["HEAD", "GET"]
61 - target_origin_id = "S3-nix-cache"
62 - viewer_protocol_policy = "allow-all"
63 - min_ttl = 0
64 - default_ttl = 86400
65 - max_ttl = 31536000
66 -
67 - forwarded_values {
68 - query_string = false
69 -
70 - cookies {
71 - forward = "none"
72 - }
73 - }
74 - }
75 -
76 - viewer_certificate {
77 - cloudfront_default_certificate = false
78 - acm_certificate_arn = aws_acm_certificate.cache.arn
79 - ssl_support_method = "sni-only"
80 - }
81 -
82 - restrictions {
83 - geo_restriction {
84 - restriction_type = "none"
85 - }
86 - }
87 -}
88 -
89 -resource "aws_acm_certificate" "cache" {
90 - provider = aws.us
91 - domain_name = "cache.ngi0.nixos.org"
92 - validation_method = "DNS"
93 -
94 - lifecycle {
95 - create_before_destroy = true
96 - }
97 -}
ngi0/terraform/hydra-user.tf deleted
-27
@@ -1,27 +0,0 @@
1 -resource "aws_iam_user" "hydra" {
2 - provider = aws
3 - name = "hydra"
4 -}
5 -
6 -resource "aws_iam_access_key" "hydra" {
7 - user = aws_iam_user.hydra.name
8 -}
9 -
10 -resource "aws_iam_user_policy" "hydra" {
11 - name = "test"
12 - user = aws_iam_user.hydra.name
13 -
14 - policy = <<EOF
15 -{
16 - "Version": "2012-10-17",
17 - "Statement": [
18 - {
19 - "Sid": "Stmt1590080325117",
20 - "Action": "s3:*",
21 - "Effect": "Allow",
22 - "Resource": "*"
23 - }
24 - ]
25 -}
26 -EOF
27 -}
ngi0/terraform/providers.tf deleted
-8
@@ -1,8 +0,0 @@
1 -provider "aws" {
2 - region = "eu-west-1"
3 -}
4 -
5 -provider "aws" {
6 - alias = "us"
7 - region = "us-east-1"
8 -}
ssh-keys.nix
-12
@@ -21,8 +21,6 @@ rec {
21
22 linus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN3EmXYSXsimS+vlGYtfTkOGuwvkXU0uHd2yYKLOxD2F linus@geruest";
23
24 - regnat = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINOPHs47r7r7W55vVlH9Dm9JEud+HOh80YbtrlVSuBm4";
25 -
24 silvan = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHjY4cuUk4IWgBgnEJSULkIHO+njUmIFP+WSWy7IobBs infinisil@vario";
25
26 vcunat = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4IJkFIVyImkfD4fM89ya+hy2ig8kUg09PCdjB5rS82akFoucYZSYMG41ZrlMT5LAikIgWusBzpO5bBkqxqcYqaYK/VF06zVBk3kF1pAIoitst9z0PLXY8/N+bFJg6oT7p6EWGRvFggUviSTTvJFMNUdDgEpsLqLp8+IYXjfM3Cz6+TQmyWQSockobRqgdILTjc1p2uxmNSzy2fElpZ0sKRPLNYG4SVPBPnOavs1KPOtyC1pIHOuz5A605gPLFXoWpX2lIK6atmGheiHxURDAX3pANVm+iMmnjteP0jEGU26/SPqgVP3OxdcryHxL3WnSJGtTnycoa30qP/Edmy9vB";
@@ -30,16 +28,8 @@ rec {
28 hexa-gaia = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAWQRR7dspgQ6kCwyFnoVlgmmPR4iWL1+nvq6a5ad2Ug hexa@gaia";
29 hexa-helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFSpdtIxIBFtd7TLrmIPmIu5uemAFJx4sNslRsJXfFxr hexa@helix";
30
33 - cleeyv = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4p4CqilI3n1GOyGcDgUh1UpwxeHSTIiV4oeHYjF431 cleeyv";
34 -
31 julienmalka = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa+7n7kNzb86pTqaMn554KiPrkHRGeTJ0asY1NjSbpr julien@tower";
32
37 - lorenz-leutgeb = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFhK7CqgIIbSthoNn8ea32krOnMzC807Z+PpBkR2YOVj";
38 -
39 - tomberek = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILH+asenrsMV2B4mewzG/ezY7kU+iONALVlbMnZEIjXe";
40 -
41 - john-ericson = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdof+fSLyz3FV5t/yE9LBk/hgR8iNfdz/DRigvh4pP6+E4VPpPKSeA0a8r4CLMWvy9ZZ3Gqa04NdJnMmo8gBSIlo87JPq66GnC5QmeDJX2NLlliSeNQqUQKJ2VVcsVerz8O/RvVfvU2MIdW8VExx/DxeZbMnwRcWfUC0nby0NotWGNeS3NOcWWQq9z4E0sDSJ+QXSIMXWSeMda5sBadUK+YERTLYE/+ZVUPiXkXCmnwuRFHpZsqlRVad+kgXsZIwNEPUEqmEablg2C0NjvEbs75Yu9WUXXPJNhwaFbVXaWUM8UWO/n39jMM8aepalZbMhdFh129cAH35SjzIYjHxTP jcericson@john-obsidian-2018";
42 -
33 delroth = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII3tjB4KYDok3KlWxdBp/yEmqhhmybd+w0VO4xUwLKKV";
34
35 infra-core = [
@@ -57,6 +47,4 @@ rec {
47 infra = infra-core ++ [
48 julienmalka
49 ];
60 -
61 - ngi-admins = infra-core ++ [ regnat cleeyv lorenz-leutgeb tomberek john-ericson ];
50 }