diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-08-18 12:42:39 +0200 |
---|---|---|
committer | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-08-19 07:28:14 +0200 |
commit | 849c75577d1379ab328703a8fdab70cf9f38fef8 (patch) | |
tree | d38510eca70efc11da3418f3720cd3c376977908 /nixos/modules/services/games | |
parent | 758b6fa94ba056a54b9cf0fd574232d987b93439 (diff) |
nixos/openarena: cleanup
- Remove `with lib;`
- Add `package` config option
- Adjust paths accordingly in `ExecStart`
Diffstat (limited to 'nixos/modules/services/games')
-rw-r--r-- | nixos/modules/services/games/openarena.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/games/openarena.nix b/nixos/modules/services/games/openarena.nix index 89e30d7c12af..8f6d4986903f 100644 --- a/nixos/modules/services/games/openarena.nix +++ b/nixos/modules/services/games/openarena.nix @@ -1,14 +1,14 @@ { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) concatStringsSep mkEnableOption mkIf mkOption types; cfg = config.services.openarena; in { options = { services.openarena = { enable = mkEnableOption (lib.mdDoc "OpenArena"); + package = lib.mkPackageOptionMD pkgs "openarena" { }; openPorts = mkOption { type = types.bool; @@ -43,7 +43,7 @@ in serviceConfig = { DynamicUser = true; StateDirectory = "openarena"; - ExecStart = "${pkgs.openarena}/bin/oa_ded +set fs_basepath ${pkgs.openarena}/openarena-0.8.8 +set fs_homepath /var/lib/openarena ${concatStringsSep " " cfg.extraFlags}"; + ExecStart = "${cfg.package}/bin/oa_ded +set fs_basepath ${cfg.package}/share/openarena +set fs_homepath /var/lib/openarena ${concatStringsSep " " cfg.extraFlags}"; Restart = "on-failure"; # Hardening |