Loading nixos/modules/services/databases/surrealdb.nix +7 −22 Original line number Diff line number Diff line Loading @@ -47,17 +47,13 @@ in { example = 8000; }; userNamePath = mkOption { type = types.path; extraFlags = mkOption { type = types.listOf types.str; default = []; example = [ "--allow-all" "--auth" "--user root" "--pass root" ]; description = lib.mdDoc '' Path to read the username from. ''; }; passwordPath = mkOption { type = types.path; description = lib.mdDoc '' Path to read the password from. Specify a list of additional command line flags, which get escaped and are then passed to surrealdb. ''; }; }; Loading @@ -73,19 +69,8 @@ in { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; script = '' ${cfg.package}/bin/surreal start \ --user $(${pkgs.systemd}/bin/systemd-creds cat SURREALDB_USERNAME) \ --pass $(${pkgs.systemd}/bin/systemd-creds cat SURREALDB_PASSWORD) \ --bind ${cfg.host}:${toString cfg.port} \ -- ${cfg.dbPath} ''; serviceConfig = { LoadCredential = [ "SURREALDB_USERNAME:${cfg.userNamePath}" "SURREALDB_PASSWORD:${cfg.passwordPath}" ]; ExecStart = "${cfg.package}/bin/surreal start --bind ${cfg.host}:${toString cfg.port} ${escapeShellArgs cfg.extraFlags} -- ${cfg.dbPath}"; DynamicUser = true; Restart = "on-failure"; StateDirectory = "surrealdb"; Loading Loading
nixos/modules/services/databases/surrealdb.nix +7 −22 Original line number Diff line number Diff line Loading @@ -47,17 +47,13 @@ in { example = 8000; }; userNamePath = mkOption { type = types.path; extraFlags = mkOption { type = types.listOf types.str; default = []; example = [ "--allow-all" "--auth" "--user root" "--pass root" ]; description = lib.mdDoc '' Path to read the username from. ''; }; passwordPath = mkOption { type = types.path; description = lib.mdDoc '' Path to read the password from. Specify a list of additional command line flags, which get escaped and are then passed to surrealdb. ''; }; }; Loading @@ -73,19 +69,8 @@ in { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; script = '' ${cfg.package}/bin/surreal start \ --user $(${pkgs.systemd}/bin/systemd-creds cat SURREALDB_USERNAME) \ --pass $(${pkgs.systemd}/bin/systemd-creds cat SURREALDB_PASSWORD) \ --bind ${cfg.host}:${toString cfg.port} \ -- ${cfg.dbPath} ''; serviceConfig = { LoadCredential = [ "SURREALDB_USERNAME:${cfg.userNamePath}" "SURREALDB_PASSWORD:${cfg.passwordPath}" ]; ExecStart = "${cfg.package}/bin/surreal start --bind ${cfg.host}:${toString cfg.port} ${escapeShellArgs cfg.extraFlags} -- ${cfg.dbPath}"; DynamicUser = true; Restart = "on-failure"; StateDirectory = "surrealdb"; Loading