config/modules/home/apps/helpers/ags/default.nix

73 lines
1.2 KiB
Nix
Raw Normal View History

2024-05-23 20:26:30 +00:00
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.ags;
requiredDeps = with pkgs; [
config.wayland.windowManager.hyprland.package
bash
coreutils
gawk
sassc
imagemagick
procps
ripgrep
util-linux
gtksourceview
2024-12-16 16:39:20 -05:00
webkitgtk_4_1
2024-05-23 20:26:30 +00:00
brightnessctl
gvfs
accountsservice
swww
2024-12-16 16:39:20 -05:00
gnome-control-center
nautilus
totem
2024-05-23 20:26:30 +00:00
loupe
];
guiDeps = with pkgs; [
2024-12-16 16:39:20 -05:00
gnome-control-center
2024-05-23 20:26:30 +00:00
overskride
wlogout
];
dependencies = requiredDeps ++ guiDeps;
in {
options.apps.helpers.ags = with types; {
enable = mkBoolOpt false "Enable AGS";
};
config = mkIf cfg.enable {
programs.ags = {
enable = true;
configDir = ./cfg;
extraPackages = dependencies;
};
systemd.user.services.ags = {
Unit = {
Description = "Aylur's Gtk Shell";
PartOf = [
"tray.target"
2024-10-17 02:05:02 -04:00
"hyprland-session.target"
2024-05-23 20:26:30 +00:00
];
};
Service = {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
ExecStart = "${config.programs.ags.package}/bin/ags";
Restart = "on-failure";
};
2024-10-17 02:05:02 -04:00
Install.WantedBy = ["hyprland-session.target"];
2024-05-23 20:26:30 +00:00
};
};
}