nixpkgs/nixos/modules/system/boot
Bjørn Forsman 581226cfb4 nixos/bcache: /bin/sh -> ${bash}/bin/sh
Or else `services.udev.packages = [ bcache-tools ]` cannot be used.

To not break bcache in the initrd I'm modifying this in stage-1.nix:

  -  --replace /bin/sh ${extraUtils}/bin/sh
  +  --replace ${bash}/bin/sh ${extraUtils}/bin/sh

Reasoning behind that change:

* If not modifying the /bin/sh pattern in any way, it will also match
  ${bash}/bin/sh, creating a broken path like
  /nix/store/HASH-bash/nix/store/HASH-bash/bin/sh in the udev rule file.

* The addition of /bin/sh was done in 775f381a9e
  ("stage-1: add bcache support"). It seems somewhat plausible that
  no new users have appeared since then and we can take this opportunity
  to back out of this change without much fear of regressions.

  If there _are_ regressions, they should be in the form of build time
  errors, not runtime (boot), due to how the udev rule output is checked
  for invalid path references. So low risk, IMHO.

* An alternative approach could be to copy the /bin/sh substitute rule
  over to the non-initrd udev rules implementation in NixOS, but I think
  this way is better:
  - The rules file comes with a working path out of the box.
  - We can use more precise pattern matching when modifying the udev
    rules for the initrd.
2017-06-10 17:10:49 +02:00
..
loader nixos: Add support for scalable fonts in Grub menus (#26227) 2017-06-10 09:53:24 -04:00
coredump.nix systemd-coredump: Add systemd service and fix sysctl pattern. 2016-07-10 18:07:37 +10:00
emergency-mode.nix nixos: tmp on tmpfs option 2014-07-30 16:19:26 +02:00
initrd-network.nix initrd-network: call postCommands only if network is up 2016-02-03 16:35:21 +03:00
initrd-ssh.nix initrd-ssh: Use initrd secrets for host keys 2017-04-02 16:33:37 -04:00
kernel.nix fix comments about nixos-hardware-scan 2017-02-18 13:29:47 +01:00
kexec.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
luksroot.nix nixos/luks: Silence killall complain about non-existing cryptsetup processes 2017-05-16 09:50:10 +02:00
modprobe.nix nixos treewide: don't set MODULE_DIR 2016-08-19 17:56:54 +03:00
networkd.nix networking.networkd: adjust autmatic mapping of bonds 2017-02-16 21:24:40 +01:00
pbkdf2-sha512.c Update to the Yubikey PBA 2014-02-08 14:59:52 +01:00
plymouth.nix nixos/modules: use defaultText where applicable 2016-11-21 16:35:15 +01:00
resolved.nix systemd: 231 -> 232 2017-01-26 17:52:52 +01:00
shutdown.nix Don't run hwclock if /dev/rtc doesn't exist 2014-05-05 16:47:51 +02:00
stage-1-init.sh nixos/stage1: add copytoram support 2017-04-28 20:48:09 +02:00
stage-1.nix nixos/bcache: /bin/sh -> ${bash}/bin/sh 2017-06-10 17:10:49 +02:00
stage-2-init.sh stage-2: shellsheck recommendations 2017-04-05 21:40:57 +02:00
stage-2.nix stage-2: replace readonly-mountpoint by findmnt 2017-04-05 09:05:18 +02:00
systemd-lib.nix nixos: escape brackets in systemd units 2017-04-12 15:56:26 +02:00
systemd-nspawn.nix systemd-nspawn: relax PrivateUsers check 2017-05-27 08:27:47 +01:00
systemd-unit-options.nix nixos/treewide: systemd.time is in manvolume 7 2017-03-21 08:28:53 +01:00
systemd.nix services.logind: add options for lid-switch behavior 2017-05-23 18:57:57 +02:00
timesyncd.nix ntp: make timesyncd the new default 2016-12-17 00:00:45 +01:00
tmp.nix nixos: tmp on tmpfs option 2014-07-30 16:19:26 +02:00