43 lines
994 B
Nix
43 lines
994 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.services.boilr;
|
|
in {
|
|
options.services.boilr = {
|
|
enable = lib.mkEnableOption "boilr, the steam shortcut importer";
|
|
|
|
package = lib.mkOption {
|
|
description = "Boilr package to use";
|
|
default = pkgs.boilr;
|
|
type = lib.types.package;
|
|
};
|
|
|
|
settingsPath = lib.mkOption {
|
|
description = "Boilr settings";
|
|
default = {};
|
|
type = with lib.types; attrsOf anything;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.user.services.boilr = {
|
|
Unit = {
|
|
Description = "BoilR automatically adds (almost) all your games to your Steam library (including image art)";
|
|
Documentation = ["https://github.com/PhilipK/BoilR"];
|
|
After = "network.target";
|
|
Before = "steam.slice";
|
|
};
|
|
Service = {
|
|
Type = "oneshot";
|
|
ExecStart = "${cfg.package}/bin/boilr --no-ui";
|
|
};
|
|
Install = {
|
|
WantedBy = ["steam.slice"];
|
|
};
|
|
};
|
|
};
|
|
}
|