aboutsummaryrefslogtreecommitdiff
path: root/share/home
diff options
context:
space:
mode:
authorIsabella Bastaja <isabella@sorre.xyz>2026-06-28 16:50:20 +0200
committerIsabella Bastaja <isabella@sorre.xyz>2026-06-28 16:50:38 +0200
commitce0900dd0192fe2960b13cb31d1f5683cc10b4c6 (patch)
tree6d72320062ac97d0f844f0a6b4af6c91745ad981 /share/home
parentc146c29f6a7aa83aed6d42dff9bd739864e0d910 (diff)
niri: manage ancillary services with systemd
Diffstat (limited to 'share/home')
-rw-r--r--share/home/niri.nix58
1 files changed, 49 insertions, 9 deletions
diff --git a/share/home/niri.nix b/share/home/niri.nix
index e3e1061..694b82a 100644
--- a/share/home/niri.nix
+++ b/share/home/niri.nix
@@ -2,10 +2,10 @@
pkgs,
config,
inputs,
- system,
...
}:
let
+ inherit (pkgs) lib;
tomlFormat = pkgs.formats.toml { };
screenshot = pkgs.writeScript "ib-screenshot" ''
set -xeu pipefail
@@ -19,12 +19,22 @@ in
];
# programs.waybar.enable = true;
programs.tofi.enable = true;
+ services.mako.enable = true;
services.darkman.enable = true;
+ services.wpaperd.enable = true;
+ programs.waybar = {
+ enable = true;
+ systemd = {
+ enable = true;
+ targets = [ "niri.service" ];
+ };
+ };
home.packages = [
pkgs.niri-stable
pkgs.wpaperd # for wpaperctl
pkgs.gnome-keyring
+ pkgs.soteria
# Super strange issue with nautilus: the desktop file only works so long as
# I have desktop-file-utils installed *anywhere* on the system. As in, just
@@ -96,14 +106,6 @@ in
};
};
- spawn-at-startup = [
- { command = [ "${pkgs.xwayland-satellite}/bin/xwayland-satellite" ]; }
- { command = [ "${pkgs.mako}/bin/mako" ]; }
- { command = [ "${pkgs.wpaperd}/bin/wpaperd" ]; }
- { command = [ "${pkgs.soteria}/bin/soteria" ]; } # polkit agent
- { command = [ "${pkgs.waybar}/bin/waybar" ]; }
- ];
-
environment = {
QT_QPA_PLATFORM = "wayland";
DISPLAY = ":0"; # for X11 to recognize xwayland-satellite correctly
@@ -366,4 +368,42 @@ in
};
};
};
+
+ # from: https://github.com/Supreeeme/xwayland-satellite/blob/8575d0ef55d70f9b4c46b6bffb3accf912217e1e/resources/xwayland-satellite.service
+ systemd.user.services.xwayland-satellite = {
+ Unit = {
+ Description = "Xwayland outside your Wayland";
+ BindsTo = [ "niri.service" ];
+ PartOf = [ "niri.service" ];
+ After = [ "niri.service" ];
+ Requisite = [ "niri.service" ];
+ };
+
+ Service = {
+ Type = "notify";
+ NotifyAccess = "all";
+ ExecStart = lib.getExe pkgs.xwayland-satellite;
+ StandardOutput = "journal";
+ };
+
+ Install.WantedBy = lib.mkDefault [ "niri.service" ];
+ };
+
+ systemd.user.services.soteria = {
+ Unit = {
+ Description = "Soteria, Polkit authentication agent for any desktop environment";
+ Wants = [ "niri.service" ];
+ After = [ "niri.service" ];
+ };
+
+ Service = {
+ ExecStart = lib.getExe pkgs.soteria;
+ Type = "simple";
+ Restart = "on-failure";
+ RestartSec = 1;
+ TimeoutStopSec = 10;
+ };
+
+ Install.WantedBy = lib.mkDefault [ "niri.service" ];
+ };
}