mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
deploy: 731eb9f5d1
This commit is contained in:
parent
ffafe576f1
commit
b97c43d094
@ -1,2 +1,2 @@
|
||||
cp -r /nix/store/789156d9s7d9605j8d3brvd06fcprrv5-source/* .
|
||||
cp -r /nix/store/5is5k3mdxfv34gicchg6a7h4cn5f1d3w-source/* .
|
||||
/nix/store/3azx36x41zxajkvx6ld7q8p0ix99ic89-mdbook-0.4.34/bin/mdbook build --dest-dir "$out"
|
||||
|
6
env-vars
6
env-vars
@ -3,10 +3,10 @@ declare -x HOME="/homeless-shelter"
|
||||
declare -x HOST_PATH="/nix/store/5wspmqhgsfs7dza9gcyrj5yxbyd00q7y-coreutils-9.3/bin:/nix/store/039nii0j16pkzabxi9nm5dkh0z8awaww-findutils-4.9.0/bin:/nix/store/pmkqwxzi27lzdzkh2zpqajks9b3521jz-diffutils-3.10/bin:/nix/store/5ccllrgswk61a44yl7jcxs20jql1y32b-gnused-4.9/bin:/nix/store/m88w8in2zf5dwijxypyba02f0ff260rm-gnugrep-3.11/bin:/nix/store/scv8hzzf0vpxaqj96qjhzdcf04aygga1-gawk-5.2.2/bin:/nix/store/ygjmhqdm8labz14xxscz003srl1p2c94-gnutar-1.35/bin:/nix/store/pm6pfypn61d9n9gy19i01ak8hwc6g688-gzip-1.12/bin:/nix/store/ir3achw4jh3qyyac0vkj8jb46l06psqh-bzip2-1.0.8-bin/bin:/nix/store/k51cq3ap20c69wffjsl8qjs21wy5wlrq-gnumake-4.4.1/bin:/nix/store/r4vxljid3iq94jp7qvd639sps0fscwy3-bash-5.2-p15/bin:/nix/store/l6wb1grmnawfvy6xqp5x29jsq9p5dym8-patch-2.7.6/bin:/nix/store/ikzmh72n5f785gkfm02kzg4cl8d7hzmg-xz-5.4.4-bin/bin:/nix/store/yyrljddc4wqraxs72d8kzcf3filcncky-file-5.45/bin"
|
||||
declare -x NIX_BUILD_CORES="2"
|
||||
declare -x NIX_BUILD_TOP="/build"
|
||||
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=a3sx3bix71"
|
||||
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=3hb2ki0q84"
|
||||
declare -x NIX_ENFORCE_NO_NATIVE="1"
|
||||
declare -x NIX_ENFORCE_PURITY="1"
|
||||
declare -x NIX_LDFLAGS="-rpath /nix/store/a3sx3bix71y1l3lzjk8ajrx9c6h76kl1-nixos-anywhere-docs/lib "
|
||||
declare -x NIX_LDFLAGS="-rpath /nix/store/3hb2ki0q84kw4dci9di1ji5yvxdac3zd-nixos-anywhere-docs/lib "
|
||||
declare -x NIX_LOG_FD="2"
|
||||
declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
|
||||
declare -x NIX_STORE="/nix/store"
|
||||
@ -46,7 +46,7 @@ declare -x enableParallelInstalling="1"
|
||||
declare -x mesonFlags=""
|
||||
declare -x name="nixos-anywhere-docs"
|
||||
declare -x nativeBuildInputs=""
|
||||
declare -x out="/nix/store/a3sx3bix71y1l3lzjk8ajrx9c6h76kl1-nixos-anywhere-docs"
|
||||
declare -x out="/nix/store/3hb2ki0q84kw4dci9di1ji5yvxdac3zd-nixos-anywhere-docs"
|
||||
declare -x outputs="out"
|
||||
declare -x passAsFile="buildCommand"
|
||||
declare -x patches=""
|
||||
|
70
index.html
70
index.html
@ -191,29 +191,63 @@ below.</p>
|
||||
<h2 id="steps-required-to-run-nixos-anywhere"><a class="header" href="#steps-required-to-run-nixos-anywhere">Steps required to run nixos-anywhere</a></h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a directory for the flake and configuration files, and ensure flakes
|
||||
are enabled on your system. The
|
||||
<a href="https://nixos.wiki/wiki/Flakes#enable-flakes">Nixos Wiki</a> describes how to
|
||||
enable flakes.</p>
|
||||
<p><strong>Enable Flakes and Create a Directory</strong>:</p>
|
||||
<ul>
|
||||
<li>Ensure that flakes are enabled on your system. To enable flakes, refer to
|
||||
the <a href="https://nixos.wiki/wiki/Flakes#enable-flakes">NixOS Wiki</a>.</li>
|
||||
<li>Create a directory to store the flake and configuration files.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>In this directory, run the following command to create a flake.</p>
|
||||
<p><strong>Initialize a Flake</strong>: Within the newly-created directory, execute the
|
||||
command:</p>
|
||||
<pre><code class="language-bash">nix flake init
|
||||
</code></pre>
|
||||
<p>This command will generate a <code>flake.nix</code> file. Modify this file according to
|
||||
your requirements.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>For a Minimal Setup</strong>:<br />
|
||||
You can copy and paste the example flake contents available <a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">here</a>.
|
||||
This example is tailored for a virtual machine setup similar to one on <a href="https://www.hetzner.com/cloud">Hetzner Cloud</a>.</p>
|
||||
<p><strong>Hardware-Specific Configuration</strong>: If you're not using a virtual machine,
|
||||
you'll need to generate a custom hardware configuration with
|
||||
<code>nixos-generate-config</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<pre><code>nix flake init
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Getting <code>nixos-generate-config</code> on Target Machine</strong>:</p>
|
||||
<ol>
|
||||
<li><strong>Option 1</strong>: If NixOS is not installed, boot into an installer without
|
||||
first installing NixOS.</li>
|
||||
<li><strong>Option 2</strong>: Use the kexec tarball method, as described
|
||||
<a href="https://github.com/nix-community/nixos-images#kexec-tarballs">here</a>.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Generate Configuration</strong>: Run the following command on the target machine:</p>
|
||||
<pre><code class="language-bash">nixos-generate-config --no-filesystems --root /mnt
|
||||
</code></pre>
|
||||
<p>This will create a flake in a file named flake.nix. Edit the flake to suit your
|
||||
requirements. For a minimal installation, you can paste in the contents of the
|
||||
example flake from
|
||||
<a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">here</a>.</p>
|
||||
<p>Lines 29 in the sample file reads:</p>
|
||||
<pre><code># change this to your ssh key
|
||||
<p>This creates the necessary configuration files under <code>/mnt/etc/nixos/</code>, which
|
||||
you can then customize as needed.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ol start="3">
|
||||
<li>
|
||||
<p><strong>Find SSH Key Line</strong>:<br />
|
||||
if you cloned
|
||||
<a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">our nixos-anywhere-example</a>
|
||||
you will also replace the SSH key like this: In your configuration, locate
|
||||
the line that reads:</p>
|
||||
<pre><code class="language-bash"># change this to your ssh key
|
||||
"CHANGE"
|
||||
</code></pre>
|
||||
<p>Substitute the text that reads <code>CHANGE</code> with your own SSH key. This is
|
||||
important, otherwise you will not be able to log on to the target machine after
|
||||
NixOS has been installed.</p>
|
||||
<ol start="3">
|
||||
<p>Replace the text <code>CHANGE</code> with your own SSH key. This is crucial, as you will
|
||||
not be able to log into the target machine post-installation without it.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In the same directory, create a file named <code>disk-config.nix</code>. This will be
|
||||
used to specify the disk layout to the <strong>disko</strong> tool, which nixos-anywhere
|
||||
@ -237,7 +271,7 @@ For more information about this configuration, refer to the
|
||||
<p>Optionally, you can commit these files to a repo such as Github, or you can
|
||||
simply reference your local directory when you run <strong>nixos-anywhere</strong>. This
|
||||
example uses a local directory on the source machine.</p>
|
||||
<ol start="5">
|
||||
<ol start="6">
|
||||
<li>
|
||||
<p>On the target machine, make sure you have access as root via ssh by adding
|
||||
your SSH key to the file <code>authorized_keys</code> in the directory <code>/root/.ssh</code></p>
|
||||
@ -261,7 +295,7 @@ containing <code>flake.nix</code> and <code>disk-config.nix</code></p>
|
||||
</ul>
|
||||
<pre><code>nix run github:numtide/nixos-anywhere -- --flake <path to configuration>#<configuration name> --vm-test
|
||||
</code></pre>
|
||||
<ol start="7">
|
||||
<ol start="8">
|
||||
<li>
|
||||
<p>You can now run <strong>nixos-anywhere</strong> from the command line as shown below,
|
||||
where:</p>
|
||||
|
70
print.html
70
print.html
@ -192,29 +192,63 @@ below.</p>
|
||||
<h2 id="steps-required-to-run-nixos-anywhere"><a class="header" href="#steps-required-to-run-nixos-anywhere">Steps required to run nixos-anywhere</a></h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a directory for the flake and configuration files, and ensure flakes
|
||||
are enabled on your system. The
|
||||
<a href="https://nixos.wiki/wiki/Flakes#enable-flakes">Nixos Wiki</a> describes how to
|
||||
enable flakes.</p>
|
||||
<p><strong>Enable Flakes and Create a Directory</strong>:</p>
|
||||
<ul>
|
||||
<li>Ensure that flakes are enabled on your system. To enable flakes, refer to
|
||||
the <a href="https://nixos.wiki/wiki/Flakes#enable-flakes">NixOS Wiki</a>.</li>
|
||||
<li>Create a directory to store the flake and configuration files.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>In this directory, run the following command to create a flake.</p>
|
||||
<p><strong>Initialize a Flake</strong>: Within the newly-created directory, execute the
|
||||
command:</p>
|
||||
<pre><code class="language-bash">nix flake init
|
||||
</code></pre>
|
||||
<p>This command will generate a <code>flake.nix</code> file. Modify this file according to
|
||||
your requirements.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>For a Minimal Setup</strong>:<br />
|
||||
You can copy and paste the example flake contents available <a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">here</a>.
|
||||
This example is tailored for a virtual machine setup similar to one on <a href="https://www.hetzner.com/cloud">Hetzner Cloud</a>.</p>
|
||||
<p><strong>Hardware-Specific Configuration</strong>: If you're not using a virtual machine,
|
||||
you'll need to generate a custom hardware configuration with
|
||||
<code>nixos-generate-config</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<pre><code>nix flake init
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Getting <code>nixos-generate-config</code> on Target Machine</strong>:</p>
|
||||
<ol>
|
||||
<li><strong>Option 1</strong>: If NixOS is not installed, boot into an installer without
|
||||
first installing NixOS.</li>
|
||||
<li><strong>Option 2</strong>: Use the kexec tarball method, as described
|
||||
<a href="https://github.com/nix-community/nixos-images#kexec-tarballs">here</a>.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Generate Configuration</strong>: Run the following command on the target machine:</p>
|
||||
<pre><code class="language-bash">nixos-generate-config --no-filesystems --root /mnt
|
||||
</code></pre>
|
||||
<p>This will create a flake in a file named flake.nix. Edit the flake to suit your
|
||||
requirements. For a minimal installation, you can paste in the contents of the
|
||||
example flake from
|
||||
<a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">here</a>.</p>
|
||||
<p>Lines 29 in the sample file reads:</p>
|
||||
<pre><code># change this to your ssh key
|
||||
<p>This creates the necessary configuration files under <code>/mnt/etc/nixos/</code>, which
|
||||
you can then customize as needed.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ol start="3">
|
||||
<li>
|
||||
<p><strong>Find SSH Key Line</strong>:<br />
|
||||
if you cloned
|
||||
<a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">our nixos-anywhere-example</a>
|
||||
you will also replace the SSH key like this: In your configuration, locate
|
||||
the line that reads:</p>
|
||||
<pre><code class="language-bash"># change this to your ssh key
|
||||
"CHANGE"
|
||||
</code></pre>
|
||||
<p>Substitute the text that reads <code>CHANGE</code> with your own SSH key. This is
|
||||
important, otherwise you will not be able to log on to the target machine after
|
||||
NixOS has been installed.</p>
|
||||
<ol start="3">
|
||||
<p>Replace the text <code>CHANGE</code> with your own SSH key. This is crucial, as you will
|
||||
not be able to log into the target machine post-installation without it.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In the same directory, create a file named <code>disk-config.nix</code>. This will be
|
||||
used to specify the disk layout to the <strong>disko</strong> tool, which nixos-anywhere
|
||||
@ -238,7 +272,7 @@ For more information about this configuration, refer to the
|
||||
<p>Optionally, you can commit these files to a repo such as Github, or you can
|
||||
simply reference your local directory when you run <strong>nixos-anywhere</strong>. This
|
||||
example uses a local directory on the source machine.</p>
|
||||
<ol start="5">
|
||||
<ol start="6">
|
||||
<li>
|
||||
<p>On the target machine, make sure you have access as root via ssh by adding
|
||||
your SSH key to the file <code>authorized_keys</code> in the directory <code>/root/.ssh</code></p>
|
||||
@ -262,7 +296,7 @@ containing <code>flake.nix</code> and <code>disk-config.nix</code></p>
|
||||
</ul>
|
||||
<pre><code>nix run github:numtide/nixos-anywhere -- --flake <path to configuration>#<configuration name> --vm-test
|
||||
</code></pre>
|
||||
<ol start="7">
|
||||
<ol start="8">
|
||||
<li>
|
||||
<p>You can now run <strong>nixos-anywhere</strong> from the command line as shown below,
|
||||
where:</p>
|
||||
|
@ -191,29 +191,63 @@ below.</p>
|
||||
<h2 id="steps-required-to-run-nixos-anywhere"><a class="header" href="#steps-required-to-run-nixos-anywhere">Steps required to run nixos-anywhere</a></h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a directory for the flake and configuration files, and ensure flakes
|
||||
are enabled on your system. The
|
||||
<a href="https://nixos.wiki/wiki/Flakes#enable-flakes">Nixos Wiki</a> describes how to
|
||||
enable flakes.</p>
|
||||
<p><strong>Enable Flakes and Create a Directory</strong>:</p>
|
||||
<ul>
|
||||
<li>Ensure that flakes are enabled on your system. To enable flakes, refer to
|
||||
the <a href="https://nixos.wiki/wiki/Flakes#enable-flakes">NixOS Wiki</a>.</li>
|
||||
<li>Create a directory to store the flake and configuration files.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>In this directory, run the following command to create a flake.</p>
|
||||
<p><strong>Initialize a Flake</strong>: Within the newly-created directory, execute the
|
||||
command:</p>
|
||||
<pre><code class="language-bash">nix flake init
|
||||
</code></pre>
|
||||
<p>This command will generate a <code>flake.nix</code> file. Modify this file according to
|
||||
your requirements.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>For a Minimal Setup</strong>:<br />
|
||||
You can copy and paste the example flake contents available <a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">here</a>.
|
||||
This example is tailored for a virtual machine setup similar to one on <a href="https://www.hetzner.com/cloud">Hetzner Cloud</a>.</p>
|
||||
<p><strong>Hardware-Specific Configuration</strong>: If you're not using a virtual machine,
|
||||
you'll need to generate a custom hardware configuration with
|
||||
<code>nixos-generate-config</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<pre><code>nix flake init
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Getting <code>nixos-generate-config</code> on Target Machine</strong>:</p>
|
||||
<ol>
|
||||
<li><strong>Option 1</strong>: If NixOS is not installed, boot into an installer without
|
||||
first installing NixOS.</li>
|
||||
<li><strong>Option 2</strong>: Use the kexec tarball method, as described
|
||||
<a href="https://github.com/nix-community/nixos-images#kexec-tarballs">here</a>.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Generate Configuration</strong>: Run the following command on the target machine:</p>
|
||||
<pre><code class="language-bash">nixos-generate-config --no-filesystems --root /mnt
|
||||
</code></pre>
|
||||
<p>This will create a flake in a file named flake.nix. Edit the flake to suit your
|
||||
requirements. For a minimal installation, you can paste in the contents of the
|
||||
example flake from
|
||||
<a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">here</a>.</p>
|
||||
<p>Lines 29 in the sample file reads:</p>
|
||||
<pre><code># change this to your ssh key
|
||||
<p>This creates the necessary configuration files under <code>/mnt/etc/nixos/</code>, which
|
||||
you can then customize as needed.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ol start="3">
|
||||
<li>
|
||||
<p><strong>Find SSH Key Line</strong>:<br />
|
||||
if you cloned
|
||||
<a href="https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix">our nixos-anywhere-example</a>
|
||||
you will also replace the SSH key like this: In your configuration, locate
|
||||
the line that reads:</p>
|
||||
<pre><code class="language-bash"># change this to your ssh key
|
||||
"CHANGE"
|
||||
</code></pre>
|
||||
<p>Substitute the text that reads <code>CHANGE</code> with your own SSH key. This is
|
||||
important, otherwise you will not be able to log on to the target machine after
|
||||
NixOS has been installed.</p>
|
||||
<ol start="3">
|
||||
<p>Replace the text <code>CHANGE</code> with your own SSH key. This is crucial, as you will
|
||||
not be able to log into the target machine post-installation without it.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>In the same directory, create a file named <code>disk-config.nix</code>. This will be
|
||||
used to specify the disk layout to the <strong>disko</strong> tool, which nixos-anywhere
|
||||
@ -237,7 +271,7 @@ For more information about this configuration, refer to the
|
||||
<p>Optionally, you can commit these files to a repo such as Github, or you can
|
||||
simply reference your local directory when you run <strong>nixos-anywhere</strong>. This
|
||||
example uses a local directory on the source machine.</p>
|
||||
<ol start="5">
|
||||
<ol start="6">
|
||||
<li>
|
||||
<p>On the target machine, make sure you have access as root via ssh by adding
|
||||
your SSH key to the file <code>authorized_keys</code> in the directory <code>/root/.ssh</code></p>
|
||||
@ -261,7 +295,7 @@ containing <code>flake.nix</code> and <code>disk-config.nix</code></p>
|
||||
</ul>
|
||||
<pre><code>nix run github:numtide/nixos-anywhere -- --flake <path to configuration>#<configuration name> --vm-test
|
||||
</code></pre>
|
||||
<ol start="7">
|
||||
<ol start="8">
|
||||
<li>
|
||||
<p>You can now run <strong>nixos-anywhere</strong> from the command line as shown below,
|
||||
where:</p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user