Files
nix/hosts/common/user/configs/gui/ags/default.nix
Nikolaos Karaolidis 0c2dee2ecb Add discord
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-08-28 13:13:25 +03:00

64 lines
1.5 KiB
Nix

{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
lib,
pkgs,
inputs,
...
}:
let
agsConfig = pkgs.callPackage ./config { };
in
{
home-manager.users.${user} = {
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags.enable = true;
xdg.configFile."ags/config.js".source = "${agsConfig}/share/config.js";
theme.template."${home}/.config/ags/theme.sass".source = ./theme.sass;
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
libdbusmenu-gtk3
(pkgs.callPackage ../cliphist/rofi.nix { })
];
text = "exec ags";
}
);
};
Install.WantedBy = [ "graphical-session.target" ];
};
};
};
}