notifyActive activation script -> apply only to GUI systems
else i get warnings on every servo activation
This commit is contained in:
parent
4d6d79cc81
commit
d5811f142d
|
@ -43,19 +43,6 @@
|
|||
fi
|
||||
'';
|
||||
};
|
||||
system.activationScripts.notifyActive = {
|
||||
text = ''
|
||||
# notify all logged-in users that the system has been activated/upgraded.
|
||||
if [ -d /run/user ]; then
|
||||
for uid in $(ls /run/user); do
|
||||
PATH="$PATH:${pkgs.sudo}/bin" \
|
||||
sudo -u "#$uid" env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
|
||||
PATH="$PATH:${pkgs.libnotify}/bin" \
|
||||
notify-send 'nixos activated' "version: $(cat "$systemConfig/nixos-version")"
|
||||
done
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# link debug symbols into /run/current-system/sw/lib/debug
|
||||
# hopefully picked up by gdb automatically?
|
||||
|
|
|
@ -190,4 +190,18 @@ in
|
|||
# upstream nixpkgs forbids setting driSupport32Bit unless specifically x86_64 (so aarch64 isn't allowed)
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
}));
|
||||
|
||||
system.activationScripts.notifyActive = lib.mkIf config.sane.programs.guiApps.enabled {
|
||||
text = ''
|
||||
# notify all logged-in users that the system has been activated/upgraded.
|
||||
if [ -d /run/user ]; then
|
||||
for uid in $(ls /run/user); do
|
||||
PATH="$PATH:${pkgs.sudo}/bin" \
|
||||
sudo -u "#$uid" env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
|
||||
PATH="$PATH:${pkgs.libnotify}/bin" \
|
||||
notify-send 'nixos activated' "version: $(cat "$systemConfig/nixos-version")"
|
||||
done
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue