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-03-05 12:05:01 -05:00
parent e65676d25d
commit 2fa1165e89
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 perlPackages; [ FileSlurp NetDBus XMLParser XMLTwig ]));
} else throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failed)}");
# Replace runtime dependencies