Migrate graphical-session services to systemd

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-07 11:29:18 +03:00
parent 5308735a40
commit c3d89af891
11 changed files with 125 additions and 61 deletions

View File

@@ -15,3 +15,5 @@ App.config({
...forMonitors(bar),
]
});
Utils.execAsync('systemd-notify --ready')

View File

@@ -20,19 +20,41 @@ in
output_path = "${hmConfig.xdg.configHome}/ags/theme.sass";
};
wayland.windowManager.hyprland.initExtraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
name = "init-ags";
runtimeInputs = with pkgs; [
inputs.ags.packages.${stdenv.hostPlatform.system}.default
sassc
hyprland
nixos-icons
rofi-wayland
wl-clipboard
cliphist
libdbusmenu-gtk3
];
text = "ags &> /tmp/ags.log";
})} &";
systemd.user = {
targets.tray.Unit = {
BindsTo = [ "ags.service" ];
After = [ "graphical-session.target" "ags.service" ];
};
services.ags = {
Unit = {
Description = "Desktop widget shell";
BindsTo = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
Type = "notify";
NotifyAccess = "all";
ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
name = "init-ags";
runtimeInputs = with pkgs; [
inputs.ags.packages.${stdenv.hostPlatform.system}.default
sassc
hyprland
nixos-icons
rofi-wayland
wl-clipboard
cliphist
libdbusmenu-gtk3
];
text = "exec ags";
});
};
Install.WantedBy = [ "graphical-session.target" ];
};
};
};
}