Replace builtins.toString with toString

This commit is contained in:
SebastianStork 2025-10-09 21:35:41 +02:00
parent c18caea0de
commit c3cfcf1b61
15 changed files with 24 additions and 24 deletions

View file

@ -51,8 +51,8 @@
# Switch workspace # Switch workspace
${lib.concatMapStringsSep "\n" (n: '' ${lib.concatMapStringsSep "\n" (n: ''
bind = SUPER, ${builtins.toString n}, focusworkspaceoncurrentmonitor, ${builtins.toString n} bind = SUPER, ${toString n}, focusworkspaceoncurrentmonitor, ${toString n}
bind = SUPER SHIFT, ${builtins.toString n}, movetoworkspacesilent, ${builtins.toString n} bind = SUPER SHIFT, ${toString n}, movetoworkspacesilent, ${toString n}
'') (lib.range 1 9)} '') (lib.range 1 9)}
# Manage session # Manage session

View file

@ -41,7 +41,7 @@ in
inherit domain; 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.mapAttrs (_: values: values |> lib.map (value: value.file))
|> lib.filterAttrs (_: files: lib.length files > 1); |> lib.filterAttrs (_: files: lib.length files > 1);

View file

@ -35,7 +35,7 @@ in
inherit port; 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.mapAttrs (_: values: values |> lib.map (value: value.file))
|> lib.filterAttrs (_: files: lib.length files > 1); |> lib.filterAttrs (_: files: lib.length files > 1);

View file

@ -71,7 +71,7 @@ in
services.alloy = { services.alloy = {
enable = true; enable = true;
extraFlags = [ extraFlags = [
"--server.http.listen-addr=localhost:${builtins.toString cfg.port}" "--server.http.listen-addr=localhost:${toString cfg.port}"
"--disable-reporting" "--disable-reporting"
]; ];
}; };
@ -121,7 +121,7 @@ in
text = '' text = ''
prometheus.scrape "victorialogs" { prometheus.scrape "victorialogs" {
targets = [{ targets = [{
__address__ = "localhost:${builtins.toString config.custom.services.victorialogs.port}", __address__ = "localhost:${toString config.custom.services.victorialogs.port}",
job = "victorialogs", job = "victorialogs",
instance = constants.hostname, instance = constants.hostname,
}] }]
@ -135,7 +135,7 @@ in
text = '' text = ''
prometheus.scrape "caddy" { prometheus.scrape "caddy" {
targets = [{ targets = [{
__address__ = "localhost:${builtins.toString config.custom.services.caddy.metricsPort}", __address__ = "localhost:${toString config.custom.services.caddy.metricsPort}",
job = "caddy", job = "caddy",
instance = constants.hostname, instance = constants.hostname,
}] }]
@ -149,7 +149,7 @@ in
text = '' text = ''
prometheus.scrape "crowdsec" { prometheus.scrape "crowdsec" {
targets = [{ targets = [{
__address__ = "localhost:${builtins.toString config.custom.services.crowdsec.prometheusPort}", __address__ = "localhost:${toString config.custom.services.crowdsec.prometheusPort}",
job = "crowdsec", job = "crowdsec",
instance = constants.hostname, instance = constants.hostname,
}] }]

View file

@ -35,7 +35,7 @@ let
import subdomain-log ${domain} import subdomain-log ${domain}
@${subdomainOf domain} host ${domain} @${subdomainOf domain} host ${domain}
handle @${subdomainOf domain} { handle @${subdomainOf domain} {
reverse_proxy localhost:${builtins.toString port} reverse_proxy localhost:${toString port}
} }
''; '';
in in
@ -48,7 +48,7 @@ let
logFormat = "output file ${config.services.caddy.logDir}/${domain}.log { mode 640 }"; logFormat = "output file ${config.services.caddy.logDir}/${domain}.log { mode 640 }";
extraConfig = '' extraConfig = ''
bind tailscale/${subdomainOf domain} bind tailscale/${subdomainOf domain}
reverse_proxy localhost:${builtins.toString port} reverse_proxy localhost:${toString port}
''; '';
}; };
in in
@ -109,7 +109,7 @@ in
admin off admin off
metrics { per_host } metrics { per_host }
''; '';
virtualHosts.":${builtins.toString cfg.metricsPort}" = { virtualHosts.":${toString cfg.metricsPort}" = {
logFormat = ""; logFormat = "";
extraConfig = "metrics /metrics"; extraConfig = "metrics /metrics";
}; };

View file

@ -19,7 +19,7 @@ in
package = inputs.crowdsec.packages.${pkgs.system}.crowdsec-firewall-bouncer; package = inputs.crowdsec.packages.${pkgs.system}.crowdsec-firewall-bouncer;
settings = { settings = {
api_key = "cs-firewall-bouncer"; api_key = "cs-firewall-bouncer";
api_url = "http://localhost:${builtins.toString cfg.apiPort}"; api_url = "http://localhost:${toString cfg.apiPort}";
}; };
}; };

View file

@ -48,8 +48,8 @@ in
package = inputs.crowdsec.packages.${pkgs.system}.crowdsec; package = inputs.crowdsec.packages.${pkgs.system}.crowdsec;
enrollKeyFile = config.sops.secrets."crowdsec/enrollment-key".path; enrollKeyFile = config.sops.secrets."crowdsec/enrollment-key".path;
settings = { settings = {
api.server.listen_uri = "localhost:${builtins.toString cfg.apiPort}"; api.server.listen_uri = "localhost:${toString cfg.apiPort}";
cscli.prometheus_uri = "http://localhost:${builtins.toString cfg.prometheusPort}"; cscli.prometheus_uri = "http://localhost:${toString cfg.prometheusPort}";
prometheus = { prometheus = {
listen_addr = "localhost"; listen_addr = "localhost";
listen_port = cfg.prometheusPort; listen_port = cfg.prometheusPort;

View file

@ -28,7 +28,7 @@ in
services.static-web-server = { services.static-web-server = {
enable = true; enable = true;
listen = "[::]:${builtins.toString cfg.port}"; listen = "[::]:${toString cfg.port}";
root = "${pkgs.it-tools}/lib"; root = "${pkgs.it-tools}/lib";
configuration.general.health = true; configuration.general.health = true;
}; };

View file

@ -42,7 +42,7 @@ in
enable = true; enable = true;
package = pkgs-unstable.memos; package = pkgs-unstable.memos;
settings = options.services.memos.settings.default // { settings = options.services.memos.settings.default // {
MEMOS_PORT = builtins.toString cfg.port; MEMOS_PORT = toString cfg.port;
MEMOS_INSTANCE_URL = "https://${cfg.domain}"; MEMOS_INSTANCE_URL = "https://${cfg.domain}";
}; };
}; };

View file

@ -25,7 +25,7 @@ in
enable = true; enable = true;
settings = lib.mkForce { settings = lib.mkForce {
base-url = "https://${cfg.domain}"; base-url = "https://${cfg.domain}";
listen-http = "localhost:${builtins.toString cfg.port}"; listen-http = "localhost:${toString cfg.port}";
behind-proxy = true; behind-proxy = true;
web-root = "disable"; web-root = "disable";
}; };

View file

@ -23,7 +23,7 @@ in
virtualisation.oci-containers.containers.openspeedtest = { virtualisation.oci-containers.containers.openspeedtest = {
image = "openspeedtest/latest"; image = "openspeedtest/latest";
ports = [ "127.0.0.1:${builtins.toString cfg.port}:3000" ]; ports = [ "127.0.0.1:${toString cfg.port}:3000" ];
pull = "newer"; pull = "newer";
}; };
}; };

