@cryptotaxi247 / infra-1 / commits / f0e9c97b

removing nixos-org folder since the website is moved to netlify

Rok Garbas committed Sep 16, 2020 at 23:29 UTC f0e9c97b12a0d16bc0f123c610b0d7a38a58fb04
24 files changed +1 -1347
delft/delft-webserver.nix
+1 -1
@@ -27,7 +27,7 @@ let
27 sslServerKey = "/root/ssl-secrets/ssl-strategoxt.org.key";
28 extraConfig =
29 ''
30 - SSLCertificateChainFile ${../nixos-org/sub.class1.server.ca.pem}
30 + SSLCertificateChainFile ${./sub.class1.server.ca.pem}
31 '';
32 };
33
delft/sub.class1.server.ca.pem renamed
nixos-org/cache-root-page.html deleted
-58
@@ -1,58 +0,0 @@
1 -<!DOCTYPE html>
2 -<html lang="en">
3 - <head>
4 - <title>cache.nixos.org is up</title>
5 - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 - <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
7 - <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8 - <link rel="stylesheet" href="https://nixos.org/bootstrap/css/bootstrap.min.css" />
9 - <link rel="stylesheet" href="https://nixos.org/bootstrap/css/bootstrap-responsive.min.css" />
10 - <style>
11 - body {
12 - padding-top: 0;
13 - margin-top: 4em;
14 - margin-bottom: 4em;
15 - }
16 - body > div {
17 - max-width: 800px;
18 - }
19 - p {
20 - text-align: center;
21 - }
22 - .cache {
23 - font-style: italic;
24 - }
25 - </style>
26 - </head>
27 - <body>
28 - <div class="container jumbotron">
29 - <div class="jumbotron">
30 - <p class="lead">
31 - <a href="https://nixos.org/nixos">
32 - <img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />
33 - </a>
34 - </p>
35 -
36 - <p class="lead">
37 - <code>https://cache.nixos.org/</code> provides
38 - prebuilt binaries for Nixpkgs and NixOS. It is
39 - used automatically by the Nix package manager to
40 - speed up builds.
41 - </p>
42 - </p>
43 - </div>
44 - <hr />
45 - <div class="help">
46 - <p>
47 - If you are having trouble, please reach out through one of the <a href="https://nixos.org/nixos/support.html">support channels</a>
48 - with the results of <a href="https://gist.github.com/grahamc/df1bb806eb3552650d03eef7036a72ba">this diagnostics script</a>
49 - which will help us figure out where the issue lies.
50 - </p>
51 - <p>
52 - For questions, or support, <a href="https://nixos.org/nixos/support.html">
53 - the support page</a> from the NixOS website describes how to get in touch.
54 - </p>
55 - </div>
56 - </div>
57 - </body>
58 -</html>
nixos-org/network.nix deleted
-156
@@ -1,156 +0,0 @@
1 -let
2 - region = "eu-west-1";
3 - zone = "eu-west-1a";
4 - accessKeyId = ""; # FIXME
5 -in
6 -
7 -{
8 - network.description = "NixOS.org Infrastructure";
9 -
10 - resources.ebsVolumes.releases =
11 - { tags.Name = "Nix/Nixpkgs/NixOS releases";
12 - inherit region zone accessKeyId;
13 - size = 1024;
14 - };
15 -
16 - resources.ebsVolumes.data-new =
17 - { tags.Name = "Misc. NixOS.org data";
18 - inherit region zone accessKeyId;
19 - size = 30;
20 - };
21 -
22 - resources.elasticIPs."nixos.org" =
23 - { inherit region accessKeyId;
24 - vpc = true;
25 - };
26 -
27 - resources.ec2KeyPairs.default =
28 - { inherit region accessKeyId;
29 - };
30 -
31 - resources.vpc.nixos-org-vpc =
32 - {
33 - inherit region accessKeyId;
34 - instanceTenancy = "default";
35 - enableDnsSupport = true;
36 - enableDnsHostnames = true;
37 - cidrBlock = "10.0.0.0/16";
38 - };
39 -
40 - resources.vpcSubnets.nixos-org-subnet =
41 - { resources, lib, ... }:
42 - {
43 - inherit region zone accessKeyId;
44 - vpcId = resources.vpc.nixos-org-vpc;
45 - cidrBlock = "10.0.0.0/19";
46 - mapPublicIpOnLaunch = true;
47 - };
48 -
49 - resources.ec2SecurityGroups.nixos-org-sg =
50 - { resources, lib, ... }:
51 - {
52 - inherit region accessKeyId;
53 - vpcId = resources.vpc.nixos-org-vpc;
54 - rules =
55 - with import ../ip-addresses.nix;
56 - [ { toPort = 80; fromPort = 80; sourceIp = "0.0.0.0/0"; }
57 - { toPort = 443; fromPort = 443; sourceIp = "0.0.0.0/0"; }
58 - ]
59 - ++ map
60 - (ip: { toPort = 22; fromPort = 22; sourceIp = "${ip}/32"; })
61 - [ eelcoHome
62 - eelcoEC2
63 - "34.254.208.229" # == "bastion.nixos.org"
64 - garbasHome
65 - ];
66 - };
67 -
68 - resources.vpcRouteTables.nixos-org-route-table =
69 - { resources, ... }:
70 - {
71 - inherit region accessKeyId;
72 - vpcId = resources.vpc.nixos-org-vpc;
73 - };
74 -
75 - resources.vpcRouteTableAssociations.nixos-org-assoc =
76 - { resources, ... }:
77 - {
78 - inherit region accessKeyId;
79 - subnetId = resources.vpcSubnets.nixos-org-subnet;
80 - routeTableId = resources.vpcRouteTables.nixos-org-route-table;
81 - };
82 -
83 - resources.vpcInternetGateways.nixos-org-igw =
84 - { resources, ... }:
85 - {
86 - inherit region accessKeyId;
87 - vpcId = resources.vpc.nixos-org-vpc;
88 - };
89 -
90 - resources.vpcRoutes.nixos-org-route =
91 - { resources, ... }:
92 - {
93 - inherit region accessKeyId;
94 - routeTableId = resources.vpcRouteTables.nixos-org-route-table;
95 - destinationCidrBlock = "0.0.0.0/0";
96 - gatewayId = resources.vpcInternetGateways.nixos-org-igw;
97 - };
98 -
99 - webserver =
100 - { config, pkgs, resources, ... }:
101 -
102 - { deployment.targetEnv = "ec2";
103 - deployment.ec2.tags.Name = "NixOS.org Webserver";
104 - deployment.owners = [ "eelco.dolstra@logicblox.com" "rob.vermaas@logicblox.com" ];
105 - deployment.ec2.region = region;
106 - deployment.ec2.zone = zone;
107 - deployment.ec2.instanceType = "t2.large";
108 - deployment.ec2.accessKeyId = accessKeyId;
109 - deployment.ec2.keyPair = resources.ec2KeyPairs.default;
110 - deployment.ec2.securityGroups = [];
111 - deployment.ec2.securityGroupIds = [ resources.ec2SecurityGroups.nixos-org-sg.name ];
112 - deployment.ec2.subnetId = resources.vpcSubnets.nixos-org-subnet;
113 - deployment.ec2.associatePublicIpAddress = true;
114 - deployment.ec2.elasticIPv4 = resources.elasticIPs."nixos.org";
115 - deployment.ec2.ebsInitialRootDiskSize = 30;
116 -
117 - fileSystems."/releases" =
118 - { autoFormat = true;
119 - fsType = "ext4";
120 - device = "/dev/xvdj";
121 - ec2.disk = resources.ebsVolumes.releases;
122 - };
123 -
124 - fileSystems."/data" =
125 - { autoFormat = true;
126 - fsType = "ext4";
127 - device = "/dev/xvdh";
128 - ec2.disk = resources.ebsVolumes.data-new;
129 - };
130 -
131 - fileSystems."/data/releases" =
132 - { device = "/releases";
133 - fsType = "none";
134 - options = [ "bind" ];
135 - };
136 -
137 - fileSystems."/home" =
138 - { device = "/data/home";
139 - fsType = "none";
140 - options = [ "bind" ];
141 - };
142 -
143 - system.stateVersion = "17.09";
144 -
145 - imports =
146 - [ ./webserver.nix
147 - ../modules/hydra-mirror-user.nix
148 - ../modules/prometheus
149 - ../modules/wireguard.nix
150 - ];
151 -
152 - users.users.hydra-mirror.openssh.authorizedKeys.keys =
153 - [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/r65Jgp3pe+wNh9Vp64jdTxD9G6Gn5F3sidnydinBK hydra-mirror@bastion" ];
154 - };
155 -
156 -}
nixos-org/planet-feeds.nix deleted
-115
@@ -1,115 +0,0 @@
1 -[
2 - { name = "Matej Cotman";
3 - feedUrl = "http://blog.matejc.com/matejc-nixos/RSS";
4 - homepageUrl= "http://blog.matejc.com";
5 - }
6 - { name = "Georges Dubus";
7 - feedUrl = "http://compiletoi.net/feeds/nixos.atom.xml";
8 - homepageUrl = "http://compiletoi.net/";
9 - }
10 - { name = "Rok Garbas";
11 - feedUrl = "https://garbas.si/feeds/tag-nixos.atom.xml";
12 - homepageUrl= "https://garbas.si";
13 - }
14 - { name = "Zef Hemel";
15 - feedUrl = "http://zef.me/tag/nix/feed";
16 - homepageUrl= "http://zef.me";
17 - }
18 - { name = "Domen Kozar";
19 - feedUrl = "https://www.domenkozar.com/category/nixos/feed/atom/index.xml";
20 - homepageUrl = "https://www.domenkozar.com/";
21 - }
22 - { name = "Sander van der Burg";
23 - feedUrl = "http://sandervanderburg.blogspot.com/feeds/posts/default/-/Nix?alt=rss";
24 - homepageUrl = "http://sandervanderburg.blogspot.com";
25 - }
26 - { name = "Joachim Schiele";
27 - feedUrl = "https://lastlog.de/blog/feed.xml";
28 - homepageUrl = "http://lastlog.de/blog";
29 - }
30 - { name = "Rob Vermaas";
31 - feedUrl = "http://nixer.ghost.io/rss/";
32 - homepageUrl = "http://nixer.ghost.io";
33 - }
34 - { name = "Luca Bruno";
35 - feedUrl = "http://lethalman.blogspot.com/feeds/posts/default/-/nix";
36 - homepageUrl = "http://lethalman.blogspot.com";
37 - }
38 - { name = "Alexander Flatter";
39 - feedUrl = "http://aflatter.de/tag/nixos/rss/";
40 - homepageUrl = "http://aflatter.de";
41 - }
42 - { name = "Andrey Arapov";
43 - feedUrl = "http://nixaid.com/feeds/nixos.atom.xml";
44 - homepageUrl = "http://nixaid.com/";
45 - }
46 - { name = "Anders Papitto";
47 - feedUrl ="http://anderspapitto.com/tags/atom/nixos.xml";
48 - homepageUrl = "http://anderspapitto.com";
49 - }
50 - { name = "Flying Circus";
51 - feedUrl = "http://blog.flyingcircus.io/tag/nixos/feed/";
52 - homepageUrl = "http://blog.flyingcircus.io/tag/nixos/";
53 - }
54 - { name = "Ollie Charles";
55 - feedUrl = "https://ocharles.org.uk/blog/posts.rss";
56 - homepageUrl = "https://ocharles.org.uk/blog";
57 - }
58 - { name = "Edward Tjörnhammar";
59 - feedUrl = "http://edwtjo.me/tags/NixOS/atom.xml";
60 - homepageUrl = "http://edwtjo.me/tags/NixOS/";
61 - }
62 - { name = "Sheena Artrip";
63 - feedUrl = "https://sheenobu.net/categories/nixos/index.xml";
64 - homepageUrl = "https://sheenobu.net";
65 - }
66 - { name = "Munich NixOS Meetup";
67 - feedUrl = "https://www.meetup.com/Munich-NixOS-Meetup/events/rss/";
68 - homepageUrl = "https://www.meetup.com/Munich-NixOS-Meetup/";
69 - }
70 - {
71 - name = "Typing nix";
72 - feedUrl = "https://typing-nix.regnat.ovh/index.rss";
73 - homepageUrl = "https://typing-nix.regnat.ovh/";
74 - }
75 - {
76 - name = "Matthew Bauer";
77 - feedUrl = "https://matthewbauer.us/blog/feed.xml";
78 - homepageUrl = "https://matthewbauer.us/blog/";
79 - }
80 - {
81 - name = "Graham Christensen";
82 - feedUrl = "https://grahamc.com/feed/nix.xml";
83 - homepageUrl = "https://grahamc.com/";
84 - }
85 - {
86 - name = "Mayflower";
87 - feedUrl = "https://nixos.mayflower.consulting/blog/index.xml";
88 - homepageUrl = "https://nixos.mayflower.consulting/";
89 - }
90 - {
91 - name = "Hercules Labs";
92 - feedUrl = "https://blog.hercules-ci.com/feed.xml";
93 - homepageUrl = "https://blog.hercules-ci.com/";
94 - }
95 - {
96 - name = "Craige McWhirter";
97 - feedUrl = "https://mcwhirter.com.au/tags/NixOS/index.atom";
98 - homepageUrl = "https://mcwhirter.com.au/";
99 - }
100 - {
101 - name = "Cachix";
102 - feedUrl = "https://blog.cachix.org/index.xml";
103 - homepageUrl = "https://www.cachix.org";
104 - }
105 - {
106 - name = "nixbuild.net";
107 - feedUrl = "https://blog.nixbuild.net/index.xml";
108 - homepageUrl = "https://blog.nixbuild.net";
109 - }
110 - {
111 - name = "Guillaume (layus) Maudoux";
112 - feedUrl = "https://blog.layus.be/tags/nix.rss";
113 - homepageUrl = "https://blog.layus.be";
114 - }
115 -]
nixos-org/theme/admin.html.tmpl deleted
-41
@@ -1,41 +0,0 @@
1 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 -<html>
3 - <head>
4 - <title><TMPL_VAR name> administration</title>
5 - <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 - <meta name="generator" content="<TMPL_VAR generator ESCAPE="HTML">">
7 - </head>
8 -
9 - <body>
10 - <h2>Maintenance tasks</h2>
11 - <form action="admin_cb.py" method="GET">
12 - <input type="hidden" name="command" value="refresh" />
13 - <input type="submit" value="Refresh planet" />
14 - </form><br />
15 - <form action="admin_cb.py" method="GET">
16 - <input type="hidden" name="command" value="run" />
17 - <input type="submit" value="Run planet" />
18 - </form><br />
19 - <form action="admin_cb.py" method="GET">
20 - <input type="hidden" name="command" value="expunge" />
21 - <input type="submit" value="Expunge planet" />
22 - </form>
23 -
24 - <h2>Blacklist</h2>
25 - <div>
26 - <form action="admin_cb.py" method="GET">
27 - <input type="hidden" name="command" value="blacklist" />
28 - <TMPL_LOOP Items>
29 - <input type="checkbox" value="<TMPL_VAR id ESCAPE="HTML">" name="bl<TMPL_VAR __PASS__>">
30 - <a target="_blank" href="<TMPL_VAR channel_link ESCAPE="HTML">">
31 - <TMPL_VAR channel_name>
32 - </a>: <a target="_blank" href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_VAR title></a></input>
33 - <br />
34 - </TMPL_LOOP>
35 - <br />
36 - <input type="submit" value="Blacklist" />
37 - </form>
38 - </div>
39 - </body>
40 -
41 -</html>
nixos-org/theme/atom.xml.xslt deleted
-80
@@ -1,80 +0,0 @@
1 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
2 - xmlns:access="http://www.bloglines.com/about/specs/fac-1.0"
3 - xmlns:atom="http://www.w3.org/2005/Atom"
4 - xmlns:indexing="urn:atom-extension:indexing"
5 - xmlns:planet="http://planet.intertwingly.net/"
6 - xmlns:xhtml="http://www.w3.org/1999/xhtml"
7 - xmlns="http://www.w3.org/1999/xhtml"
8 - exclude-result-prefixes="planet xhtml">
9 -
10 - <!-- strip planet elements and attributes -->
11 - <xsl:template match="planet:*|@planet:*"/>
12 -
13 - <!-- strip obsolete link relationships -->
14 - <xsl:template match="atom:link[@rel='service.edit']"/>
15 - <xsl:template match="atom:link[@rel='service.post']"/>
16 - <xsl:template match="atom:link[@rel='service.feed']"/>
17 -
18 - <!-- Feedburner detritus -->
19 - <xsl:template match="xhtml:div[@class='feedflare']"/>
20 -
21 - <!-- Strip site meter -->
22 - <xsl:template match="xhtml:div[comment()[. = ' Site Meter ']]"/>
23 -
24 - <!-- add Google/LiveJournal-esque and Bloglines noindex directive -->
25 - <xsl:template match="atom:feed">
26 - <xsl:copy>
27 - <xsl:attribute name="indexing:index">no</xsl:attribute>
28 - <xsl:apply-templates select="@*"/>
29 - <access:restriction relationship="deny"/>
30 - <xsl:apply-templates select="node()"/>
31 - <xsl:text>&#10;</xsl:text>
32 - </xsl:copy>
33 - </xsl:template>
34 -
35 -<!-- popular customization: add planet name to each entry title
36 - <xsl:template match="atom:entry/atom:title">
37 - <xsl:text>&#10; </xsl:text>
38 - <xsl:copy>
39 - <xsl:apply-templates select="@*"/>
40 - <xsl:value-of select="../atom:source/planet:name"/>
41 - <xsl:text>: </xsl:text>
42 - <xsl:apply-templates select="node()"/>
43 - </xsl:copy>
44 - </xsl:template>
45 --->
46 -
47 - <!-- indent atom elements -->
48 - <xsl:template match="atom:*">
49 - <!-- double space before atom:entries -->
50 - <xsl:if test="self::atom:entry">
51 - <xsl:text>&#10;</xsl:text>
52 - </xsl:if>
53 -
54 - <!-- indent start tag -->
55 - <xsl:text>&#10;</xsl:text>
56 - <xsl:for-each select="ancestor::*">
57 - <xsl:text> </xsl:text>
58 - </xsl:for-each>
59 -
60 - <xsl:copy>
61 - <xsl:apply-templates select="@*|node()"/>
62 -
63 - <!-- indent end tag if there are element children -->
64 - <xsl:if test="*">
65 - <xsl:text>&#10;</xsl:text>
66 - <xsl:for-each select="ancestor::*">
67 - <xsl:text> </xsl:text>
68 - </xsl:for-each>
69 - </xsl:if>
70 - </xsl:copy>
71 - </xsl:template>
72 -
73 - <!-- pass through everything else -->
74 - <xsl:template match="@*|node()">
75 - <xsl:copy>
76 - <xsl:apply-templates select="@*|node()"/>
77 - </xsl:copy>
78 - </xsl:template>
79 -
80 -</xsl:stylesheet>
nixos-org/theme/config.ini deleted
-16
@@ -1,16 +0,0 @@
1 -# This theme reimplements the classic "fancy" htmltmpl using genshi
2 -
3 -[Planet]
4 -template_files:
5 - atom.xml.xslt
6 - foafroll.xml.xslt
7 - index.html.tmpl
8 - opml.xml.xslt
9 - rss10.xml.tmpl
10 - rss20.xml.tmpl
11 -
12 -bill_of_materials:
13 - planet.css
14 - images/feed-icon-10x10.png
15 - images/logo.png
16 - images/planet.png
nixos-org/theme/foafroll.xml.xslt deleted
-39
@@ -1,39 +0,0 @@
1 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
2 - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3 - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
4 - xmlns:foaf="http://xmlns.com/foaf/0.1/"
5 - xmlns:rss="http://purl.org/rss/1.0/"
6 - xmlns:dc="http://purl.org/dc/elements/1.1/"
7 - xmlns:atom="http://www.w3.org/2005/Atom"
8 - xmlns:planet="http://planet.intertwingly.net/"
9 - exclude-result-prefixes="atom planet">
10 -
11 - <xsl:output indent="yes" method="xml"/>
12 -
13 - <xsl:template match="atom:feed">
14 - <rdf:RDF>
15 - <foaf:Group>
16 - <foaf:name><xsl:value-of select="atom:author/atom:name"/></foaf:name>
17 - <foaf:homepage><xsl:value-of select="atom:author/atom:uri"/></foaf:homepage>
18 -
19 - <xsl:apply-templates select="planet:source"/>
20 - </foaf:Group>
21 - </rdf:RDF>
22 - </xsl:template>
23 -
24 - <xsl:template match="planet:source">
25 - <foaf:member>
26 - <foaf:Agent>
27 - <foaf:name><xsl:value-of select="planet:name"/></foaf:name>
28 - <foaf:weblog>
29 - <foaf:Document rdf:about="{atom:link[@rel='alternate']/@href}">
30 - <dc:title><xsl:value-of select="atom:title"/></dc:title>
31 - <rdfs:seeAlso>
32 - <rss:channel rdf:about="{atom:link[@rel='self']/@href}" />
33 - </rdfs:seeAlso>
34 - </foaf:Document>
35 - </foaf:weblog>
36 - </foaf:Agent>
37 - </foaf:member>
38 - </xsl:template>
39 -</xsl:stylesheet>
nixos-org/theme/images/feed-icon-10x10.png
Binary files a/nixos-org/theme/images/feed-icon-10x10.png and /dev/null differ
nixos-org/theme/images/foaf.png
Binary files a/nixos-org/theme/images/foaf.png and /dev/null differ
nixos-org/theme/images/logo.png
Binary files a/nixos-org/theme/images/logo.png and /dev/null differ
nixos-org/theme/images/opml.png
Binary files a/nixos-org/theme/images/opml.png and /dev/null differ
nixos-org/theme/images/planet.png
Binary files a/nixos-org/theme/images/planet.png and /dev/null differ
nixos-org/theme/images/tcosm11.gif
Binary files a/nixos-org/theme/images/tcosm11.gif and /dev/null differ
nixos-org/theme/images/venus.ico
Binary files a/nixos-org/theme/images/venus.ico and /dev/null differ
nixos-org/theme/images/venus.png
Binary files a/nixos-org/theme/images/venus.png and /dev/null differ
nixos-org/theme/index.html.tmpl deleted
-126
@@ -1,126 +0,0 @@
1 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 -<html>
3 -
4 -### Fancy Planet HTML template.
5 -###
6 -### When combined with the stylesheet and images in the output/ directory
7 -### of the Planet source, this gives you a much prettier result than the
8 -### default examples template and demonstrates how to use the config file
9 -### to support things like faces
10 -###
11 -### For documentation on the more boring template elements, see
12 -### examples/config.ini and examples/index.html.tmpl in the Planet source.
13 -
14 -<head>
15 -<title><TMPL_VAR name></title>
16 -<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
17 -<meta name="generator" content="<TMPL_VAR generator ESCAPE="HTML">">
18 -<link rel="stylesheet" href="planet.css" type="text/css">
19 -<TMPL_IF feedtype>
20 -<link rel="alternate" href="<TMPL_VAR feed ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">" type="application/<TMPL_VAR feedtype>+xml">
21 -</TMPL_IF>
22 -</head>
23 -
24 -<body>
25 -<h1><TMPL_VAR name></h1>
26 -<TMPL_VAR admin>
27 -
28 -<TMPL_LOOP Items>
29 -<TMPL_IF new_date>
30 -<TMPL_UNLESS __FIRST__>
31 -### End <div class="channelgroup">
32 -</div>
33 -### End <div class="daygroup">
34 -</div>
35 -</TMPL_UNLESS>
36 -<div class="daygroup">
37 -<h2><TMPL_VAR new_date></h2>
38 -</TMPL_IF>
39 -
40 -<TMPL_IF new_channel>
41 -<TMPL_UNLESS new_date>
42 -### End <div class="channelgroup">
43 -</div>
44 -</TMPL_UNLESS>
45 -<div class="channelgroup">
46 -
47 -### Planet provides template variables for *all* configuration options for
48 -### the channel (and defaults), even if it doesn't know about them. We
49 -### exploit this here to add hackergotchi faces to our channels. Planet
50 -### doesn't know about the "face", "facewidth" and "faceheight" configuration
51 -### variables, but makes them available to us anyway.
52 -
53 -<h3><a href="<TMPL_VAR channel_link ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">"><TMPL_VAR channel_name></a></h3>
54 -<TMPL_IF channel_face>
55 -<img class="face" src="images/<TMPL_VAR channel_face ESCAPE="HTML">" width="<TMPL_VAR channel_facewidth ESCAPE="HTML">" height="<TMPL_VAR channel_faceheight ESCAPE="HTML">" alt="">
56 -</TMPL_IF>
57 -</TMPL_IF>
58 -
59 -
60 -<div class="entrygroup" id="<TMPL_VAR id>"<TMPL_IF channel_language> lang="<TMPL_VAR channel_language>"</TMPL_IF>>
61 -<TMPL_IF title>
62 -<h4<TMPL_IF title_language> lang="<TMPL_VAR title_language>"</TMPL_IF>><a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_VAR title></a></h4>
63 -</TMPL_IF>
64 -<div class="entry">
65 -<div class="content"<TMPL_IF content_language> lang="<TMPL_VAR content_language>"</TMPL_IF>>
66 -<TMPL_VAR content>
67 -</div>
68 -
69 -### Planet also makes available all of the information from the feed
70 -### that it can. Use the 'planet-cache' tool on the cache file for
71 -### a particular feed to find out what additional keys it supports.
72 -### Comment extra fields are 'author' and 'category' which we
73 -### demonstrate below.
74 -
75 -<p class="date">
76 -<a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_IF author>by <TMPL_VAR author ESCAPE="HTML"> at </TMPL_IF><TMPL_VAR date><TMPL_IF category> under <TMPL_VAR category></TMPL_IF></a>
77 -</p>
78 -</div>
79 -</div>
80 -
81 -<TMPL_IF __LAST__>
82 -### End <div class="channelgroup">
83 -</div>
84 -### End <div class="daygroup">
85 -</div>
86 -</TMPL_IF>
87 -</TMPL_LOOP>
88 -
89 -
90 -<div class="sidebar">
91 -<img src="images/logo.png" width="136" height="136" alt="">
92 -
93 -<h2>Subscriptions</h2>
94 -<ul>
95 -<TMPL_LOOP Channels>
96 -<li>
97 -<a href="<TMPL_VAR url ESCAPE="HTML">" title="subscribe"><img src="images/feed-icon-10x10.png" alt="(feed)"></a> <a <TMPL_IF link>href="<TMPL_VAR link ESCAPE="HTML">" </TMPL_IF><TMPL_IF message>class="message" title="<TMPL_VAR message ESCAPE="HTML">"</TMPL_IF><TMPL_UNLESS message>title="<TMPL_VAR title_plain ESCAPE="HTML">"</TMPL_UNLESS>><TMPL_VAR name></a>
98 -</li>
99 -</TMPL_LOOP>
100 -</ul>
101 -
102 -<p>
103 -<strong>Last updated:</strong><br>
104 -<TMPL_VAR date><br>
105 -<em>All times are UTC.</em><br>
106 -<br>
107 -Powered by:<br>
108 -<a href="http://www.planetplanet.org/"><img src="images/planet.png" width="80" height="15" alt="Planet" border="0"></a>
109 -</p>
110 -
111 -<p>
112 -<h2>Planetarium:</h2>
113 -<ul>
114 -<li><a href="http://www.planetapache.org/">Planet Apache</a></li>
115 -<li><a href="http://planet.freedesktop.org/">Planet freedesktop.org</a></li>
116 -<li><a href="http://planet.gnome.org/">Planet GNOME</a></li>
117 -<li><a href="http://planet.debian.net/">Planet Debian</a></li>
118 -<li><a href="http://planet.fedoraproject.org/">Planet Fedora</a></li>
119 -<li><a href="http://planets.sun.com/">Planet Sun</a></li>
120 -<li><a href="http://www.planetplanet.org/">more...</a></li>
121 -</ul>
122 -</p>
123 -</div>
124 -</body>
125 -
126 -</html>
nixos-org/theme/opml.xml.xslt deleted
-40
@@ -1,40 +0,0 @@
1 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
2 - xmlns:atom="http://www.w3.org/2005/Atom"
3 - xmlns:planet="http://planet.intertwingly.net/"
4 - exclude-result-prefixes="atom planet">
5 -
6 - <xsl:output indent="yes" method="xml"/>
7 -
8 - <xsl:template name="rfc822" xmlns:date="http://exslt.org/dates-and-times">
9 - <xsl:param name="date"/>
10 - <!-- http://www.trachtenberg.com/blog/2005/03/03/xslt-cookbook-generating-an-rfc-822-date/ -->
11 - <xsl:value-of select="concat(date:day-abbreviation($date), ', ',
12 - format-number(date:day-in-month($date), '00'), ' ',
13 - date:month-abbreviation($date), ' ', date:year($date), ' ',
14 - format-number(date:hour-in-day($date), '00'), ':',
15 - format-number(date:minute-in-hour($date), '00'), ':',
16 - format-number(date:second-in-minute($date), '00'), ' GMT')"/>
17 - </xsl:template>
18 -
19 - <xsl:template match="atom:feed">
20 - <opml version="1.1">
21 - <head>
22 - <title><xsl:value-of select="atom:title"/></title>
23 - <dateModified>
24 - <xsl:call-template name="rfc822">
25 - <xsl:with-param name="date" select="atom:updated"/>
26 - </xsl:call-template>
27 - </dateModified>
28 - <ownerName><xsl:value-of select="atom:author/atom:name"/></ownerName>
29 - <ownerEmail><xsl:value-of select="atom:author/atom:email"/></ownerEmail>
30 - </head>
31 -
32 - <body>
33 - <xsl:for-each select="planet:source">
34 - <outline type="rss" text="{planet:name}" title="{atom:title}"
35 - xmlUrl="{atom:link[@rel='self']/@href}"/>
36 - </xsl:for-each>
37 - </body>
38 - </opml>
39 - </xsl:template>
40 -</xsl:stylesheet>
nixos-org/theme/planet.css deleted
-150
@@ -1,150 +0,0 @@
1 -body {
2 - border-right: 1px solid black;
3 - margin-right: 200px;
4 -
5 - padding-left: 20px;
6 - padding-right: 20px;
7 -}
8 -
9 -h1 {
10 - margin-top: 0px;
11 - padding-top: 20px;
12 -
13 - font-family: "Bitstream Vera Sans", sans-serif;
14 - font-weight: normal;
15 - letter-spacing: -2px;
16 - text-transform: lowercase;
17 - text-align: right;
18 -
19 - color: grey;
20 -}
21 -
22 -.admin {
23 - text-align: right;
24 -}
25 -
26 -h2 {
27 - font-family: "Bitstream Vera Sans", sans-serif;
28 - font-weight: normal;
29 - color: #200080;
30 -
31 - margin-left: -20px;
32 -}
33 -
34 -h3 {
35 - font-family: "Bitstream Vera Sans", sans-serif;
36 - font-weight: normal;
37 -
38 - background-color: #a0c0ff;
39 - border: 1px solid #5080b0;
40 -
41 - padding: 4px;
42 -}
43 -
44 -h3 a {
45 - text-decoration: none;
46 - color: inherit;
47 -}
48 -
49 -h4 {
50 - font-family: "Bitstream Vera Sans", sans-serif;
51 - font-weight: bold;
52 -}
53 -
54 -h4 a {
55 - text-decoration: none;
56 - color: inherit;
57 -}
58 -
59 -img.face {
60 - float: right;
61 - margin-top: -3em;
62 -}
63 -
64 -.entry {
65 - margin-bottom: 2em;
66 -}
67 -
68 -.entry .date {
69 - font-family: "Bitstream Vera Sans", sans-serif;
70 - color: grey;
71 -}
72 -
73 -.entry .date a {
74 - text-decoration: none;
75 - color: inherit;
76 -}
77 -
78 -.sidebar {
79 - position: absolute;
80 - top: 0px;
81 - right: 0px;
82 - width: 200px;
83 -
84 - margin-left: 0px;
85 - margin-right: 0px;
86 - padding-right: 0px;
87 -
88 - padding-top: 20px;
89 - padding-left: 0px;
90 -
91 - font-family: "Bitstream Vera Sans", sans-serif;
92 - font-size: 85%;
93 -}
94 -
95 -.sidebar h2 {
96 - font-size: 110%;
97 - font-weight: bold;
98 - color: black;
99 -
100 - padding-left: 5px;
101 - margin-left: 0px;
102 -}
103 -
104 -.sidebar ul {
105 - padding-left: 1em;
106 - margin-left: 0px;
107 -
108 - list-style-type: none;
109 -}
110 -
111 -.sidebar ul li:hover {
112 - color: grey;
113 -}
114 -
115 -.sidebar ul li a {
116 - text-decoration: none;
117 -}
118 -
119 -.sidebar ul li a:hover {
120 - text-decoration: underline;
121 -}
122 -
123 -.sidebar ul li a img {
124 - border: 0;
125 -}
126 -
127 -.sidebar p {
128 - border-top: 1px solid grey;
129 - margin-top: 30px;
130 - padding-top: 10px;
131 -
132 - padding-left: 5px;
133 -}
134 -
135 -.sidebar .message {
136 - cursor: help;
137 - border-bottom: 1px dashed red;
138 -}
139 -
140 -.sidebar a.message:hover {
141 - cursor: help;
142 - background-color: #ff0000;
143 - color: #ffffff !important;
144 - text-decoration: none !important;
145 -}
146 -
147 -a:hover {
148 - text-decoration: underline !important;
149 - color: blue !important;
150 -}
nixos-org/theme/rss10.xml.tmpl deleted
-44
@@ -1,44 +0,0 @@
1 -<?xml version="1.0"?>
2 -<rdf:RDF
3 - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4 - xmlns:dc="http://purl.org/dc/elements/1.1/"
5 - xmlns:foaf="http://xmlns.com/foaf/0.1/"
6 - xmlns:content="http://purl.org/rss/1.0/modules/content/"
7 - xmlns:atom="http://www.w3.org/2005/Atom"
8 - xmlns="http://purl.org/rss/1.0/"
9 ->
10 -<channel rdf:about="<TMPL_VAR link ESCAPE="HTML">">
11 - <title><TMPL_VAR name ESCAPE="HTML"></title>
12 - <link><TMPL_VAR link ESCAPE="HTML"></link>
13 - <description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
14 - <TMPL_IF pubsubhubbub_hub>
15 - <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
16 - </TMPL_IF>
17 - <TMPL_IF fullurl>
18 - <atom:link rel="self" href="<TMPL_VAR fullurl ESCAPE="HTML">" type="application/rss+xml"/>
19 - </TMPL_IF>
20 -
21 - <items>
22 - <rdf:Seq>
23 -<TMPL_LOOP Items>
24 - <rdf:li rdf:resource="<TMPL_VAR id ESCAPE="HTML">" />
25 -</TMPL_LOOP>
26 - </rdf:Seq>
27 - </items>
28 -</channel>
29 -
30 -<TMPL_LOOP Items>
31 -<item rdf:about="<TMPL_VAR id ESCAPE="HTML">">
32 - <title><TMPL_VAR channel_name ESCAPE="HTML"><TMPL_IF title>: <TMPL_VAR title_plain ESCAPE="HTML"></TMPL_IF></title>
33 - <link><TMPL_VAR link ESCAPE="HTML"></link>
34 - <TMPL_IF content>
35 - <content:encoded><TMPL_VAR content ESCAPE="HTML"></content:encoded>
36 - </TMPL_IF>
37 - <dc:date><TMPL_VAR date_iso></dc:date>
38 - <TMPL_IF author_name>
39 - <dc:creator><TMPL_VAR author_name></dc:creator>
40 - </TMPL_IF>
41 -</item>
42 -</TMPL_LOOP>
43 -
44 -</rdf:RDF>
nixos-org/theme/rss20.xml.tmpl deleted
-39
@@ -1,39 +0,0 @@
1 -<?xml version="1.0"?>
2 -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3 -
4 -<channel>
5 - <title><TMPL_VAR name></title>
6 - <link><TMPL_VAR link ESCAPE="HTML"></link>
7 - <language>en</language>
8 - <description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
9 - <TMPL_IF pubsubhubbub_hub>
10 - <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
11 - </TMPL_IF>
12 - <TMPL_IF fullurl>
13 - <atom:link rel="self" href="<TMPL_VAR fullurl ESCAPE="HTML">" type="application/rss+xml"/>
14 - </TMPL_IF>
15 -
16 -<TMPL_LOOP Items>
17 -<item>
18 - <title><TMPL_VAR channel_name ESCAPE="HTML"><TMPL_IF title>: <TMPL_VAR title_plain ESCAPE="HTML"></TMPL_IF></title>
19 - <guid isPermaLink="<TMPL_VAR guid_isPermaLink>"><TMPL_VAR id ESCAPE="HTML"></guid>
20 - <link><TMPL_VAR link ESCAPE="HTML"></link>
21 - <TMPL_IF content>
22 - <description><TMPL_VAR content ESCAPE="HTML"></description>
23 - </TMPL_IF>
24 - <pubDate><TMPL_VAR date_822></pubDate>
25 - <TMPL_IF author_email>
26 - <TMPL_IF author_name>
27 - <author><TMPL_VAR author_email> (<TMPL_VAR author_name>)</author>
28 - <TMPL_ELSE>
29 - <author><TMPL_VAR author_email></author>
30 - </TMPL_IF>
31 - </TMPL_IF>
32 - <TMPL_IF enclosure_href>
33 - <enclosure url="<TMPL_VAR enclosure_href ESCAPE="HTML">" length="<TMPL_VAR enclosure_length>" type="<TMPL_VAR enclosure_type>"/>
34 - </TMPL_IF>
35 -</item>
36 -</TMPL_LOOP>
37 -
38 -</channel>
39 -</rss>
nixos-org/theme/validate.html.xslt deleted
-146
@@ -1,146 +0,0 @@
1 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
2 - xmlns:atom="http://www.w3.org/2005/Atom"
3 - xmlns:xhtml="http://www.w3.org/1999/xhtml"
4 - xmlns:planet="http://planet.intertwingly.net/"
5 - xmlns="http://www.w3.org/1999/xhtml">
6 -
7 - <xsl:template match="atom:feed">
8 - <html xmlns="http://www.w3.org/1999/xhtml">
9 -
10 - <!-- head -->
11 - <xsl:text>&#10;&#10;</xsl:text>
12 - <head>
13 - <title><xsl:value-of select="atom:title"/></title>
14 - <meta name="robots" content="noindex,nofollow" />
15 - <meta name="generator" content="{atom:generator}" />
16 - <link rel="shortcut icon" href="/favicon.ico" />
17 - <style type="text/css">
18 - img{border:0}
19 - a{text-decoration:none}
20 - a:hover{text-decoration:underline}
21 - .message{border-bottom:1px dashed red} a.message:hover{cursor: help;text-decoration: none}
22 - dl{margin:0}
23 - dt{float:left;width:9em}
24 - dt:after{content:':'}
25 - </style>
26 - </head>
27 -
28 - <!-- body -->
29 - <xsl:text>&#10;&#10;</xsl:text>
30 - <body>
31 - <table border="1" cellpadding="3" cellspacing="0">
32 - <thead>
33 - <tr>
34 - <th></th>
35 - <th>Name</th>
36 - <th>Format</th>
37 - <xsl:if test="//planet:ignore_in_feed | //planet:filters |
38 - //planet:xml_base | //planet:*[contains(local-name(),'_type')]">
39 - <th>Notes</th>
40 - </xsl:if>
41 - </tr>
42 - </thead>
43 - <xsl:apply-templates select="planet:source">
44 - <xsl:sort select="planet:name"/>
45 - </xsl:apply-templates>
46 - <xsl:text>&#10;</xsl:text>
47 - </table>
48 - </body>
49 - </html>
50 - </xsl:template>
51 -
52 - <xsl:template match="planet:source">
53 - <xsl:variable name="validome_format">
54 - <xsl:choose>
55 - <xsl:when test="planet:format = 'rss090'">rss_0_90</xsl:when>
56 - <xsl:when test="planet:format = 'rss091n'">rss_0_91</xsl:when>
57 - <xsl:when test="planet:format = 'rss091u'">rss_0_91</xsl:when>
58 - <xsl:when test="planet:format = 'rss10'">rss_1_0</xsl:when>
59 - <xsl:when test="planet:format = 'rss092'">rss_0_90</xsl:when>
60 - <xsl:when test="planet:format = 'rss093'"></xsl:when>
61 - <xsl:when test="planet:format = 'rss094'">rss_0_90</xsl:when>
62 - <xsl:when test="planet:format = 'rss20'">rss_2_0</xsl:when>
63 - <xsl:when test="planet:format = 'rss'">rss_2_0</xsl:when>
64 - <xsl:when test="planet:format = 'atom01'"></xsl:when>
65 - <xsl:when test="planet:format = 'atom02'"></xsl:when>
66 - <xsl:when test="planet:format = 'atom03'">atom_0_3</xsl:when>
67 - <xsl:when test="planet:format = 'atom10'">atom_1_0</xsl:when>
68 - <xsl:when test="planet:format = 'atom'">atom_1_0</xsl:when>
69 - <xsl:when test="planet:format = 'cdf'"></xsl:when>
70 - <xsl:when test="planet:format = 'hotrss'"></xsl:when>
71 - </xsl:choose>
72 - </xsl:variable>
73 -
74 - <xsl:text>&#10;</xsl:text>
75 - <tr>
76 - <xsl:if test="planet:bozo='true'">
77 - <xsl:attribute name="style">background-color:#FCC</xsl:attribute>
78 - </xsl:if>
79 - <td>
80 - <a title="feed validator">
81 - <xsl:attribute name="href">
82 - <xsl:text>http://feedvalidator.org/check?url=</xsl:text>
83 - <xsl:choose>
84 - <xsl:when test="planet:http_location">
85 - <xsl:value-of select="planet:http_location"/>
86 - </xsl:when>
87 - <xsl:when test="atom:link[@rel='self']/@href">
88 - <xsl:value-of select="atom:link[@rel='self']/@href"/>
89 - </xsl:when>
90 - </xsl:choose>
91 - </xsl:attribute>
92 - <img src="http://feedvalidator.org/favicon.ico" hspace='2' vspace='1'/>
93 - </a>
94 - <a title="validome">
95 - <xsl:attribute name="href">
96 - <xsl:text>http://www.validome.org/rss-atom/validate?</xsl:text>
97 - <xsl:text>viewSourceCode=1&amp;version=</xsl:text>
98 - <xsl:value-of select="$validome_format"/>
99 - <xsl:text>&amp;url=</xsl:text>
100 - <xsl:choose>
101 - <xsl:when test="planet:http_location">
102 - <xsl:value-of select="planet:http_location"/>
103 - </xsl:when>
104 - <xsl:when test="atom:link[@rel='self']/@href">
105 - <xsl:value-of select="atom:link[@rel='self']/@href"/>
106 - </xsl:when>
107 - </xsl:choose>
108 - </xsl:attribute>
109 - <img src="http://validome.org/favicon.ico" hspace='2' vspace='1'/>
110 - </a>
111 - </td>
112 - <td>
113 - <a href="{atom:link[@rel='alternate']/@href}">
114 - <xsl:choose>
115 - <xsl:when test="planet:message">
116 - <xsl:attribute name="class">message</xsl:attribute>
117 - <xsl:attribute name="title">
118 - <xsl:value-of select="planet:message"/>
119 - </xsl:attribute>
120 - </xsl:when>
121 - <xsl:when test="atom:title">
122 - <xsl:attribute name="title">
123 - <xsl:value-of select="atom:title"/>
124 - </xsl:attribute>
125 - </xsl:when>
126 - </xsl:choose>
127 - <xsl:value-of select="planet:name"/>
128 - </a>
129 - </td>
130 - <td><xsl:value-of select="planet:format"/></td>
131 - <xsl:if test="planet:ignore_in_feed | planet:filters | planet:xml_base |
132 - planet:*[contains(local-name(),'_type')]">
133 - <td>
134 - <dl>
135 - <xsl:for-each select="planet:ignore_in_feed | planet:filters |
136 - planet:xml_base | planet:*[contains(local-name(),'_type')]">
137 - <xsl:sort select="local-name()"/>
138 - <dt><xsl:value-of select="local-name()"/></dt>
139 - <dd><xsl:value-of select="."/></dd>
140 - </xsl:for-each>
141 - </dl>
142 - </td>
143 - </xsl:if>
144 - </tr>
145 - </xsl:template>
146 -</xsl:stylesheet>
nixos-org/webserver.nix deleted
-296
@@ -1,296 +0,0 @@
1 -{ config, lib, pkgs, resources, ... }:
2 -
3 -with lib;
4 -
5 -let
6 -
7 - sshKeys = import ../ssh-keys.nix;
8 -
9 - acmeKeyDir = "/var/lib/acme";
10 - acmeWebRoot = "/data/acme/httpd";
11 -
12 - nixosVHostConfig =
13 - { hostName = "nixos.org";
14 - serverAliases = [ "test.nixos.org" "test2.nixos.org" "ipv6.nixos.org" "localhost" ];
15 - documentRoot = "/home/homepage/nixos-homepage";
16 - enableUserDir = true;
17 - servedDirs =
18 - [ { urlPath = "/irc";
19 - dir = "/data/irc";
20 - }
21 - { urlPath = "/channels";
22 - dir = "/releases/channels";
23 - }
24 - { urlPath = "/releases";
25 - dir = "/releases";
26 - }
27 - { urlPath = "/.well-known/acme-challenge";
28 - dir = "${acmeWebRoot}/.well-known/acme-challenge";
29 - }
30 - ];
31 -
32 - robotsEntries =
33 - ''
34 - User-agent: *
35 - Disallow: /repos/
36 - Disallow: /irc/
37 - '';
38 -
39 - extraConfig =
40 - ''
41 - MaxKeepAliveRequests 0
42 -
43 - Redirect /binary-cache https://cache.nixos.org
44 - Redirect /releases/channels /channels
45 - Redirect /tarballs http://tarballs.nixos.org
46 - Redirect /releases/nixos https://releases.nixos.org/nixos
47 - # Added for https://github.com/NixOS/nixos-homepage/pull/318
48 - Redirect /nixos/support.html /nixos/learn.html
49 -
50 - # Don't allow access to .git directories.
51 - RewriteEngine on
52 - RewriteRule "^(.*/)?\.git/" - [F,L]
53 -
54 - # Rewrite HTTP to HTTPS
55 - RewriteCond %{HTTPS} off
56 - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
57 -
58 - RedirectMatch "^/wiki.*" "https://nixos.org/nixos/wiki.html"
59 -
60 - <Location /server-status>
61 - SetHandler server-status
62 - Allow from 127.0.0.1
63 - Order deny,allow
64 - Deny from all
65 - </Location>
66 -
67 - <Location /irc>
68 - ForceType text/plain
69 - </Location>
70 - '';
71 - };
72 -
73 -in
74 -
75 -{
76 - networking.firewall.enable = true;
77 - networking.firewall.rejectPackets = true;
78 - networking.firewall.allowPing = true;
79 - networking.firewall.allowedTCPPorts = [ 80 443 ];
80 -
81 - networking.defaultMailServer = {
82 - directDelivery = true;
83 - hostName = "smtp.tudelft.nl";
84 - domain = "st.ewi.tudelft.nl";
85 - };
86 -
87 - environment.systemPackages = [ pkgs.perlPackages.XMLSimple pkgs.git pkgs.openssl ];
88 -
89 - nix.package = pkgs.nixUnstable;
90 -
91 - security.pam.enableSSHAgentAuth = true;
92 -
93 - services.httpd = {
94 - enable = true;
95 - #multiProcessingModule = "worker";
96 - logPerVirtualHost = true;
97 - adminAddr = "edolstra@gmail.com";
98 - hostName = "localhost";
99 -
100 - extraConfig =
101 - ''
102 - AddType application/nix-package .nixpkg
103 - AddType text/plain .sha256
104 -
105 - # Serve the package/option databases as automatically
106 - # decompressed JSON.
107 - AddEncoding x-gzip gz
108 -
109 - #StartServers 15
110 -
111 - ExtendedStatus On
112 - '';
113 -
114 - phpOptions =
115 - ''
116 - ;max_execution_time = 2
117 - memory_limit = "32M"
118 - '';
119 -
120 - virtualHosts =
121 - [ { # Catch-all site.
122 - hostName = "nixos.org";
123 - globalRedirect = "https://nixos.org/";
124 - }
125 -
126 - (nixosVHostConfig // {
127 - enableSSL = true;
128 - sslServerKey = "${acmeKeyDir}/nixos.org/key.pem";
129 - sslServerCert = "${acmeKeyDir}/nixos.org/fullchain.pem";
130 - extraConfig = nixosVHostConfig.extraConfig +
131 - ''
132 - Header always set Strict-Transport-Security "max-age=15552000"
133 - SSLProtocol All -SSLv2 -SSLv3
134 - SSLCipherSuite HIGH:!aNULL:!MD5:!EXP
135 - SSLHonorCipherOrder on
136 - '';
137 - })
138 -
139 - { hostName = "planet.nixos.org";
140 - globalRedirect = "https://planet.nixos.org/";
141 - }
142 -
143 - { hostName = "planet.nixos.org";
144 - documentRoot = "/var/www/planet.nixos.org";
145 - enableSSL = true;
146 - sslServerKey = "${acmeKeyDir}/planet.nixos.org/key.pem";
147 - sslServerCert = "${acmeKeyDir}/planet.nixos.org/fullchain.pem";
148 - extraConfig = nixosVHostConfig.extraConfig +
149 - ''
150 - Header always set Strict-Transport-Security "max-age=15552000"
151 - SSLProtocol All -SSLv2 -SSLv3
152 - SSLCipherSuite HIGH:!aNULL:!MD5:!EXP
153 - SSLHonorCipherOrder on
154 -
155 - # Rewrite HTTP to HTTPS
156 - RewriteCond %{HTTPS} off
157 - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
158 -
159 - '';
160 -
161 - servedDirs =
162 - [ { urlPath = "/.well-known/acme-challenge";
163 - dir = "${acmeWebRoot}/.well-known/acme-challenge";
164 - }
165 - ];
166 - }
167 - ];
168 - };
169 -
170 - users.users.eelco =
171 - { createHome = true;
172 - description = "Eelco Dolstra";
173 - extraGroups = [ "wheel" ];
174 - group = "users";
175 - home = "/home/eelco";
176 - isSystemUser = false;
177 - useDefaultShell = true;
178 - openssh.authorizedKeys.keys = [ sshKeys.eelco ];
179 - uid = 1000;
180 - };
181 -
182 - users.users.rbvermaa =
183 - { createHome = true;
184 - description = "Rob Vermaas";
185 - extraGroups = [ "wheel" ];
186 - group = "users";
187 - home = "/home/rbvermaa";
188 - isSystemUser = false;
189 - useDefaultShell = true;
190 - openssh.authorizedKeys.keys = [ sshKeys.rob ];
191 - uid = 1001;
192 - };
193 -
194 - users.users.rok =
195 - { createHome = true;
196 - description = "Rok Garbas";
197 - extraGroups = [ "wheel" ];
198 - group = "users";
199 - home = "/home/rok";
200 - isSystemUser = false;
201 - useDefaultShell = true;
202 - openssh.authorizedKeys.keys = [ sshKeys.garbas ];
203 - uid = 1006;
204 - };
205 -
206 - users.users.irclogs =
207 - { createHome = true;
208 - description = "#nixos IRC Logging";
209 - group = "users";
210 - home = "/home/irclogs";
211 - isSystemUser = false;
212 - useDefaultShell = true;
213 - openssh.authorizedKeys.keys =
214 - [ "ssh-dss AAAAB3NzaC1kc3MAAACBAMrcUf4qQj8XcG1nfG5/6rbfb4a89nV13KcJLBOVWa3Tn4YHeVz1lQDRHvnLK9YKM7MybDXD2wVG5nKuMbJMW5aZPEGrVUM4SQFXtnaNBgmoACrbG978Da/vNjGY89Q7GS/YqA24ASKnc09cRFsTmU0e/9BCbz9zXO4sJ8GaGHz7AAAAFQDZrJCdxTQ8GVvoFjL9Q1s1VHiClwAAAIBK+6r/kP/9VUzfRepEHCVObTIRYIhC9YcIZe2pMyCQSUIAjkGd5hkA8XQecs5/ym5Ddm2j61Kvt2jtGXQVP2F04wIFDuGK4GAfPpYjvLJaXtVxj1Ho4K2W/+WgKG1NEh466myZNsHr3v1MufbxNIS03lg6s8oJI4TmCaWtVHNW+AAAAIEAqh+ablUfEZAr6" ];
215 - uid = 1002;
216 - };
217 -
218 - users.users.homepage =
219 - { createHome = true;
220 - description = "nixos.org website";
221 - group = "users";
222 - home = "/home/homepage";
223 - useDefaultShell = true;
224 - openssh.authorizedKeys.keys = [ sshKeys.eelco sshKeys.rob ];
225 - };
226 -
227 - systemd.services.update-homepage =
228 - { description = "Update nixos.org Homepage";
229 - # FIXME: gnutar/xz deps work around a Nix bug.
230 - path = [ config.nix.package pkgs.git pkgs.bash pkgs.gnutar pkgs.xz ];
231 - serviceConfig.User = "homepage";
232 - environment.NIX_PATH = concatStringsSep ":" config.nix.nixPath;
233 - environment.NIX_REMOTE = "daemon";
234 - environment.CURL_CA_BUNDLE = "/etc/ssl/certs/ca-bundle.crt";
235 - serviceConfig.Type = "oneshot";
236 - script =
237 - ''
238 - cd ~/nixos-homepage
239 - git pull
240 - exec nix-shell --command 'make UPDATE=1'
241 - '';
242 - startAt = "*:0/20";
243 - };
244 -
245 - system.activationScripts.setShmMax =
246 - ''
247 - ${pkgs.procps}/sbin/sysctl -q -w kernel.shmmax=$((1 * 1024**3))
248 - '';
249 -
250 - services.venus = {
251 - enable = true;
252 - outputTheme = ./theme;
253 - outputDirectory = "/var/www/planet.nixos.org";
254 - feeds = import ./planet-feeds.nix;
255 - };
256 -
257 - nix.gc.automatic = true;
258 -
259 - # Let's Encrypt configuration.
260 - security.acme.certs = {
261 - "nixos.org" =
262 - { email = "edolstra@gmail.com";
263 - webroot = "${acmeWebRoot}";
264 - postRun = "systemctl reload httpd.service";
265 - };
266 - "planet.nixos.org" =
267 - { email = "edolstra@gmail.com";
268 - webroot = "${acmeWebRoot}";
269 - postRun = "systemctl reload httpd.service";
270 - };
271 - };
272 -
273 - # Generate a dummy self-signed certificate until we get one from
274 - # Let's Encrypt.
275 - system.activationScripts.createDummyKey =
276 - let
277 - mkKeys = dir:
278 - ''
279 - dir=${dir}
280 - mkdir -m 0700 -p $dir
281 - if ! [[ -e $dir/key.pem ]]; then
282 - ${pkgs.openssl}/bin/openssl genrsa -passout pass:foo -des3 -out $dir/key-in.pem 1024
283 - ${pkgs.openssl}/bin/openssl req -passin pass:foo -new -key $dir/key-in.pem -out $dir/key.csr \
284 - -subj "/C=NL/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
285 - ${pkgs.openssl}/bin/openssl rsa -passin pass:foo -in $dir/key-in.pem -out $dir/key.pem
286 - ${pkgs.openssl}/bin/openssl x509 -req -days 365 -in $dir/key.csr -signkey $dir/key.pem -out $dir/fullchain.pem
287 - fi
288 - '';
289 -
290 - in
291 - ''
292 - ${mkKeys "${acmeKeyDir}/nixos.org"}
293 - ${mkKeys "${acmeKeyDir}/planet.nixos.org"}
294 - '';
295 -
296 -}