This patch adds a "guix gc" button to the low disk space notification that 'gsd-housekeeping' emits. diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c index bd3437e..89027d8 100644 --- a/plugins/housekeeping/gsd-disk-space.c +++ b/plugins/housekeeping/gsd-disk-space.c @@ -546,6 +546,21 @@ empty_trash_callback (NotifyNotification *n, notify_notification_close (n, NULL); } +static void +guix_gc_callback (NotifyNotification *n, + const char *action) +{ + const gchar *argv[] = { "guix", "gc", NULL }; + + g_assert (action != NULL); + g_assert (strcmp (action, "run-guix-gc") == 0); + + g_spawn_async (NULL, (gchar **) argv, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, NULL); + + notify_notification_close (n, NULL); +} + static void on_notification_closed (NotifyNotification *n) { @@ -591,6 +606,13 @@ ldsm_notify (const char *summary, g_free); } + notify_notification_add_action (notification, + "run-guix-gc", + _("Collect Unused Guix Items"), + (NotifyActionCallback) guix_gc_callback, + NULL, + NULL); + has_trash = ldsm_mount_has_trash (mount_path); if (has_trash) { 7a02'>diff
path: root/etc/guix-daemon.cil.in
AgeCommit message (Expand)Author
2023-05-25etc: SELinux: Update policy file....Tested on Rocky Linux 9, as discussed at <https://issues.guix.gnu.org/62487>. * etc/guix-daemon.cil.in: Add rules for /gnu/store remount and file creation in /tmp. Ludovic Courtès
2022-12-23etc: SELinux: Allow init process to setattr on profile directories....* etc/guix-daemon.cil.in: Add rule. Ricardo Wurmus
2022-12-23etc: SELinux: Allow daemon to search run state directories....* etc/guix-daemon.cil.in: Import types init_var_run_t and system_dbusd_var_run_t; add rules. Ricardo Wurmus
2022-12-23etc: SELinux: Label guix-daemon executable in profile....* etc/guix-daemon.cil.in: Add file rule for "guix-daemon" in current-guix profile. Ricardo Wurmus
2022-01-26etc: Remove redundant SELinux permissions block....* etc/guix-daemon.cil.in (guix_daemon): Consolidate two blocks adding sock_file permissions on guix_daemon_conf_t. Marius Bakke
2022-01-24etc: Add more SELinux permissions for the daemon....* etc/guix-daemon.cil.in (guix_daemon): Permit write on guix_daemon_conf_t sock_file, necessary for garbage collection. Marius Bakke