xremap / nix-flake

MIT License
43 stars 11 forks source link

System service depends on sway specifics. They need to be made conditional #9

Closed VTimofeenko closed 2 years ago

VTimofeenko commented 2 years ago

Currently the system service behaves a bit awkwardly. It has

      # This is needed, otherwise xremap cannot read from sway socket
      BindReadOnlyPaths = [ userPath ];
      # Sway socket gets generated as $XDG_RUNTIME_DIR/sway-ipc.$UID.$SWAY_PID
      # Hacky way to allow sway socket
      # Systemd does not support wildcards :(
      InaccessiblePaths = map (x: "-${userPath}/${x}") [ "app" "bus" "dbus-1" ".dbus-proxy" "dconf" "env-vars" ".flatpak" ".flatpak-helper" "gnupg" "pipewire-0" "pipewire-0.lock" "pulse" "systemd" "tmux-${toString cfg.userId}" "wayland-1" "wayland-1.lock" ];

Which is needed for Sway, but irrelevant when building without features.

Need to make these options depend on withSway option