mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 12:04:40 +00:00

Adds /dev/disk/by-{id,label}/* symlinks for bcache device nodes, in the final rootfs. Symlinks will only be created for bcache devices that contain filesystems. So if you have a blank bcache device or run LVM on top of bcache you will not get this kind of symlink.
14 lines
247 B
Nix
14 lines
247 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
environment.systemPackages = [ pkgs.bcache-tools ];
|
|
|
|
services.udev.packages = [ pkgs.bcache-tools ];
|
|
|
|
boot.initrd.extraUdevRulesCommands = ''
|
|
cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/
|
|
'';
|
|
|
|
}
|