Skip to content

Commit 4ebccef

Browse files
committedApr 14, 2020
Remove Azure image tab
It's very outdated. Also update this flake to use NixOS 20.03.
1 parent f860143 commit 4ebccef

File tree

4 files changed

+41
-140
lines changed

4 files changed

+41
-140
lines changed
 

Diff for: ‎Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ favicon.ico: favicon.png
8989
--define root=$(ROOT) \
9090
--define fileName=$< \
9191
--define nixosAmis=$(NIXOS_AMIS) \
92-
--define nixosAzureBlobs=$(NIXOS_AZURE_BLOBS) \
9392
--define nixosGCE=$(NIXOS_GCE) \
9493
--pre_process=nix-release.tt --pre_process=nixos-release.tt --pre_process=common.tt \
9594
$< > $@.tmp

Diff for: ‎download.tt

+6-106
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<p>Make sure to follow the instructions output by the script.</p>
2727
<p>The installation script requires that you have <code>sudo</code> access to <code>root</code>.</p>
2828
</section>
29+
2930
<section class="tab-pane" id="nix-verify-installation">
3031
<p>You may want to verify the integrity of the installation script using GPG:</p>
3132
<pre class="well">
@@ -41,12 +42,14 @@
4142
<a href="https://github.com/NixOS/nixos-homepage/blob/master/edolstra.gpg">on GitHub</a>.
4243
</p>
4344
</section>
45+
4446
<section class="tab-pane" id="nix-uninstall">
4547
<p>
4648
You can uninstall Nix simply by running <code>rm -rf /nix</code>.
4749
</p>
4850
<!-- TODO: expand this https://github.com/NixOS/nix/issues/1402 -->
4951
</section>
52+
5053
<section class="tab-pane" id="nix-more">
5154
<p>The following release items are also available:</p>
5255
<ul>
@@ -83,7 +86,6 @@
8386
<li class="active"><a href="#nixos-iso">ISO image</a></li>
8487
<li><a href="#nixos-virtualbox">VirtualBox</a></li>
8588
<li><a href="#nixos-amazon">Amazon EC2</a></li>
86-
<li><a href="#nixos-azure">Microsoft Azure</a></li>
8789
<li><a href="#nixos-google">Google Compute Engine</a></li>
8890
<li><a href="#nixos-more">More ...</a></li>
8991
</ul>
@@ -124,6 +126,7 @@
124126
href="[%prefix%]/latest-nixos-minimal-i686-linux.iso.sha256">SHA-256</a>)</li>
125127
</ul>
126128
</section>
129+
127130
<section class="tab-pane" id="nixos-virtualbox">
128131
<p>This is a demo appliance for VirtualBox (in OVA format) that has
129132
X11 and Plasma 5 enabled, as well as the VirtualBox guest additions. To
@@ -139,6 +142,7 @@
139142
href="[%prefix%]/latest-nixos-x86_64-linux.ova.sha256">SHA-256</a>)</li>
140143
</ul>
141144
</section>
145+
142146
<section class="tab-pane" id="nixos-amazon">
143147
<p>If you are an EC2 user, you can deploy a NixOS instance instantly
144148
in your preferred region by using one of the AMIs listed below.</p>
@@ -182,112 +186,7 @@
182186
<pre class="well">
183187
$ ec2-run-instances [% ami %] --region [% region %] -k <em>my-key-pair</em></pre>
184188
</section>
185-
<section class="tab-pane" id="nixos-azure">
186-
<p>If you are an Azure user, you can manually create a NixOS instance
187-
by using one of the bootstrap BLOBs listed below.</p>
188189

