add bin/init to s6-rc module

... which suggests it could be better named; init is from
s6-linux-init not s6-rc
This commit is contained in:
Daniel Barlow 2022-09-26 21:11:07 +01:00
parent 4c89e9aee6
commit 85f7f7293d
2 changed files with 5 additions and 10 deletions

View file

@ -3,17 +3,9 @@
, busybox , busybox
, buildPackages , buildPackages
, callPackage , callPackage
, execline
, lib
, pseudofile , pseudofile
, runCommand , runCommand
, s6-init-bin
, s6-init-files , s6-init-files
, s6-linux-init
, s6-rc
, s6-rc-database
, stdenvNoCC
, writeScript
, writeText , writeText
} : config : } : config :
let let
@ -35,7 +27,6 @@ let
/sys d 0555 root root /sys d 0555 root root
/dev/pts d 0755 0 0 /dev/pts d 0755 0 0
/etc/init.d d 0755 0 0 /etc/init.d d 0755 0 0
/bin/init s 0755 0 0 ${s6-init-bin}/bin/init
/bin/sh s 0755 0 0 ${busybox}/bin/sh /bin/sh s 0755 0 0 ${busybox}/bin/sh
/bin/busybox s 0755 0 0 ${busybox}/bin/busybox /bin/busybox s 0755 0 0 ${busybox}/bin/busybox
''; '';
@ -44,7 +35,7 @@ let
(config.environment.contents); (config.environment.contents);
storefs = callPackage <nixpkgs/nixos/lib/make-squashfs.nix> { storefs = callPackage <nixpkgs/nixos/lib/make-squashfs.nix> {
# add pseudofiles to store so that the packages they # add pseudofiles as packages to store so that the packages they
# depend on are also added # depend on are also added
storeContents = [ storeContents = [
pseudofiles pseudofiles

View file

@ -4,6 +4,7 @@ let
services = builtins.attrValues config.services; services = builtins.attrValues config.services;
}; };
inherit (pkgs.pseudofile) dir symlink; inherit (pkgs.pseudofile) dir symlink;
inherit (pkgs) s6-init-bin;
in { in {
config = { config = {
environment = dir { environment = dir {
@ -12,6 +13,9 @@ in {
compiled = symlink "${s6-rc-db}/compiled"; compiled = symlink "${s6-rc-db}/compiled";
}; };
}; };
bin = dir {
init = symlink "${s6-init-bin}/bin/init";
};
}; };
}; };
} }