1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
mobile-nixos/system-image.nix
Samuel Dionne-Riel 6d8b2bea22 WIP : stops relying on NIX_PATH entries.
I don't know if there could have been issues.

Better safe than sorry.
2018-06-23 18:09:05 -04:00

30 lines
961 B
Nix

#
# nix-build nixos -I nixos-config=system-image.nix -A config.system.build.sdImage
#
{ config, lib, pkgs, ... }:
let
path = (import ./overlay).path;
extlinux-conf-builder =
import (path + "/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix") {
inherit pkgs;
};
in
{
imports = [
# FIXME : use `pkgs.path` instead of this hack.
# while evaluating the module argument `pkgs' in "[...]/mobile-nixos/system-image.nix":
# infinite recursion encountered, at /nix/store/8vczq3489dl8xa5s7ksqyqkbirmpd3sb-source/lib/modules.nix:163:28
# (pkgs.path + "/nixos/modules/installer/cd-dvd/sd-image.nix")
(path + "/nixos/modules/installer/cd-dvd/sd-image.nix")
];
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
sdImage = {
populateBootCommands = ''
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
'';
};
}