189-
<div class="alert alert-block">
190-
Please note that latest release currently lacks Azure image. We hope to
191-
change this soon.
192-
</div>
193-
194-
<div class="row">
195-
<table class="table">
196-
<thead>
197-
<tr>
198-
<th>NixOS version</th>
199-
<th>BLOB URL</th>
200-
</tr>
201-
</thead>
202-
<tbody>
203-
[% blobs = JSON.Escape.json_decode(IO.All.new(nixosAzureBlobs).all) %]
204-
[% FOREACH version IN blobs.keys.sort; blob = blobs.$version %]
205-
<tr>
206-
<td><code>[% version %]</code></td>
207-
<td><a href="[% blob %]"><code>[% blob %]</code></a></td>
208-
</tr>
209-
[% END %]
210-
</tbody>
211-
</table>
212-
</div>
213-
214-
<p>You can create an instance from the command line.
215-
For example, to create an instance of version
216-
<code>[% blob = blobs.$latestNixOSSeries; latestNixOSSeries %]</code>
217-
of NixOS using azure-cli, just run:</p>
218-
219-
<pre class="well">
220-
# settings
221-
# vm name must be lowercase and letters/numbers only because it's also used as the domain name
222-
export VM_NAME="nixosvm"
223-
export RESOURCE_GROUP="rg-nixosvm"
224-
export LOCATION="eastus"
225-
export STORAGE_ACCOUNT="nixosvm"
226-
export SOURCE_URI="<code>[% blob %]</code>"
227-
228-
# create group
229-
az group create \
230-
--name "$RESOURCE_GROUP" \
231-
--location "$LOCATION
232-
233-
# create storage
234-
az storage account create \
235-
--name "$STORAGE_ACCOUNT" \
236-
--group "$RESOURCE_GROUP" \
237-
--location "$LOCATION" \
238-
--sku Standard_LRS
239-
240-
az storage account keys list \
241-
--name "$STORAGE_ACCOUNT" \
242-
--group $RESOURCE_GROUP
243-
244-
# export one of the storage access keys
245-
export STORAGE_ACCOUNT_KEY="..."
246-
echo $STORAGE_ACCOUNT_KEY
247-
248-
az storage container create \
249-
--account-name "$STORAGE_ACCOUNT"
250-
--account-key "$STORAGE_ACCOUNT_KEY"
251-
--name vm-images
252-
253-
# copy the image blob
254-
az storage blob copy start \
255-
--source-uri "$SOURCE_URI" \
256-
--destination-blob "nixos-unstable-nixops.vhd" \
257-
--destination-container "vm-images" \
258-
--account-name "$STORAGE_ACCOUNT" \
259-
--account-key "$STORAGE_ACCOUNT_KEY"
260-
261-
# wait for blob copy status to change pending->success
262-
az storage blob show \
263-
--name "nixos-unstable-nixops.vhd" \
264-
--container-name "vm-images" \
265-
--account-name "$STORAGE_ACCOUNT" \
266-
--account-key "$STORAGE_ACCOUNT_KEY"
267-
268-
269-
# create vm
270-
az vm create \
271-
--name "$VM_NAME" \
272-
--resource-group "$RESOURCE_GROUP" \
273-
--location "$LOCATION" \
274-
--public-ip-address-dns-name "$VM_NAME" \
275-
--image "https://$STORAGE_ACCOUNT.blob.core.windows.net/vm-images/nixos-unstable-nixops.vhd" \
276-
--storage-account "$STORAGE_ACCOUNT" \
277-
--storage-container-name "$VM_NAME" \
278-
--use-unmanaged-disk \
279-
--os-disk-size-gb "32" \
280-
--os-type linux \
281-
--admin-username "azureuser" \
282-
--generate-ssh-keys
283-
284-
# show machine properties and log in
285-
az vm show \
286-
--name "$VM" \
287-
--resource-group "$GROUP"
288-
289-
ssh azureuser@"$VM_NAME"."$LOCATION".cloudapp.azure.com</pre>
290-
</section>
291190
<section class="tab-pane" id="nixos-google">
292191
<p>If you are Google Cloud Platform user, you can create a NixOS image using one of the raw disks listed below. You
293192
can then create a NixOS instance using the image.</p>
@@ -326,6 +225,7 @@ source_uri=$(sed 's%gs:/%https://storage.googleapis.com%' &lt;&lt;&lt; $source_u
326225
gcloud compute images create $image --source-uri=$source_uri
327226
gcloud compute instances create instance-1 --image=$image</pre>
328227
</section>
228+
329229
<section class="tab-pane" id="nixos-more">
330230
<h2 id="unstable-releases">Unstable releases</h2>
331231

Diff for: ‎flake.lock

+18-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎flake.nix

+17-20
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,35 @@
33

44
description = "The nixos.org homepage";
55

6-
inputs.nixpkgsStable.url = "nixpkgs/release-19.09";
6+
inputs.nixpkgs.url = "nixpkgs/nixos-20.03";
77
inputs.nix-pills = { url = "github:NixOS/nix-pills"; flake = false; };
88

9-
outputs = { self, nixpkgsStable, nix-pills }:
10-
with import nixpkgsStable { system = "x86_64-linux"; };
9+
outputs = { self, nixpkgs, nix-pills }:
10+
with import nixpkgs { system = "x86_64-linux"; };
1111
rec {
1212

1313
checks.x86_64-linux.build = defaultPackage.x86_64-linux;
1414

1515
packages.x86_64-linux = {
1616

17-
packagesExplorer = import ./packages-explorer nixpkgsStable;
17+
packagesExplorer = import ./packages-explorer nixpkgs;
1818

1919
nixosAmis = writeText "ec2-amis.json"
2020
(builtins.toJSON (
21-
import (nixpkgsStable + "/nixos/modules/virtualisation/ec2-amis.nix")));
22-
23-
nixosAzureBlobs = writeText "azure-blobs.json"
24-
(builtins.toJSON (
25-
import (nixpkgsStable + "/nixos/modules/virtualisation/azure-bootstrap-blobs.nix")));
21+
import (nixpkgs + "/nixos/modules/virtualisation/ec2-amis.nix")));
2622

2723
nixosGCE = writeText "gce-images.json"
2824
(builtins.toJSON (
29-
import (nixpkgsStable + "/nixos/modules/virtualisation/gce-images.nix")));
25+
import (nixpkgs + "/nixos/modules/virtualisation/gce-images.nix")));
3026

