wendy: Remove old stuff
Eelco Dolstra committed
Oct 17, 2020 at 22:10 UTC
ff9f7e87cfa9d2fb731fb7660a1d79df982fb56a
2 files changed
+1
-268
delft/delft-webserver.nix
deleted
-150
@@ -1,150 +0,0 @@
1
-{ config, pkgs, ... }:
2
-
3
-with pkgs.lib;
4
-
5
-let
6
-
7
- twikiIP = "10.233.1.2";
8
-
9
- proxyConfig = hostName:
10
- { inherit hostName;
11
- extraConfig =
12
- ''
13
- <Proxy *>
14
- Order deny,allow
15
- Allow from all
16
- </Proxy>
17
-
18
- ProxyRequests Off
19
- ProxyPreserveHost On
20
- ProxyPass / http://${twikiIP}/ retry=5 disablereuse=on
21
- '';
22
- };
23
-
24
- strategoxtSSLConfig =
25
- { enableSSL = true;
26
- sslServerCert = "/root/ssl-secrets/ssl-strategoxt.org.crt";
27
- sslServerKey = "/root/ssl-secrets/ssl-strategoxt.org.key";
28
- extraConfig =
29
- ''
30
- SSLCertificateChainFile ${./sub.class1.server.ca.pem}
31
- '';
32
- };
33
-
34
-in
35
-
36
-{
37
- services = {
38
-
39
- httpd = {
40
- enable = true;
41
- logPerVirtualHost = true;
42
- adminAddr = "edolstra@gmail.com";
43
- hostName = "localhost";
44
-
45
- extraModules = [ "deflate" ];
46
-
47
- extraConfig =
48
- ''
49
- AddType application/nix-package .nixpkg
50
-
51
- <Location /server-status>
52
- SetHandler server-status
53
- Allow from 127.0.0.1
54
- Order deny,allow
55
- Deny from all
56
- </Location>
57
-
58
- ExtendedStatus On
59
-
60
- SSLProtocol All -SSLv2 -SSLv3
61
- SSLCipherSuite HIGH:!aNULL:!MD5:!EXP
62
- SSLHonorCipherOrder on
63
- '';
64
-
65
- servedDirs =
66
- [ { urlPath = "/apache-errors";
67
- dir = ./apache-errors;
68
- }
69
- ];
70
-
71
- virtualHosts = [
72
-
73
- { # Catch-all site.
74
- hostName = "old.nixos.org";
75
- globalRedirect = "https://nixos.org/";
76
- }
77
-
78
- { hostName = "buildfarm.st.ewi.tudelft.nl";
79
- documentRoot = cleanSource ./webroot;
80
- enableUserDir = true;
81
- extraSubservices = [
82
- /*
83
- { function = import /etc/nixos/services/subversion;
84
- urlPrefix = "";
85
- toplevelRedirect = false;
86
- dataDir = "/data/subversion";
87
- notificationSender = "svn@buildfarm.st.ewi.tudelft.nl";
88
- organisation = {
89
- name = "Software Engineering Research Group, TU Delft";
90
- url = http://www.st.ewi.tudelft.nl/;
91
- logo = "/serg-logo.png";
92
- };
93
- }
94
- */
95
- /*
96
- { function = import /etc/nixos/services/subversion;
97
- id = "ptg";
98
- urlPrefix = "/ptg";
99
- dataDir = "/data/subversion-ptg";
100
- notificationSender = "svn@buildfarm.st.ewi.tudelft.nl";
101
- organisation = {
102
- name = "Software Engineering Research Group, TU Delft";
103
- url = http://www.st.ewi.tudelft.nl/;
104
- logo = "/serg-logo.png";
105
- };
106
- }
107
- */
108
- ];
109
- servedDirs = [
110
- { urlPath = "/releases";
111
- dir = "/data/webserver/dist";
112
- }
113
- ];
114
- }
115
-
116
- (proxyConfig "strategoxt.org")
117
-
118
- (proxyConfig "strategoxt.org" // strategoxtSSLConfig)
119
-
120
- (proxyConfig "program-transformation.org")
121
-
122
- (proxyConfig "syntax-definition.org")
123
-
124
- { hostName = "www.strategoxt.org";
125
- serverAliases = ["www.stratego-language.org"];
126
- globalRedirect = "http://strategoxt.org/";
127
- }
128
-
129
- { hostName = "www.program-transformation.org";
130
- globalRedirect = "http://program-transformation.org/";
131
- }
132
-
133
- { hostName = "svn.strategoxt.org";
134
- globalRedirect = "https://svn.strategoxt.org/";
135
- }
136
-
137
- { hostName = "releases.strategoxt.org";
138
- documentRoot = "/data/webserver/dist/strategoxt2";
139
- }
140
-
141
- { hostName = "planet.strategoxt.org";
142
- serverAliases = ["planet.stratego.org"];
143
- documentRoot = "/home/karltk/public_html/planet";
144
- }
145
-
146
- ];
147
- };
148
-
149
- };
150
-}
delft/wendy.nix
+1
-118
@@ -3,127 +3,10 @@
3
with lib;
4
5
{
6
- imports = [ ./build-machines-dell-r815.nix ./delft-webserver.nix ./sysstat.nix ./datadog.nix ];
6
+ imports = [ ./build-machines-dell-r815.nix ./sysstat.nix ./datadog.nix ];
7
8
nix.maxJobs = mkForce 24;
9
10
-/*
11
- fileSystems."/backup" =
12
- { device = "130.161.158.5:/dxs/users4/group/buildfarm";
13
- fsType = "nfs4";
14
- };
15
-
16
- services.dd-agent.postgresqlConfig = ''
17
- init_config:
18
-
19
- instances:
20
- - host: localhost
21
- port: 5432
22
- username: datadog
23
- password: ${builtins.readFile ./datadog.secret}
24
- '';
25
-
26
- services.postgresql = {
27
- enable = true;
28
- #enableTCPIP = true;
29
- package = pkgs.postgresql95;
30
- dataDir = "/data/postgresql";
31
- extraConfig = ''
32
- log_min_duration_statement = 5000
33
- log_duration = off
34
- log_statement = 'none'
35
- max_connections = 250
36
- work_mem = 16MB
37
- shared_buffers = 2GB
38
- # Checkpoint every 256 MB.
39
- checkpoint_segments = 16
40
- # We can risk losing some transactions.
41
- synchronous_commit = off
42
- effective_cache_size = 8GB
43
- '';
44
- };
45
-
46
- systemd.services.duplicity-backup =
47
- {
48
- path = [ pkgs.duplicity ];
49
-
50
- unitConfig.RequiresMountsFor = [ "/backup" ];
51
-
52
- script = ''
53
- export PATH=$PATH:/var/run/current-system/sw/bin
54
- time duplicity --full-if-older-than 30D --no-encryption /data/pt-wiki file:///backup/cartman/pt-wiki
55
- time duplicity --no-encryption --force remove-all-inc-of-but-n-full 1 file:///backup/cartman/pt-wiki
56
-
57
- time duplicity --full-if-older-than 30D --no-encryption /data/subversion file:///backup/cartman/subversion
58
- time duplicity --no-encryption --force remove-all-inc-of-but-n-full 1 file:///backup/cartman/subversion
59
-
60
- time duplicity --full-if-older-than 30D --no-encryption /data/subversion-ptg file:///backup/cartman/subversion-ptg
61
- time duplicity --no-encryption --force remove-all-inc-of-but-n-full 1 file:///backup/cartman/subversion-ptg
62
-
63
- time duplicity --full-if-older-than 30D --no-encryption /data/subversion-strategoxt file:///backup/cartman/subversion-strategoxt
64
- time duplicity --no-encryption --force remove-all-inc-of-but-n-full 1 file:///backup/cartman/subversion-strategoxt
65
- '';
66
-
67
- startAt = "02:40";
68
- };
69
-
70
- systemd.mounts =
71
- [ { mountConfig.TimeoutSec = 300;
72
- what = "130.161.158.5:/dxs/users4/group/buildfarm";
73
- where = "/backup";
74
- }
75
- ];
76
-
77
- services.cron.systemCronJobs =
78
- [ #"15 4 * * * root cp -v /var/backup/postgresql/* /backup/wendy/postgresql/ &> /var/log/backup-db.log"
79
- ];
80
- */
81
-
82
- services.radvd.enable = false;
83
- services.radvd.config =
84
- ''
85
- interface ${config.system.build.mainPhysicalInterface} {
86
- AdvSendAdvert on;
87
- prefix 2001:610:685:1::/64 { };
88
- RDNSS 2001:610:685:1::1 { };
89
- };
90
- '';
91
-
92
- networking = {
93
-
94
- firewall.allowedTCPPorts = [ 80 443 10051 5432 5999 ];
95
- firewall.allowedUDPPorts = [ 53 67 ];
96
-
97
- };
98
-
99
- environment.systemPackages = [ pkgs.duplicity ];
100
-
101
- # Use cgroups to limit Apache's resources.
102
- systemd.services.httpd.serviceConfig.CPUShares = 1000;
103
- systemd.services.httpd.serviceConfig.MemoryLimit = "1500M";
104
- #systemd.services.httpd.serviceConfig.ControlGroupAttribute = [ "memory.memsw.limit_in_bytes 1500M" ];
105
-
106
- services.logrotate.enable = true;
107
- services.logrotate.config = ''
108
- /var/log/httpd/access_log
109
- /var/log/httpd/error_log
110
- /var/log/httpd/access_log*.nl
111
- /var/log/httpd/error_log*.nl
112
- /var/log/httpd/access_log*.org
113
- /var/log/httpd/error_log*.org
114
- {
115
- missingok
116
- daily
117
- dateext
118
- rotate 10000
119
- compress
120
- sharedscripts
121
- postrotate
122
- ${pkgs.coreutils}/bin/kill -HUP `${pkgs.coreutils}/bin/cat /var/run/httpd/httpd.pid`
123
- endscript
124
- }
125
- '';
126
-
10
users.extraUsers.eelco =
11
{ description = "Eelco Dolstra";
12
home = "/home/eelco";