···1818use File::Path qw(make_path);
1919use File::Basename;
2020use File::Slurp qw(read_file write_file edit_file);
2121-use Net::DBus;
2121+use JSON::PP;
2222+use IPC::Cmd;
2223use Sys::Syslog qw(:standard :macros);
2324use Cwd qw(abs_path);
2425···124125# virtual console 1 and we restart the "tty1" unit.
125126$SIG{PIPE} = "IGNORE";
126127128128+# Replacement for Net::DBus that calls busctl of the current systemd, parses
129129+# it's json output and returns the response using only core modules to reduce
130130+# dependencies on perlPackages in baseSystem
131131+sub busctl_call_systemd1_mgr {
132132+ my (@args) = @_;
133133+ my $cmd = [
134134+ "$cur_systemd/busctl", "--json=short", "call", "org.freedesktop.systemd1",
135135+ "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager",
136136+ @args
137137+ ];
138138+139139+ my ($ok, $err, undef, $stdout) = IPC::Cmd::run(command => $cmd);
140140+ die $err unless $ok;
141141+142142+ my $res = decode_json(join "", @$stdout);
143143+ return $res;
144144+}
145145+127146# Asks the currently running systemd instance via dbus which units are active.
128147# Returns a hash where the key is the name of each unit and the value a hash
129148# of load, state, substate.
130149sub get_active_units {
131131- my $mgr = Net::DBus->system->get_service("org.freedesktop.systemd1")->get_object("/org/freedesktop/systemd1");
132132- my $units = $mgr->ListUnitsByPatterns([], []);
150150+ my $units = busctl_call_systemd1_mgr("ListUnitsByPatterns", "asas", 0, 0)->{data}->[0];
133151 my $res = {};
134152 for my $item (@{$units}) {
135153 my ($id, $description, $load_state, $active_state, $sub_state,
···149167# Takes the name of the unit as an argument and returns a bool whether the unit is active or not.
150168sub unit_is_active {
151169 my ($unit_name) = @_;
152152-153153- my $mgr = Net::DBus->system->get_service("org.freedesktop.systemd1")->get_object("/org/freedesktop/systemd1");
154154- my $units = $mgr->ListUnitsByNames([$unit_name]);
170170+ my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, $unit_name)->{data}->[0];
155171 if (scalar(@{$units}) == 0) {
156172 return 0;
157173 }
+1-1
nixos/modules/system/activation/top-level.nix
···124124 configurationName = config.boot.loader.grub.configurationName;
125125126126 # Needed by switch-to-configuration.
127127- perl = pkgs.perl.withPackages (p: with p; [ ConfigIniFiles FileSlurp NetDBus ]);
127127+ perl = pkgs.perl.withPackages (p: with p; [ ConfigIniFiles FileSlurp ]);
128128 };
129129130130 # Handle assertions and warnings
+2
nixos/modules/tasks/filesystems/zfs.nix
···714714 RemainAfterExit = true;
715715 };
716716717717+ path = lib.optionals (cfgExpandOnBoot == "all") [ cfgZfs.package ];
718718+717719 script = ''
718720 for pool in ${poolListProvider}; do
719721 systemctl start --no-block "zpool-expand@$pool"
···1111 repo = "ASF-ui";
1212 # updated by the update script
1313 # this is always the commit that should be used with asf-ui from the latest asf version
1414- rev = "99278781c3716064dc25e3608a344900ebb05165";
1515- sha256 = "0nly16g39cv4lhnm40w5ci6bdwypk0gp8n70l914907hy0nvz4vg";
1414+ rev = "60a692f2e0d6b7c2bcd2cf363042d4647f246b4b";
1515+ sha256 = "1g49zwghdfgzd5canrrw1c2r4780xyvcaz72p14w036h93fw01z2";
1616 };
17171818in