big module system implementation
This commit is contained in:
57
home/modules/utils/ags/default.nix
Normal file
57
home/modules/utils/ags/default.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
requiredDeps = with pkgs; [
|
||||
bash
|
||||
bun
|
||||
coreutils
|
||||
dart-sass
|
||||
gawk
|
||||
imagemagick
|
||||
procps
|
||||
ripgrep
|
||||
util-linux
|
||||
];
|
||||
|
||||
guiDeps = with pkgs; [
|
||||
gnome.gnome-control-center
|
||||
mission-center
|
||||
overskride
|
||||
wlogout
|
||||
];
|
||||
|
||||
dependencies = requiredDeps ++ guiDeps;
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.ags;
|
||||
in {
|
||||
imports = [
|
||||
inputs.ags.homeManagerModules.default
|
||||
];
|
||||
options = {
|
||||
modules.utils.ags.enable = mkEnableOption "Enables ags";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.ags.enable = true;
|
||||
|
||||
systemd.user.services.ags = {
|
||||
Unit = {
|
||||
Description = "Aylur's Gtk Shell";
|
||||
PartOf = [
|
||||
"tray.target"
|
||||
"graphical-session.target"
|
||||
];
|
||||
};
|
||||
Service = {
|
||||
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
|
||||
ExecStart = "${cfg.package}/bin/ags";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user