nixos/monero: add dataDir option

This commit is contained in:
Johannes Arnold 2021-05-04 21:12:54 +00:00
parent 1b1d7e93dc
commit 7cf3ffbddd

View File

@ -4,7 +4,6 @@ with lib;
let
cfg = config.services.monero;
dataDir = "/var/lib/monero";
listToConf = option: list:
concatMapStrings (value: "${option}=${value}\n") list;
@ -53,6 +52,14 @@ in
enable = mkEnableOption "Monero node daemon";
dataDir = mkOption {
type = types.str;
default = "/var/lib/monero";
description = ''
The directory where Monero stores its data files.
'';
};
mining.enable = mkOption {
type = types.bool;
default = false;
@ -200,7 +207,7 @@ in
users.users.monero = {
uid = config.ids.uids.monero;
description = "Monero daemon user";
home = dataDir;
home = cfg.dataDir;
createHome = true;
};