nixpkgs/nixos/modules
aszlig f4e742594d
nixos: Fix detection of btrfs root volume
Regression introduced by 801c920e95.

Since then, the btrfsSimple subtest of the installer VM test fails with:

Btrfs did not return a path for the subvolume at /

The reason for this is that the output for "btrfs subvol show" has
changed between version 4.8.2 and 4.13.1.

For example the output of "btrfs subvol show /" in version 4.8.2 was:

/ is toplevel subvolume

In version 4.13.1, the output now is the following and thus the regular
expressions used in nixos-generate-config.pl and install-grub.pl now
match (which results in the error mentioned above):

/
        Name:                   <FS_TREE>
        UUID:                   -
        Parent UUID:            -
        Received UUID:          -
        Creation time:          -
        Subvolume ID:           5
        Generation:             287270
        Gen at creation:        0
        Parent ID:              0
        Top level ID:           0
        Flags:                  -
        Snapshot(s):

In order to fix this I've changed nixos-generate-config.pl and
install-grub.pl, because both use "btrfs subvol show" in a similar vein,
so the regex for parsing the output now doesn't match anymore whenever
the volume path is "/", which should result in the same behaviour as we
had with btrfs-progs version 4.8.2.

Tested against the btrfsSimple, btrfsSubvols and btrfsSubvolDefault
subtests of the installer VM test and they all succeed now.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-10-11 04:30:52 +02:00
..
config Set $NIX_DEBUG_INFO_DIRS when environment.enableDebugInfo is enabled 2017-10-10 12:04:57 +02:00
hardware nvidia-x11: fix eval error from 4ef82339c9 2017-09-28 13:11:16 -07:00
i18n/input-method
installer nixos: Fix detection of btrfs root volume 2017-10-11 04:30:52 +02:00
misc Reserve uid/gids for kanboard 2017-10-09 07:44:32 -04:00
profiles nixos/install: disable kernel debug console logging 2017-09-23 20:03:19 +02:00
programs Enable command-not-found 2017-10-10 12:26:24 +02:00
security security.pam.usb: link to wiki on github.com 2017-09-28 16:00:28 +02:00
service-managers Simple proof of concept for how to do other types of services 2017-05-26 18:14:31 -04:00
services unbound: fix typo in systemd Before 2017-10-10 20:08:36 +00:00
system nixos: Fix detection of btrfs root volume 2017-10-11 04:30:52 +02:00
tasks Merge pull request #30204 from lheckemann/powertop-fix 2017-10-07 22:06:46 +01:00
testing buildLinux: allow overriding stdenv on each call 2017-08-20 08:24:52 +02:00
virtualisation Add NixOS 17.09 AMIs 2017-10-03 16:56:59 +02:00
module-list.nix prometheus-minio-exporter service: init version 2017-10-08 12:47:00 +02:00
rename.nix zfsUnstable: init at 2017-09-12 2017-09-15 17:59:37 +02:00