Monorepo for Tangled tangled.org

nix,spindle: use DATA_DIR for db & other spindle data #983

open opened by boltless.me targeting master from sl/spindle-rewrite

This single persistent directory can be used for storing general spindle data like db, motd file and upcoming sparse-clone git repos.

db path will be ${DATA_DIR}/spindle.db

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mckguakf7d22
+8 -8
Interdiff #3 #4
+8 -8
nix/modules/spindle.nix
··· 25 description = "Address to listen on"; 26 }; 27 28 - dbPath = mkOption { 29 type = types.path; 30 - default = "/var/lib/spindle/spindle.db"; 31 - description = "Path to the database file"; 32 }; 33 34 hostname = mkOption { 35 description = "Address to listen on"; 36 }; 37 38 - stateDir = mkOption { 39 type = types.path; 40 - default = "/var/lib/spindle"; 41 - description = "Tangled spindle data directory"; 42 }; 43 44 hostname = mkOption { ··· 137 StateDirectory = "spindle"; 138 Environment = [ 139 "SPINDLE_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}" 140 - "SPINDLE_SERVER_DB_PATH=${cfg.server.dbPath}" 141 "SPINDLE_SERVER_HOSTNAME=${cfg.server.hostname}" 142 "SPINDLE_SERVER_PLC_URL=${cfg.server.plcUrl}" 143 "SPINDLE_SERVER_RELAY_URL=${cfg.server.relayUrl}" ··· 150 StateDirectory = "spindle"; 151 Environment = [ 152 "SPINDLE_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}" 153 - "SPINDLE_SERVER_DATA_DIR=${cfg.server.stateDir}" 154 "SPINDLE_SERVER_HOSTNAME=${cfg.server.hostname}" 155 "SPINDLE_SERVER_PLC_URL=${cfg.server.plcUrl}" 156 "SPINDLE_SERVER_DEV=${lib.boolToString cfg.server.dev}"
··· 25 description = "Address to listen on"; 26 }; 27 28 + stateDir = mkOption { 29 type = types.path; 30 + default = "/var/lib/spindle"; 31 + description = "Tangled spindle data directory"; 32 }; 33 34 hostname = mkOption { 35 description = "Address to listen on"; 36 }; 37 38 + dbPath = mkOption { 39 type = types.path; 40 + default = "/var/lib/spindle/spindle.db"; 41 + description = "Path to the database file"; 42 }; 43 44 hostname = mkOption { ··· 137 StateDirectory = "spindle"; 138 Environment = [ 139 "SPINDLE_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}" 140 + "SPINDLE_SERVER_DATA_DIR=${cfg.server.stateDir}" 141 "SPINDLE_SERVER_HOSTNAME=${cfg.server.hostname}" 142 "SPINDLE_SERVER_PLC_URL=${cfg.server.plcUrl}" 143 "SPINDLE_SERVER_RELAY_URL=${cfg.server.relayUrl}" ··· 150 StateDirectory = "spindle"; 151 Environment = [ 152 "SPINDLE_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}" 153 + "SPINDLE_SERVER_DB_PATH=${cfg.server.dbPath}" 154 "SPINDLE_SERVER_HOSTNAME=${cfg.server.hostname}" 155 "SPINDLE_SERVER_PLC_URL=${cfg.server.plcUrl}" 156 "SPINDLE_SERVER_DEV=${lib.boolToString cfg.server.dev}"
nix/vm.nix

This file has not been changed.

spindle/config/config.go

This patch was likely rebased, as context lines do not match.

History

5 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
nix,spindle: use DATA_DIR for db & other spindle data
merge conflicts detected
expand
  • appview/state/state.go:35
expand 0 comments
1 commit
expand
nix,spindle: use DATA_DIR for db & other spindle data
expand 0 comments
1 commit
expand
nix,spindle: use DATA_DIR for db & other spindle data
expand 0 comments
1 commit
expand
nix,spindle: use DATA_DIR for db & other spindle data
expand 0 comments
1 commit
expand
nix,spindle: use DATA_DIR for db & other spindle data
expand 0 comments