3127
nixPills = import nix-pills {
3228
inherit pkgs;
33-
revCount = nix-pills.lastModified; # FIXME
29+
revCount = nix-pills.lastModifiedDate; # FIXME
3430
shortRev = nix-pills.shortRev;
3531
};
3632

3733
homepage = stdenv.mkDerivation {
38-
name = "nixos-homepage-${self.lastModified}";
34+
name = "nixos-homepage-${self.lastModifiedDate}";
3935

4036
src = self;
4137

@@ -50,6 +46,7 @@
5046
perlPackages.TemplateToolkit
5147
perlPackages.TemplatePluginJSONEscape
5248
perlPackages.TemplatePluginIOAll
49+
perlPackages.AppConfig
5350
pkgs.nix
5451
imagemagick
5552
xhtml1
@@ -65,11 +62,10 @@
6562

6663
makeFlags =
6764
[ "NIX_MANUAL_IN=${nix.doc}/share/doc/nix/manual"
68-
"NIXOS_MANUAL_IN=${nixpkgsStable.htmlDocs.nixosManual}"
69-
"NIXPKGS_MANUAL_IN=${nixpkgsStable.htmlDocs.nixpkgsManual}"
65+
"NIXOS_MANUAL_IN=${nixpkgs.htmlDocs.nixosManual}"
66+
"NIXPKGS_MANUAL_IN=${nixpkgs.htmlDocs.nixpkgsManual}"
7067
"NIXOS_AMIS=${packages.x86_64-linux.nixosAmis}"
7168
"NIXOS_GCE=${packages.x86_64-linux.nixosGCE}"
72-
"NIXOS_AZURE_BLOBS=${packages.x86_64-linux.nixosAzureBlobs}"
7369
"PACKAGES_EXPLORER=${packages.x86_64-linux.packagesExplorer}/bundle.js"
7470
"NIX_PILLS_MANUAL_IN=${packages.x86_64-linux.nixPills}/share/doc/nix-pills"
7571
];
@@ -81,11 +77,10 @@
8177

8278
shellHook = ''
8379
export NIX_MANUAL_IN="${nix.doc}/share/doc/nix/manual"
84-
export NIXOS_MANUAL_IN="${nixpkgsStable.htmlDocs.nixosManual}"
85-
export NIXPKGS_MANUAL_IN="${nixpkgsStable.htmlDocs.nixpkgsManual}"
80+
export NIXOS_MANUAL_IN="${nixpkgs.htmlDocs.nixosManual}"
81+
export NIXPKGS_MANUAL_IN="${nixpkgs.htmlDocs.nixpkgsManual}"
8682
export NIXOS_AMIS="${packages.x86_64-linux.nixosAmis}"
8783
export NIXOS_GCE="${packages.x86_64-linux.nixosGCE}"
88-
export NIXOS_AZURE_BLOBS="${packages.x86_64-linux.nixosAzureBlobs}"
8984
export PACKAGES_EXPLORER="${packages.x86_64-linux.packagesExplorer}/bundle.js"
9085
export NIX_PILLS_MANUAL_IN="${packages.x86_64-linux.nixPills}/share/doc/nix-pills"
9186
'';
@@ -96,7 +91,7 @@
9691

9792
defaultPackage.x86_64-linux = packages.x86_64-linux.homepage;
9893

99-
nixosConfigurations.container = nixpkgsStable.lib.nixosSystem {
94+
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
10095
system = "x86_64-linux";
10196
modules =
10297
[ ({ lib, ... }:
@@ -107,7 +102,9 @@
107102
services.httpd = {
108103
enable = true;
109104
adminAddr = "admin@example.org";
110-
documentRoot = self.packages.x86_64-linux.homepage;
105+
virtualHosts.default = {
106+
documentRoot = self.packages.x86_64-linux.homepage;
107+
};
111108
};
112109
})
113110
];

0 commit comments

Comments
 (0)
Please sign in to comment.