switch-to-configuration: use Net::DBus to retrieve the list of units

This resolves the FIXME, and opens up the possibility of using more of
the systemd DBus interface to make things more robust.
This commit is contained in:
edef
2018-05-03 20:19:23 +02:00
parent 542ef2b182
commit 54a13b07d5
2 changed files with 11 additions and 11 deletions
@@ -127,7 +127,8 @@ let
configurationName = config.boot.loader.grub.configurationName;
# Needed by switch-to-configuration.
perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl";
perl = "${pkgs.perl}/bin/perl " + (concatMapStringsSep " " (lib: "-I${lib}/${pkgs.perl.libPrefix}") (with pkgs.perlPackages; [ FileSlurp NetDBus XMLParser XMLTwig ]));
} else throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failed)}");
# Replace runtime dependencies