forked from NixOS/nixos-homepage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.tt
141 lines (127 loc) · 5.33 KB
/
index.tt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[% WRAPPER layout.tt title="NixOS Linux" hideTitle=1 menu='nixos' %]
[% USE JSON.Escape %]
[% USE IO.All %]
[% USE HTML %]
[% USE String %]
<link rel="alternate" type="application/rss+xml" title="RSS" href="/news-rss.xml" />
<div class="jumbotron">
<img class="right-logo" src="[%root%]logo/nixos-logo-only-hires.png" alt="NixOS Logo"/>
<h1>NixOS</h1>
<h2>The Purely Functional Linux Distribution</h2>
<p class="lead">NixOS is a Linux distribution with a unique approach
to package and configuration management. Built on top of the <a
href="[%root%]nix">Nix package manager</a>, it is completely
declarative, makes upgrading systems reliable, and has <a
href="[%root%]nixos/about.html">many other advantages</a>.</p>
<div class="get-nixos get-button">
<a class="btn btn-large btn-success"
href="[%root%]nixos/download.html"><i class="fa
fa-cloud-download"></i> Get NixOS</a>
</div>
</div>
<hr />
<div class="row-fluid">
<div class="span4">
<h2>Declarative</h2>
<p>NixOS has a completely <strong>declarative</strong> approach to
configuration management: you write a specification of the desired
configuration of your system in NixOS’s modular language, and
NixOS takes care of making it happen.</p>
</div>
<div class="span4">
<h2>Reliable</h2>
<p>NixOS has <strong>atomic upgrades and rollbacks</strong>. It’s
always safe to try an upgrade or configuration change: if things
go wrong, you can always roll back to the previous
configuration.</p>
</div>
<div class="span4">
<h2>DevOps-friendly</h2>
<p>Declarative specs and safe upgrades make NixOS a great system
for DevOps use. <a
href="[%root%]nixops"><strong>NixOps</strong></a>, the NixOS cloud
deployment tool, allows you to provision and manage networks of
NixOS machines in environments like Amazon EC2 and VirtualBox.</p>
</div>
</div>
<hr />
<div class="row-fluid">
<div class="span6">
<h3>
<a href="/news-rss.xml">
<img src="/logo/rss.png"/>
</a>
News
</h3>
[% INSERT "latest-news.xhtml" %]
<p><a href="news.html" class="btn btn-mini">More »</a></p>
</div>
<div class="span6">
<h3>
<a href="/blogs.xml">
<img src="/logo/rss.png"/>
</a>
Blog Posts
</h3>
<ul class="nixos-blogs">
[% FOREACH b IN JSON.Escape.json_decode(IO.All.new('blogs.json').all).channel.item.first(5); IF b; %]
<li>
<div class="nixos-blog">
[%
USE title = String(HTML.escape(b.title.remove('^[^:]*:').trim));
title = title.replace('^[a-z]', title.copy.truncate(1).upper)
author = b.title.split(':').0.trim;
%]
[%
%]
<div class="nixos-blog-title">
<a [% HTML.attributes(href => b.link) %]>[% title %]</a>
</div>
<div class="nixos-blog-author-info">
<span class="nixos-blog-author">[% HTML.escape(author) %]</span>
<span class="muted"> wrote on [% HTML.escape(b.pubDate) %]</span>
</div>
</div>
</li>
[% END; END %]
<p><a href="https://planet.nixos.org/" class="btn btn-mini">More »</a></p>
</ul>
<h3>Commits</h3>
[% stats = JSON.Escape.json_decode(IO.All.new('nixpkgs-commit-stats.json').all).all;
nrCommits = 0; FOREACH s IN stats; nrCommits = nrCommits + s; END %]
<p class="muted">[% stats.-1 %] commits in the last week, [% nrCommits %] in the last year</p>
<ul class="nixos-commits">
[% FOREACH c IN JSON.Escape.json_decode(IO.All.new('nixpkgs-commits.json').all).first(5); IF c; %]
<li>
<div class="nixos-commit">
<img class="nixos-commit-avatar" [% HTML.attributes(src => c.author ? c.author.avatar_url : root _ "images/GitHub-Mark-32px.png", alt => "Avatar") %]/>
<div class="nixos-commit-summary">
[% IF c.commit.message %]
<a [% HTML.attributes(href => c.html_url) %]>[% USE msg = String(c.commit.message.split('\n').0); HTML.escape(msg.truncate(60, '…')) %]</a>
[% ELSE %]
<em>No commit message</em>
[% END %]
</div>
<div class="nixos-commit-author-info">
<span class="nixos-commit-author">
[% IF c.author %]
<a [% HTML.attributes(href => c.author.html_url) %]>[% HTML.escape(c.commit.author.name) %]</a>
[% ELSE %]
[% HTML.escape(c.commit.author.name) %]
[% END %]
</span>
<span class="muted">authored [% HTML.escape(c.commit.author.date) %]</span>
</div>
</div>
</li>
[% END; END %]
</ul>
<p><a href="https://github.com/NixOS/nixpkgs/commits/master" class="btn btn-mini">More »</a></p>
<h3>Twitter</h3>
<p>
<a class="twitter-timeline" data-chrome="noheader nofooter transparent" href="https://twitter.com/nixos_org" data-widget-id="433975692670152704">Tweets by @nixos_org</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
</div>
</div>
[% END %]