View file

@ -38,7 +38,7 @@ in
services.radicale = { services.radicale = {
enable = true; enable = true;
settings = { settings = {
server.hosts = "localhost:${builtins.toString cfg.port}"; server.hosts = "localhost:${toString cfg.port}";
auth = { auth = {
type = "htpasswd"; type = "htpasswd";
htpasswd_filename = config.sops.secrets."radicale/htpasswd".path; htpasswd_filename = config.sops.secrets."radicale/htpasswd".path;

View file

@ -78,7 +78,7 @@ in
group = lib.mkIf (!cfg.isServer) "users"; group = lib.mkIf (!cfg.isServer) "users";
dataDir = lib.mkIf (!cfg.isServer) "/home/seb"; 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; cert = lib.mkIf useStaticTls config.sops.secrets."syncthing/cert".path;
key = lib.mkIf useStaticTls config.sops.secrets."syncthing/key".path; key = lib.mkIf useStaticTls config.sops.secrets."syncthing/key".path;
@ -92,7 +92,7 @@ in
|> lib.mapAttrs ( |> lib.mapAttrs (
name: value: { name: value: {
id = value.config.custom.services.syncthing.deviceId; 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 = { options = {
listenAddress = "tcp://0.0.0.0:${builtins.toString cfg.syncPort}"; listenAddress = "tcp://0.0.0.0:${toString cfg.syncPort}";
globalAnnounceEnabled = false; globalAnnounceEnabled = false;
localAnnounceEnabled = false; localAnnounceEnabled = false;
relaysEnabled = false; relaysEnabled = false;

View file

@ -55,7 +55,7 @@ in
__intentionallyOverridingVersion = true; __intentionallyOverridingVersion = true;
} }
); );
listenAddress = "localhost:${builtins.toString cfg.port}"; listenAddress = "localhost:${toString cfg.port}";
extraOptions = [ "-retention.maxDiskSpaceUsageBytes=${cfg.maxDiskSpaceUsage}" ]; extraOptions = [ "-retention.maxDiskSpaceUsageBytes=${cfg.maxDiskSpaceUsage}" ];
}; };

View file

@ -51,7 +51,7 @@ in
__intentionallyOverridingVersion = true; __intentionallyOverridingVersion = true;
} }
); );
listenAddress = "localhost:${builtins.toString cfg.port}"; listenAddress = "localhost:${toString cfg.port}";
extraOptions = [ extraOptions = [
"-selfScrapeInterval=15s" "-selfScrapeInterval=15s"
"-selfScrapeJob=victoriametrics" "-selfScrapeJob=victoriametrics"