treewide: use externalPath (#460102)

This commit is contained in:
Felix Bühler
2025-11-10 20:49:26 +00:00
committed by GitHub
11 changed files with 16 additions and 85 deletions
+2 -8
View File
@@ -83,10 +83,7 @@ let
secretPathOption =
with lib.types;
lib.mkOption {
type = nullOr (pathWith {
inStore = false;
absolute = true;
});
type = nullOr externalPath;
default = null;
internal = true;
};
@@ -142,10 +139,7 @@ in
};
options.sftp-private-key-file = lib.mkOption {
type = nullOr (pathWith {
inStore = false;
absolute = true;
});
type = nullOr externalPath;
default = null;
description = ''
SFTP private key file.
@@ -31,12 +31,7 @@ in
enable = lib.mkEnableOption "postgres-websockets";
pgpassFile = lib.mkOption {
type =
with lib.types;
nullOr (pathWith {
inStore = false;
absolute = true;
});
type = with lib.types; nullOr externalPath;
default = null;
example = "/run/keys/db_password";
description = ''
@@ -54,12 +49,7 @@ in
};
jwtSecretFile = lib.mkOption {
type =
with lib.types;
nullOr (pathWith {
inStore = false;
absolute = true;
});
type = with lib.types; nullOr externalPath;
example = "/run/keys/jwt_secret";
description = ''
Secret used to sign JWT tokens used to open communications channels.
+2 -12
View File
@@ -54,12 +54,7 @@ in
enable = lib.mkEnableOption "PostgREST";
pgpassFile = lib.mkOption {
type =
with lib.types;
nullOr (pathWith {
inStore = false;
absolute = true;
});
type = with lib.types; nullOr externalPath;
default = null;
example = "/run/keys/db_password";
description = ''
@@ -77,12 +72,7 @@ in
};
jwtSecretFile = lib.mkOption {
type =
with lib.types;
nullOr (pathWith {
inStore = false;
absolute = true;
});
type = with lib.types; nullOr externalPath;
default = null;
example = "/run/keys/jwt_secret";
description = ''
@@ -76,17 +76,11 @@ in
description = "Makes the bot mention @room when posting an alert";
};
tokenFile = lib.mkOption {
type = lib.types.pathWith {
inStore = false;
absolute = true;
};
type = lib.types.externalPath;
description = "File that contains a valid Matrix token for the Matrix user.";
};
secretFile = lib.mkOption {
type = lib.types.pathWith {
inStore = false;
absolute = true;
};
type = lib.types.externalPath;
description = "File that contains a secret for the Alertmanager webhook.";
};
};
@@ -15,10 +15,7 @@ in
extraOpts = {
package = mkPackageOption pkgs "prometheus-storagebox-exporter" { };
tokenFile = lib.mkOption {
type = lib.types.pathWith {
inStore = false;
absolute = true;
};
type = lib.types.externalPath;
description = "File that contains the Hetzner API token to use.";
};
@@ -15,11 +15,7 @@ in
package = lib.mkPackageOption pkgs "cloudflare-dyndns" { };
apiTokenFile = lib.mkOption {
type = lib.types.pathWith {
absolute = true;
inStore = false;
};
type = lib.types.externalPath;
description = ''
The path to a file containing the CloudFlare API token.
'';
@@ -559,12 +559,7 @@ in
'';
};
encryptionPasswordFile = mkOption {
type = types.nullOr (
types.pathWith {
inStore = false;
absolute = true;
}
);
type = types.nullOr types.externalPath;
default = null;
description = ''
Path to encryption password. If set, the file will be read during
+1 -6
View File
@@ -55,12 +55,7 @@ in
'';
};
intermediatePasswordFile = lib.mkOption {
type = lib.types.nullOr (
lib.types.pathWith {
inStore = false;
absolute = true;
}
);
type = lib.types.nullOr lib.types.externalPath;
default = null;
example = "/run/keys/smallstep-password";
description = ''
@@ -71,14 +71,7 @@ in
The contents of the specified paths will be read at service start time and merged with the attributes provided in `settings`.
'';
default = { };
type =
with lib.types;
nullOr (
attrsOf (pathWith {
inStore = false;
absolute = true;
})
);
type = with lib.types; nullOr (attrsOf externalPath);
};
settings = lib.mkOption {
+1 -4
View File
@@ -78,10 +78,7 @@ in
};
secretFile = lib.mkOption {
type = lib.types.pathWith {
inStore = false;
absolute = true;
};
type = lib.types.externalPath;
example = "/run/keys/oncall-dbpassword";
description = ''
A YAML file containing secrets such as database or user passwords.
+2 -12
View File
@@ -33,12 +33,7 @@ in
enable = lib.mkEnableOption "Photoprism web server";
passwordFile = lib.mkOption {
type = lib.types.nullOr (
lib.types.pathWith {
inStore = false;
absolute = true;
}
);
type = lib.types.nullOr lib.types.externalPath;
default = null;
description = ''
Admin password file.
@@ -46,12 +41,7 @@ in
};
databasePasswordFile = lib.mkOption {
type = lib.types.nullOr (
lib.types.pathWith {
inStore = false;
absolute = true;
}
);
type = lib.types.nullOr lib.types.externalPath;
default = null;
description = ''
Database password file.