enable udisks2 and run udiskie as a user unit

udiskie was installed but never actually launched - nothing in the dotfiles autostarts it, and services.udisks2 was off, so even once started it had no daemon to talk to. binds it to graphical-session.target (managed by uwsm) so it starts and stops with the session. only touches removable media: udisks2 reports the internal sata disks as HintSystem=true, so the drives declared in disks.nix are left alone.
This commit is contained in:
2026-08-05 22:05:49 +01:00
parent 2db9b77272
commit ad459e2b4b
+26
View File
@@ -27,6 +27,32 @@
services.xserver.enable = true;
security.polkit.enable = true;
# Removable-media automounting.
#
# udiskie is only a tray frontend to the udisks2 D-Bus daemon, so the daemon
# has to be enabled or udiskie runs but can never mount anything. Note this
# covers removable media *only*: udisks2 reports the internal SATA disks as
# HintSystem=true, so udiskie leaves them alone. Permanently attached drives
# are declared in the host's disks.nix instead.
services.udisks2.enable = true;
# Run udiskie as a user unit rather than from the hypr autostart — it was
# previously only installed, never actually launched. Binding it to
# graphical-session.target (which UWSM manages properly) means it starts and
# stops with the session instead of leaking across logins.
systemd.user.services.udiskie = {
description = "udiskie removable media automounter";
partOf = ["graphical-session.target"];
after = ["graphical-session.target"];
wantedBy = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
# -s = smart tray: the icon appears only while removable media is present.
ExecStart = "${pkgs.udiskie}/bin/udiskie -s";
Restart = "on-failure";
};
};
environment.systemPackages = with pkgs; [
# hypr* ecosystem (keybinds / hypridle / autostart)
hyprlock