mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 03:40:36 +03:00
deploy: a82015f2c0
This commit is contained in:
parent
c44201f558
commit
ffafe576f1
@ -1,2 +1,2 @@
|
|||||||
cp -r /nix/store/77hisn5864q8k61mdf48306ir1kr3m9j-source/* .
|
cp -r /nix/store/789156d9s7d9605j8d3brvd06fcprrv5-source/* .
|
||||||
/nix/store/3azx36x41zxajkvx6ld7q8p0ix99ic89-mdbook-0.4.34/bin/mdbook build --dest-dir "$out"
|
/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 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_CORES="2"
|
||||||
declare -x NIX_BUILD_TOP="/build"
|
declare -x NIX_BUILD_TOP="/build"
|
||||||
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=imn8jc84x0"
|
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=a3sx3bix71"
|
||||||
declare -x NIX_ENFORCE_NO_NATIVE="1"
|
declare -x NIX_ENFORCE_NO_NATIVE="1"
|
||||||
declare -x NIX_ENFORCE_PURITY="1"
|
declare -x NIX_ENFORCE_PURITY="1"
|
||||||
declare -x NIX_LDFLAGS="-rpath /nix/store/imn8jc84x0847ab02wjhp05n2191h8ha-nixos-anywhere-docs/lib "
|
declare -x NIX_LDFLAGS="-rpath /nix/store/a3sx3bix71y1l3lzjk8ajrx9c6h76kl1-nixos-anywhere-docs/lib "
|
||||||
declare -x NIX_LOG_FD="2"
|
declare -x NIX_LOG_FD="2"
|
||||||
declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
|
declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
|
||||||
declare -x NIX_STORE="/nix/store"
|
declare -x NIX_STORE="/nix/store"
|
||||||
@ -46,7 +46,7 @@ declare -x enableParallelInstalling="1"
|
|||||||
declare -x mesonFlags=""
|
declare -x mesonFlags=""
|
||||||
declare -x name="nixos-anywhere-docs"
|
declare -x name="nixos-anywhere-docs"
|
||||||
declare -x nativeBuildInputs=""
|
declare -x nativeBuildInputs=""
|
||||||
declare -x out="/nix/store/imn8jc84x0847ab02wjhp05n2191h8ha-nixos-anywhere-docs"
|
declare -x out="/nix/store/a3sx3bix71y1l3lzjk8ajrx9c6h76kl1-nixos-anywhere-docs"
|
||||||
declare -x outputs="out"
|
declare -x outputs="out"
|
||||||
declare -x passAsFile="buildCommand"
|
declare -x passAsFile="buildCommand"
|
||||||
declare -x patches=""
|
declare -x patches=""
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
cd docs
|
cd docs
|
||||||
workdir=$(${pkgs.coreutils}/bin/mktemp -d)
|
workdir=$(${pkgs.coreutils}/bin/mktemp -d)
|
||||||
trap 'rm -rf "$workdir"' EXIT
|
trap 'rm -rf "$workdir"' EXIT
|
||||||
${lib.getExe pkgs.mdbook} serve --dest-dir "$workdir"
|
${pkgs.mdbook}/bin/mdbook serve --dest-dir "$workdir"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
cp -r ${lib.cleanSource ./.}/* .
|
cp -r ${lib.cleanSource ./.}/* .
|
||||||
${lib.getExe pkgs.mdbook} build --dest-dir "$out"
|
${pkgs.mdbook}/bin/mdbook build --dest-dir "$out"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
29
howtos.html
29
howtos.html
@ -174,6 +174,7 @@
|
|||||||
<p><a href="#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></p>
|
<p><a href="#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></p>
|
||||||
<p><a href="#using-your-own-kexec-image">Using your own kexec image</a></p>
|
<p><a href="#using-your-own-kexec-image">Using your own kexec image</a></p>
|
||||||
<p><a href="#secrets-and-full-disk-encryption">Secrets and full disk encryption</a></p>
|
<p><a href="#secrets-and-full-disk-encryption">Secrets and full disk encryption</a></p>
|
||||||
|
<p><a href="#use-without-flakes">Use without flakes</a></p>
|
||||||
<h2 id="installing-on-a-machine-with-no-operating-system"><a class="header" href="#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></h2>
|
<h2 id="installing-on-a-machine-with-no-operating-system"><a class="header" href="#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></h2>
|
||||||
<p>If your machine doesn't currently have an operating system installed, you can
|
<p>If your machine doesn't currently have an operating system installed, you can
|
||||||
still run <code>nixos-anywhere</code> remotely to automate the install. To do this, you
|
still run <code>nixos-anywhere</code> remotely to automate the install. To do this, you
|
||||||
@ -315,6 +316,34 @@ nixos-anywhere \
|
|||||||
encryption password, and <code>my-disk-encryption-password</code> with the relevant entry
|
encryption password, and <code>my-disk-encryption-password</code> with the relevant entry
|
||||||
in your pass password store. Also, ensure to replace <code>'.#your-host'</code> and
|
in your pass password store. Also, ensure to replace <code>'.#your-host'</code> and
|
||||||
<code>root@yourip</code> with your actual flake and IP address, respectively.</p>
|
<code>root@yourip</code> with your actual flake and IP address, respectively.</p>
|
||||||
|
<h2 id="use-without-flakes"><a class="header" href="#use-without-flakes">Use without flakes</a></h2>
|
||||||
|
<p>While <code>nixos-anywhere</code> is designed to work optimally with Nix Flakes, it also
|
||||||
|
supports the traditional approach without flakes. This document outlines how to
|
||||||
|
use <code>nixos-anywhere</code> without relying on flakes.</p>
|
||||||
|
<h3 id="generate-required-store-paths"><a class="header" href="#generate-required-store-paths">Generate Required Store Paths</a></h3>
|
||||||
|
<p>Before you can use <code>nixos-anywhere</code> without flakes, you'll need to manually
|
||||||
|
generate the paths for the NixOS system toplevel and disk image. The paths are
|
||||||
|
generated using <code>nix-build</code> and are necessary for executing <code>nixos-anywhere</code>.</p>
|
||||||
|
<h4 id="generating-nixos-system-toplevel"><a class="header" href="#generating-nixos-system-toplevel">Generating NixOS System Toplevel:</a></h4>
|
||||||
|
<p>Execute the following command to generate the store path for the NixOS system
|
||||||
|
toplevel:</p>
|
||||||
|
<pre><code class="language-bash">nix-build -I nixos-config=/etc/nixos/configuration.nix -E '(import <nixpkgs/nixos> {}).config.system.build.toplevel'
|
||||||
|
</code></pre>
|
||||||
|
<p>This will output a path in <code>/nix/store</code> that corresponds to the system toplevel,
|
||||||
|
which includes all the software and configurations for the system. Make note of
|
||||||
|
this path for later use.</p>
|
||||||
|
<h4 id="generating-disk-image-without-dependencies"><a class="header" href="#generating-disk-image-without-dependencies">Generating Disk Image without Dependencies:</a></h4>
|
||||||
|
<p>To generate the disk image without dependencies, execute:</p>
|
||||||
|
<pre><code class="language-bash">nix-build -I nixos-config=/etc/nixos/configuration.nix -E '(import <nixpkgs/nixos> {}).config.system.build.diskNoDeps'
|
||||||
|
</code></pre>
|
||||||
|
<p>This will also output a script path in <code>/nix/store</code> that will format your disk.
|
||||||
|
Keep this path handy as well.</p>
|
||||||
|
<h3 id="running-nixos-anywhere"><a class="header" href="#running-nixos-anywhere">Running NixOS-Anywhere</a></h3>
|
||||||
|
<p>With both paths in hand, you can execute <code>nixos-anywhere</code> as follows:</p>
|
||||||
|
<pre><code class="language-bash">nixos-anywhere --store-paths /nix/store/[your-toplevel-path] /nix/store/[your-disk-image-path]
|
||||||
|
</code></pre>
|
||||||
|
<p>Replace <code>[your-toplevel-path]</code> and <code>[your-disk-image-path]</code> with the
|
||||||
|
corresponding store paths you generated earlier.</p>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
29
print.html
29
print.html
@ -382,6 +382,7 @@ have kexec support.</li>
|
|||||||
<p><a href="howtos.html#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></p>
|
<p><a href="howtos.html#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></p>
|
||||||
<p><a href="howtos.html#using-your-own-kexec-image">Using your own kexec image</a></p>
|
<p><a href="howtos.html#using-your-own-kexec-image">Using your own kexec image</a></p>
|
||||||
<p><a href="howtos.html#secrets-and-full-disk-encryption">Secrets and full disk encryption</a></p>
|
<p><a href="howtos.html#secrets-and-full-disk-encryption">Secrets and full disk encryption</a></p>
|
||||||
|
<p><a href="howtos.html#use-without-flakes">Use without flakes</a></p>
|
||||||
<h2 id="installing-on-a-machine-with-no-operating-system"><a class="header" href="#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></h2>
|
<h2 id="installing-on-a-machine-with-no-operating-system"><a class="header" href="#installing-on-a-machine-with-no-operating-system">Installing on a machine with no operating system</a></h2>
|
||||||
<p>If your machine doesn't currently have an operating system installed, you can
|
<p>If your machine doesn't currently have an operating system installed, you can
|
||||||
still run <code>nixos-anywhere</code> remotely to automate the install. To do this, you
|
still run <code>nixos-anywhere</code> remotely to automate the install. To do this, you
|
||||||
@ -523,6 +524,34 @@ nixos-anywhere \
|
|||||||
encryption password, and <code>my-disk-encryption-password</code> with the relevant entry
|
encryption password, and <code>my-disk-encryption-password</code> with the relevant entry
|
||||||
in your pass password store. Also, ensure to replace <code>'.#your-host'</code> and
|
in your pass password store. Also, ensure to replace <code>'.#your-host'</code> and
|
||||||
<code>root@yourip</code> with your actual flake and IP address, respectively.</p>
|
<code>root@yourip</code> with your actual flake and IP address, respectively.</p>
|
||||||
|
<h2 id="use-without-flakes"><a class="header" href="#use-without-flakes">Use without flakes</a></h2>
|
||||||
|
<p>While <code>nixos-anywhere</code> is designed to work optimally with Nix Flakes, it also
|
||||||
|
supports the traditional approach without flakes. This document outlines how to
|
||||||
|
use <code>nixos-anywhere</code> without relying on flakes.</p>
|
||||||
|
<h3 id="generate-required-store-paths"><a class="header" href="#generate-required-store-paths">Generate Required Store Paths</a></h3>
|
||||||
|
<p>Before you can use <code>nixos-anywhere</code> without flakes, you'll need to manually
|
||||||
|
generate the paths for the NixOS system toplevel and disk image. The paths are
|
||||||
|
generated using <code>nix-build</code> and are necessary for executing <code>nixos-anywhere</code>.</p>
|
||||||
|
<h4 id="generating-nixos-system-toplevel"><a class="header" href="#generating-nixos-system-toplevel">Generating NixOS System Toplevel:</a></h4>
|
||||||
|
<p>Execute the following command to generate the store path for the NixOS system
|
||||||
|
toplevel:</p>
|
||||||
|
<pre><code class="language-bash">nix-build -I nixos-config=/etc/nixos/configuration.nix -E '(import <nixpkgs/nixos> {}).config.system.build.toplevel'
|
||||||
|
</code></pre>
|
||||||
|
<p>This will output a path in <code>/nix/store</code> that corresponds to the system toplevel,
|
||||||
|
which includes all the software and configurations for the system. Make note of
|
||||||
|
this path for later use.</p>
|
||||||
|
<h4 id="generating-disk-image-without-dependencies"><a class="header" href="#generating-disk-image-without-dependencies">Generating Disk Image without Dependencies:</a></h4>
|
||||||
|
<p>To generate the disk image without dependencies, execute:</p>
|
||||||
|
<pre><code class="language-bash">nix-build -I nixos-config=/etc/nixos/configuration.nix -E '(import <nixpkgs/nixos> {}).config.system.build.diskNoDeps'
|
||||||
|
</code></pre>
|
||||||
|
<p>This will also output a script path in <code>/nix/store</code> that will format your disk.
|
||||||
|
Keep this path handy as well.</p>
|
||||||
|
<h3 id="running-nixos-anywhere"><a class="header" href="#running-nixos-anywhere">Running NixOS-Anywhere</a></h3>
|
||||||
|
<p>With both paths in hand, you can execute <code>nixos-anywhere</code> as follows:</p>
|
||||||
|
<pre><code class="language-bash">nixos-anywhere --store-paths /nix/store/[your-toplevel-path] /nix/store/[your-disk-image-path]
|
||||||
|
</code></pre>
|
||||||
|
<p>Replace <code>[your-toplevel-path]</code> and <code>[your-disk-image-path]</code> with the
|
||||||
|
corresponding store paths you generated earlier.</p>
|
||||||
<div style="break-before: page; page-break-before: always;"></div><h1 id="support-matrix-nixos-anywhere"><a class="header" href="#support-matrix-nixos-anywhere">Support Matrix: nixos-anywhere</a></h1>
|
<div style="break-before: page; page-break-before: always;"></div><h1 id="support-matrix-nixos-anywhere"><a class="header" href="#support-matrix-nixos-anywhere">Support Matrix: nixos-anywhere</a></h1>
|
||||||
<p><strong><em>Install NixOS everywhere via ssh</em></strong></p>
|
<p><strong><em>Install NixOS everywhere via ssh</em></strong></p>
|
||||||
<img src="https://raw.githubusercontent.com/numtide/nixos-anywhere/main/docs/logo.png" width="150" height="150">
|
<img src="https://raw.githubusercontent.com/numtide/nixos-anywhere/main/docs/logo.png" width="150" height="150">
|
||||||
|
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