diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-12-05 19:26:26 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-12-05 19:26:26 +0100 |
commit | 3bf7b0dc9d087d7c141f317456e7abdd60ceda2a (patch) | |
tree | 03b8fad52be5b2087c6ee46ad3b8c2499bc258a6 /machines/default.nix | |
parent | be8531c77824275aa84ab8d9cf71ef6d5be7ffc7 (diff) |
machines: Patch "nomodeset" out of iso-image.nix.
This is a very hacky approach, because patching that file also requires us to patch the imports it's referencing. The first reason why I needed to patch is that there is no "modeset" you can add to kernelParams and re-enable modesetting that way. And the second reason is because we don't have something like mkRemove or mkFilter in the module system, so we could filter out items from a list. Another option here would be to mkForce-override the kernelParams, which would imply that we'd need to duplicate a lot of these options (for example init=...). So in the long run we surely need to have a better way to override lists, but until that I'm leaving it with the patched approach. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'machines/default.nix')
-rw-r--r-- | machines/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/machines/default.nix b/machines/default.nix index d1373ee9..b8986f43 100644 --- a/machines/default.nix +++ b/machines/default.nix @@ -11,8 +11,13 @@ let }; iso = let isoModule = "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix"; + patchedModule = (import nixpkgs {}).runCommand "iso-image.nix" {} '' + sed -e 's|../../../lib/|${nixpkgs}/nixos/lib/|g' \ + -e 's/"nomodeset"//g' \ + "${isoModule}" > "$out" + ''; wrapIso = { config, pkgs, lib, ... }@attrs: let - eval = (import isoModule attrs); + eval = (import patchedModule attrs); evalcfg = eval.config or {}; bootcfg = evalcfg.boot or {}; fscfg = evalcfg.fileSystems or {}; |