default.nix 590 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Builds a NixOS kexec tarball with a preconfigured OpenSSH server.
# Users from ../common/users.nix can ssh to the booted Image with their SSH keys.
#
# To build the tarball, run:
# ```sh
# $ nix build -f ../../ kexec_tarball
# ```
#
# The result of that operation can be found in the `./result` folder.
# Copy the resulting `.tar.gz` to your destination, extract it to `/` (`tar -xJf kexec_nixos.tar.gz -C /`)
# and run `./kexec_nixos`
{ pkgs }:

let
  nixos = import (pkgs.path + "/nixos") {
    configuration = import ./kexec-host.nix;
  };
in
  nixos.config.system.build.kexec_tarball