mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Replace builtins.toString with toString
This commit is contained in:
parent
c18caea0de
commit
c3cfcf1b61
15 changed files with 24 additions and 24 deletions
|
|
@ -41,7 +41,7 @@ in
|
|||
inherit domain;
|
||||
})
|
||||
)
|
||||
|> lib.groupBy (entry: builtins.toString entry.domain)
|
||||
|> lib.groupBy (entry: toString entry.domain)
|
||||
|> lib.mapAttrs (_: values: values |> lib.map (value: value.file))
|
||||
|> lib.filterAttrs (_: files: lib.length files > 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ in
|
|||
inherit port;
|
||||
})
|
||||
)
|
||||
|> lib.groupBy (entry: builtins.toString entry.port)
|
||||
|> lib.groupBy (entry: toString entry.port)
|
||||
|> lib.mapAttrs (_: values: values |> lib.map (value: value.file))
|
||||
|> lib.filterAttrs (_: files: lib.length files > 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ in
|
|||
services.alloy = {
|
||||
enable = true;
|
||||
extraFlags = [
|
||||
"--server.http.listen-addr=localhost:${builtins.toString cfg.port}"
|
||||
"--server.http.listen-addr=localhost:${toString cfg.port}"
|
||||
"--disable-reporting"
|
||||
];
|
||||
};
|
||||
|
|
@ -121,7 +121,7 @@ in
|
|||
text = ''
|
||||
prometheus.scrape "victorialogs" {
|
||||
targets = [{
|
||||
__address__ = "localhost:${builtins.toString config.custom.services.victorialogs.port}",
|
||||
__address__ = "localhost:${toString config.custom.services.victorialogs.port}",
|
||||
job = "victorialogs",
|
||||
instance = constants.hostname,
|
||||
}]
|
||||
|
|
@ -135,7 +135,7 @@ in
|
|||
text = ''
|
||||
prometheus.scrape "caddy" {
|
||||
targets = [{
|
||||
__address__ = "localhost:${builtins.toString config.custom.services.caddy.metricsPort}",
|
||||
__address__ = "localhost:${toString config.custom.services.caddy.metricsPort}",
|
||||
job = "caddy",
|
||||
instance = constants.hostname,
|
||||
}]
|
||||
|
|
@ -149,7 +149,7 @@ in
|
|||
text = ''
|
||||
prometheus.scrape "crowdsec" {
|
||||
targets = [{
|
||||
__address__ = "localhost:${builtins.toString config.custom.services.crowdsec.prometheusPort}",
|
||||
__address__ = "localhost:${toString config.custom.services.crowdsec.prometheusPort}",
|
||||
job = "crowdsec",
|
||||
instance = constants.hostname,
|
||||
}]
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ let
|
|||
import subdomain-log ${domain}
|
||||
@${subdomainOf domain} host ${domain}
|
||||
handle @${subdomainOf domain} {
|
||||
reverse_proxy localhost:${builtins.toString port}
|
||||
reverse_proxy localhost:${toString port}
|
||||
}
|
||||
'';
|
||||
in
|
||||
|
|
@ -48,7 +48,7 @@ let
|
|||
logFormat = "output file ${config.services.caddy.logDir}/${domain}.log { mode 640 }";
|
||||
extraConfig = ''
|
||||
bind tailscale/${subdomainOf domain}
|
||||
reverse_proxy localhost:${builtins.toString port}
|
||||
reverse_proxy localhost:${toString port}
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
|
@ -109,7 +109,7 @@ in
|
|||
admin off
|
||||
metrics { per_host }
|
||||
'';
|
||||
virtualHosts.":${builtins.toString cfg.metricsPort}" = {
|
||||
virtualHosts.":${toString cfg.metricsPort}" = {
|
||||
logFormat = "";
|
||||
extraConfig = "metrics /metrics";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ in
|
|||
package = inputs.crowdsec.packages.${pkgs.system}.crowdsec-firewall-bouncer;
|
||||
settings = {
|
||||
api_key = "cs-firewall-bouncer";
|
||||
api_url = "http://localhost:${builtins.toString cfg.apiPort}";
|
||||
api_url = "http://localhost:${toString cfg.apiPort}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ in
|
|||
package = inputs.crowdsec.packages.${pkgs.system}.crowdsec;
|
||||
enrollKeyFile = config.sops.secrets."crowdsec/enrollment-key".path;
|
||||
settings = {
|
||||
api.server.listen_uri = "localhost:${builtins.toString cfg.apiPort}";
|
||||
cscli.prometheus_uri = "http://localhost:${builtins.toString cfg.prometheusPort}";
|
||||
api.server.listen_uri = "localhost:${toString cfg.apiPort}";
|
||||
cscli.prometheus_uri = "http://localhost:${toString cfg.prometheusPort}";
|
||||
prometheus = {
|
||||
listen_addr = "localhost";
|
||||
listen_port = cfg.prometheusPort;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ in
|
|||
|
||||
services.static-web-server = {
|
||||
enable = true;
|
||||
listen = "[::]:${builtins.toString cfg.port}";
|
||||
listen = "[::]:${toString cfg.port}";
|
||||
root = "${pkgs.it-tools}/lib";
|
||||
configuration.general.health = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ in
|
|||
enable = true;
|
||||
package = pkgs-unstable.memos;
|
||||
settings = options.services.memos.settings.default // {
|
||||
MEMOS_PORT = builtins.toString cfg.port;
|
||||
MEMOS_PORT = toString cfg.port;
|
||||
MEMOS_INSTANCE_URL = "https://${cfg.domain}";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ in
|
|||
enable = true;
|
||||
settings = lib.mkForce {
|
||||
base-url = "https://${cfg.domain}";
|
||||
listen-http = "localhost:${builtins.toString cfg.port}";
|
||||
listen-http = "localhost:${toString cfg.port}";
|
||||
behind-proxy = true;
|
||||
web-root = "disable";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ in
|
|||
|
||||
virtualisation.oci-containers.containers.openspeedtest = {
|
||||
image = "openspeedtest/latest";
|
||||
ports = [ "127.0.0.1:${builtins.toString cfg.port}:3000" ];
|
||||
ports = [ "127.0.0.1:${toString cfg.port}:3000" ];
|
||||
pull = "newer";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ in
|
|||
services.radicale = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server.hosts = "localhost:${builtins.toString cfg.port}";
|
||||
server.hosts = "localhost:${toString cfg.port}";
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = config.sops.secrets."radicale/htpasswd".path;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ in
|
|||
group = lib.mkIf (!cfg.isServer) "users";
|
||||
dataDir = lib.mkIf (!cfg.isServer) "/home/seb";
|
||||
|
||||
guiAddress = lib.mkIf cfg.isServer "localhost:${builtins.toString cfg.gui.port}";
|
||||
guiAddress = lib.mkIf cfg.isServer "localhost:${toString cfg.gui.port}";
|
||||
|
||||
cert = lib.mkIf useStaticTls config.sops.secrets."syncthing/cert".path;
|
||||
key = lib.mkIf useStaticTls config.sops.secrets."syncthing/key".path;
|
||||
|
|
@ -92,7 +92,7 @@ in
|
|||
|> lib.mapAttrs (
|
||||
name: value: {
|
||||
id = value.config.custom.services.syncthing.deviceId;
|
||||
addresses = [ "tcp://${name}.${tailscaleCfg.domain}:${builtins.toString cfg.syncPort}" ];
|
||||
addresses = [ "tcp://${name}.${tailscaleCfg.domain}:${toString cfg.syncPort}" ];
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ in
|
|||
];
|
||||
|
||||
options = {
|
||||
listenAddress = "tcp://0.0.0.0:${builtins.toString cfg.syncPort}";
|
||||
listenAddress = "tcp://0.0.0.0:${toString cfg.syncPort}";
|
||||
globalAnnounceEnabled = false;
|
||||
localAnnounceEnabled = false;
|
||||
relaysEnabled = false;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ in
|
|||
__intentionallyOverridingVersion = true;
|
||||
}
|
||||
);
|
||||
listenAddress = "localhost:${builtins.toString cfg.port}";
|
||||
listenAddress = "localhost:${toString cfg.port}";
|
||||
extraOptions = [ "-retention.maxDiskSpaceUsageBytes=${cfg.maxDiskSpaceUsage}" ];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ in
|
|||
__intentionallyOverridingVersion = true;
|
||||
}
|
||||
);
|
||||
listenAddress = "localhost:${builtins.toString cfg.port}";
|
||||
listenAddress = "localhost:${toString cfg.port}";
|
||||
extraOptions = [
|
||||
"-selfScrapeInterval=15s"
|
||||
"-selfScrapeJob=victoriametrics"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue