Skip to content

Commit dfcdbbc

Browse files
shivaraj-bhsrid
andcommitted
refactor: Do not repeat dataDir
chore: Elaborate description for `dataDir` Co-authored-by: Sridhar Ratnakumar <[email protected]>
1 parent d6d9cf2 commit dfcdbbc

18 files changed

+6
-106
lines changed

nix/apache-kafka.nix

-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ with lib;
2828
type = types.port;
2929
};
3030

31-
dataDir = lib.mkOption {
32-
type = types.str;
33-
default = "./data/${name}";
34-
description = lib.mdDoc "The apache-kafka data directory";
35-
};
36-
3731
settings = mkOption {
3832
description = lib.mdDoc ''
3933
[Kafka broker configuration](https://kafka.apache.org/documentation.html#brokerconfigs)

nix/cassandra.nix

-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ in
1010

1111
package = lib.mkPackageOption pkgs "cassandra" { };
1212

13-
dataDir = lib.mkOption {
14-
type = types.str;
15-
default = "./data/${name}";
16-
description = "The cassandra data directory";
17-
};
18-
1913
listenAddress = lib.mkOption {
2014
type = types.str;
2115
description = "Listen address";

nix/clickhouse/default.nix

-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ in
2121
default = 9000;
2222
};
2323

24-
dataDir = lib.mkOption {
25-
type = types.str;
26-
default = "./data/${name}";
27-
description = "The clickhouse data directory";
28-
};
29-
3024
defaultExtraConfig = lib.mkOption {
3125
type = yamlFormat.type;
3226
internal = true;

nix/elasticsearch.nix

-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ in
2121

2222
package = lib.mkPackageOption pkgs "elasticsearch7" { };
2323

24-
dataDir = lib.mkOption {
25-
type = types.str;
26-
default = "./data/${name}";
27-
description = "Directory where elasticsearch stores its data.";
28-
};
29-
3024
listenAddress = lib.mkOption {
3125
description = "Elasticsearch listen address.";
3226
default = "127.0.0.1";

nix/grafana.nix

-6
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ in
3131
default = "http";
3232
};
3333

34-
dataDir = lib.mkOption {
35-
type = types.str;
36-
description = "Directory where grafana stores its logs and data.";
37-
default = "./data/${name}";
38-
};
39-
4034
extraConf = lib.mkOption {
4135
type = iniFormat.type;
4236
description = "Extra configuration for grafana.";

nix/lib.nix

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
];
1616
serviceModule = { config, name, ... }: {
1717
options = {
18+
dataDir = lib.mkOption {
19+
type = lib.types.str;
20+
default = "./data/${name}";
21+
description = "The directory where all data for `${service}.<name>` is stored";
22+
};
1823
namespace = lib.mkOption {
1924
description = ''
2025
Namespace for the ${service} service

nix/mysql/default.nix

-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ in
1515
defaultText = lib.literalExpression "pkgs.mariadb";
1616
};
1717

18-
dataDir = lib.mkOption {
19-
type = types.str;
20-
default = "./data/${name}";
21-
description = "The mysql data directory";
22-
};
23-
2418
socketDir = lib.mkOption {
2519
type = types.nullOr types.str;
2620
default = config.dataDir;

nix/nginx/default.nix

-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ in
4141
description = "The nginx package to use.";
4242
};
4343

44-
dataDir = lib.mkOption {
45-
type = types.str;
46-
default = "./data/${name}";
47-
description = "The nginx data directory";
48-
};
49-
5044
port = lib.mkOption {
5145
type = types.port;
5246
default = 8080;

nix/ollama.nix

+1-8
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ in
2525
example = "0.0.0.0";
2626
description = "The host on which the Ollama service's REST API will listen";
2727
};
28-
dataDir = lib.mkOption {
29-
type = types.str;
30-
default = "./data/${name}";
31-
description = ''
32-
The directory containing the Ollama models.
33-
Sets the `OLLAMA_MODELS` environment variable.
34-
'';
35-
};
28+
3629
keepAlive = lib.mkOption {
3730
type = types.str;
3831
default = "5m";

nix/open-webui.nix

-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ in
88
enable = lib.mkEnableOption "Open-WebUI server";
99
package = lib.mkPackageOption pkgs "open-webui" { };
1010

11-
dataDir = lib.mkOption {
12-
type = types.str;
13-
default = "./data/${name}";
14-
description = "The Open-WebUI data directory";
15-
};
16-
1711
host = lib.mkOption {
1812
type = types.str;
1913
default = "127.0.0.1";

nix/pgadmin.nix

-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ in
5858
default = 6;
5959
};
6060

61-
dataDir = lib.mkOption {
62-
type = types.str;
63-
default = "./data/${name}";
64-
description = "The pgadmin4 data directory";
65-
};
66-
6761
extraDefaultConfig = lib.mkOption {
6862
type = pyType;
6963
internal = true;

nix/postgres/default.nix

-6
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ in
4444
'';
4545
};
4646

47-
dataDir = lib.mkOption {
48-
type = lib.types.str;
49-
default = "./data/${name}";
50-
description = "The DB data directory";
51-
};
52-
5347
socketDir = lib.mkOption {
5448
type = lib.types.str;
5549
default = "";

nix/prometheus.nix

-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ in
2121
description = lib.mdDoc "Address to listen on for the web interface, API, and telemetry";
2222
};
2323

24-
dataDir = lib.mkOption {
25-
type = types.str;
26-
default = "./data/${name}";
27-
description = "The prometheus data directory";
28-
};
29-
3024
extraFlags = lib.mkOption {
3125
type = types.listOf types.str;
3226
default = [ ];

nix/redis-cluster.nix

-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ in
88

99
package = lib.mkPackageOption pkgs "redis" { };
1010

11-
dataDir = lib.mkOption {
12-
type = types.str;
13-
default = "./data/${name}";
14-
description = "The redis-cluster data directory (common for all nodes).";
15-
};
16-
1711
nodes = lib.mkOption {
1812
type = types.attrsOf (types.submodule {
1913
options = {

nix/redis.nix

-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ in
99

1010
package = lib.mkPackageOption pkgs "redis" { };
1111

12-
dataDir = lib.mkOption {
13-
type = types.str;
14-
default = "./data/${name}";
15-
description = "The redis data directory";
16-
};
17-
1812
bind = lib.mkOption {
1913
type = types.nullOr types.str;
2014
default = "127.0.0.1";

nix/tempo.nix

-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ in
2424
default = 3200;
2525
};
2626

27-
dataDir = lib.mkOption {
28-
type = types.str;
29-
default = "./data/${name}";
30-
description = "The tempo data directory";
31-
};
32-
3327
extraConfig = lib.mkOption {
3428
type = yamlFormat.type;
3529
default = { };

nix/weaviate.nix

-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ in
1212

1313
package = lib.mkPackageOption pkgs "weaviate" { };
1414

15-
dataDir = lib.mkOption {
16-
type = types.str;
17-
default = "./data/${name}";
18-
description = "Path to the Weaviate data store";
19-
};
20-
2115
host = lib.mkOption {
2216
type = types.str;
2317
default = "127.0.0.1";

nix/zookeeper.nix

-8
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ with lib;
1212
type = types.port;
1313
};
1414

15-
dataDir = mkOption {
16-
type = types.str;
17-
default = "./data/${name}";
18-
description = lib.mdDoc ''
19-
Data directory for Zookeeper
20-
'';
21-
};
22-
2315
id = mkOption {
2416
description = lib.mdDoc "Zookeeper ID.";
2517
default = 0;

0 commit comments

Comments
 (0)