diff --git a/nixos/modules/services/networking/spacecookie.nix b/nixos/modules/services/networking/spacecookie.nix index 29c1c0f0012..4ddb137876d 100644 --- a/nixos/modules/services/networking/spacecookie.nix +++ b/nixos/modules/services/networking/spacecookie.nix @@ -15,6 +15,18 @@ in { enable = mkEnableOption "spacecookie"; + package = mkOption { + type = types.package; + default = pkgs.haskellPackages.spacecookie; + example = literalExample '' + pkgs.haskell.lib.justStaticExecutables pkgs.haskellPackages.spacecookie + ''; + description = '' + The spacecookie derivation to use. This can be used to + override the used package or to use another version. + ''; + }; + hostname = mkOption { type = types.str; default = "localhost"; @@ -62,7 +74,7 @@ in { serviceConfig = { Type = "notify"; - ExecStart = "${pkgs.haskellPackages.spacecookie}/bin/spacecookie ${configFile}"; + ExecStart = "${lib.getBin cfg.package}/bin/spacecookie ${configFile}"; FileDescriptorStoreMax = 1; DynamicUser = true;