feat: Add config for generating an installation media

It can be built using the command:
nix build .#nixosConfigurations.installationMedia.config.system.build.isoImage

It contains the latest kernel ZFS supports (ZFS is included in the ISO)
and a version of Nix with flakes enabled.
master
Chan Wen Xu 2021-12-18 18:21:54 +07:00
parent 0478ae970e
commit efdcaf5b64
2 changed files with 24 additions and 0 deletions

@ -0,0 +1,17 @@
{ nixpkgs, ... }:
{ config, pkgs, ... }:
let
pkgPath = nixpkgs.outPath;
in
{
imports = [
"${pkgPath}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
"${pkgPath}/nixos/modules/installer/cd-dvd/channel.nix"
];
boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
nix.package = pkgs.nixUnstable;
nix.extraOptions = "experimental-features = nix-command flakes";
}

@ -16,6 +16,13 @@
./config/aspire_hardware.nix
];
};
installationMedia = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(import ./config/installation_media.nix inputs)
];
};
};
customPkgs = import ./pkg;