From 096145b3bed06015621e0f6bf61591608772af2c Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 23 Apr 2023 04:15:03 -0400 Subject: fix: correct a few typos in nix module --- nix/module.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'nix') diff --git a/nix/module.nix b/nix/module.nix index e615561..ec48bcb 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -10,25 +10,24 @@ in { options.services.guzzle-api = { enable = mkEnableOption "enable guzzle-api"; url = mkOption { - type = types.string; + type = types.str; default = ""; description = "url string for guzzle-api"; }; port = mkOption { - type = types.int; - default = 8080; + type = types.str; + default = "8080"; description = "port for guzzle-api"; }; }; - config.systemd.services.guzzle-api = mkIf cfg.enable { + config.systemd.services = mkIf cfg.enable { guzzle-api = { enable = mkDefault true; - ports = mkDefault ["8080:80"]; wantedBy = ["multi-user.target"]; after = ["network.target"]; script = '' - URL=${cfg.url} ${pkgs.guzzle-api-server} --host 0.0.0.0 --port "${cfg.port}" + URL=${cfg.url} ${pkgs.guzzle-api-server}/bin/guzzle-api-server --host 0.0.0.0 --port "${cfg.port}" ''; serviceConfig = mkDefault { Restart = "always"; -- cgit v1.2.3