Skip to content

Commit

Permalink
Fix new makeInitrdNG usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Jul 30, 2024
1 parent 3023783 commit 2e8f9a4
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ let
compressor = "xz";
contents = [
{
object = "${pkgs.busybox}/bin/busybox";
symlink = "/init";
source = "${pkgs.busybox}/bin/busybox";
target = "/init";
}
{
object = "${pkgs.busybox}/bin";
symlink = "/bin";
source = "${pkgs.busybox}/bin";
target = "/bin";
}
{
object = testStartupScript;
symlink = "/etc/init.d/rcS";
source = testStartupScript;
target = "/etc/init.d/rcS";
}
{
object = testInittab;
symlink = "/etc/inittab";
source = testInittab;
target = "/etc/inittab";
}
] ++ config.extraInitrdContents;
};
Expand Down Expand Up @@ -208,8 +208,8 @@ in
extraInitrdContents = mkOption {
type = types.listOf (
types.submodule {
options.object = mkOption { type = types.path; };
options.symlink = mkOption { type = types.str; };
options.source = mkOption { type = types.path; };
options.target = mkOption { type = types.str; };
}
);
default = [ ];
Expand All @@ -227,8 +227,8 @@ in
)
);
extraInitrdContents = lib.optional (config.linux.firmware != [ ]) {
symlink = "/lib/firmware";
object = pkgs.buildPackages.runCommand "linux-firmware" { } (
target = "/lib/firmware";
source = pkgs.buildPackages.runCommand "linux-firmware" { } (
lib.concatLines (
map (
{ dir, pattern }:
Expand Down Expand Up @@ -282,8 +282,8 @@ in
# TODO(jared): Hack making makeInitrdNG not working with contents
# being an empty list.
{
symlink = "/empty";
object = pkgs.emptyFile;
target = "/empty";
source = pkgs.emptyFile;
}
];
};
Expand Down

0 comments on commit 2e8f9a4

Please sign in to comment.