Merge pull request #244969 from Stzx/fix-warnings

udisks2: fix conf file loading warnings
This commit is contained in:
Nick Cao 2023-07-31 00:22:32 -06:00 committed by GitHub
commit 6ea628b5c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View file

@ -71,12 +71,16 @@ in
environment.systemPackages = [ pkgs.udisks2 ];
environment.etc = (mapAttrs' (name: value: nameValuePair "udisks2/${name}" { source = value; } ) configFiles) // {
# We need to make sure /etc/libblockdev/conf.d is populated to avoid
environment.etc = (mapAttrs' (name: value: nameValuePair "udisks2/${name}" { source = value; } ) configFiles) // (
let
libblockdev = pkgs.udisks2.libblockdev;
majorVer = versions.major libblockdev.version;
in {
# We need to make sure /etc/libblockdev/@major_ver@/conf.d is populated to avoid
# warnings
"libblockdev/conf.d/00-default.cfg".source = "${pkgs.libblockdev}/etc/libblockdev/conf.d/00-default.cfg";
"libblockdev/conf.d/10-lvm-dbus.cfg".source = "${pkgs.libblockdev}/etc/libblockdev/conf.d/10-lvm-dbus.cfg";
};
"libblockdev/${majorVer}/conf.d/00-default.cfg".source = "${libblockdev}/etc/libblockdev/${majorVer}/conf.d/00-default.cfg";
"libblockdev/${majorVer}/conf.d/10-lvm-dbus.cfg".source = "${libblockdev}/etc/libblockdev/${majorVer}/conf.d/10-lvm-dbus.cfg";
});
security.polkit.enable = true;

View file

@ -83,7 +83,10 @@ stdenv.mkDerivation rec {
doCheck = true;
passthru.tests.vm = nixosTests.udisks2;
passthru = {
inherit libblockdev;
tests.vm = nixosTests.udisks2;
};
meta = with lib; {
description = "A daemon, tools and libraries to access and manipulate disks, storage devices and technologies";