iso-image.nix 682 Bytes
Newer Older
Matthias Adamczyk's avatar
Matthias Adamczyk committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ nixpkgs, home-manager, ... }:

let
  nixos = import (nixpkgs + "/nixos") {
    configuration = { lib, pkgs, ... }: {
      imports = [
        (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
        (nixpkgs + "/nixos/modules/installer/cd-dvd/channel.nix")
        (home-manager + "/nixos")
        ../configuration/common
      ];
      boot.loader.grub.enable = false;
      boot.kernelParams = [
        "panic=30" "boot.panic_on_fail" # reboot the machine upon fatal boot issues
      ];
      systemd.services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ];
      networking.hostName = "iso";
    };
  };

in nixos.config.system.build.isoImage