From da1e209f9e5679d19b408508d24b13249f8a59b1 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Tue, 15 Apr 2025 21:07:47 +0200 Subject: [PATCH] fix: :bug: Replace dataDir with module path --- nix/module.nix | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/nix/module.nix b/nix/module.nix index ba806ac4..dee7d70d 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -21,14 +21,6 @@ in { ''; }; - dataDir = mkOption { - type = lib.types.path; - default = "/var/lib/${name}"; - description = '' - Directory where the server will store its data. - ''; - }; - user = mkOption { type = lib.types.str; default = name; @@ -125,7 +117,7 @@ in { RuntimeDirectoryMode = "0700"; # Set the working directory to the data directory - WorkingDirectory = cfg.dataDir; + WorkingDirectory = "${pkgs.versia-server}/versia-server"; StandardOutput = "journal"; StandardError = "journal"; @@ -162,7 +154,7 @@ in { RuntimeDirectoryMode = "0700"; # Set the working directory to the data directory - WorkingDirectory = cfg.dataDir; + WorkingDirectory = "${pkgs.versia-server-worker}/versia-server-worker"; StandardOutput = "journal"; StandardError = "journal"; @@ -179,8 +171,6 @@ in { wantedBy = ["multi-user.target"]; }; - systemd.tmpfiles.rules = ["d ${cfg.dataDir} - - - - ${cfg.user} ${cfg.group}"]; - users = { groups = { "${cfg.group}" = {}; @@ -190,7 +180,6 @@ in { "${cfg.user}" = { isSystemUser = true; group = cfg.group; - home = cfg.dataDir; packages = [pkgs.versia-server pkgs.versia-server-worker]; }; };