Files
TheaninovOS/modules/home-manager/shell/asztal.nix
2024-04-17 10:03:57 +02:00

40 lines
784 B
Nix

{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.shell.asztal;
in
{
options.shell.asztal = {
enable = mkEnableOption (mdDoc "Enable a shell based on AGS");
};
config = mkIf cfg.enable {
systemd.user.services.asztal = {
Unit = {
Description = "asztal";
PartOf = [
"graphical-session.target"
"tray.target"
];
};
Service = {
ExecStart = "${pkgs.asztal}/bin/asztal";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
Restart = "always";
KillMode = "mixed";
Environment = "PATH=/run/current-system/sw/bin/:${with pkgs; lib.makeBinPath [ ]}";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}