Skip to content

Commit

Permalink
ags: added option to enable systemd integration
Browse files Browse the repository at this point in the history
  • Loading branch information
no-mood committed Aug 17, 2024
1 parent 99fc2f9 commit 9c4ae76
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions nix/hm-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ in {
'';
example = literalExpression "[ pkgs.libsoup_3 ]";
};

systemd.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Enable systemd integration.
'';
};

};

config = mkIf cfg.enable (mkMerge [
Expand All @@ -60,14 +70,16 @@ in {
(mkIf (cfg.package != null) (let
path = "/share/com.github.Aylur.ags/types";
pkg = cfg.package.override {
extraPackages = cfg.extraPackages;
extraPackages = cfg.extraPackages;
buildTypes = true;
};
in {
programs.ags.finalPackage = pkg;
home.packages = [pkg];
home.file.".local/${path}".source = "${pkg}/${path}";
}))
})
)
(mkIf cfg.systemd.enable (
{
systemd.user.services.ags = {
Unit = {
Expand All @@ -87,6 +99,5 @@ in {
WantedBy = ["graphical-session.target"];
};
};
}
}))
]);
}

0 comments on commit 9c4ae76

Please sign in to comment.