mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Use lib.concatLists instead of ++ when convenient
This commit is contained in:
parent
8807d38b57
commit
90302f4c2b
3 changed files with 10 additions and 7 deletions
|
|
@ -33,6 +33,7 @@ in
|
||||||
"/var/log"
|
"/var/log"
|
||||||
]
|
]
|
||||||
++ config.custom.persist.directories;
|
++ config.custom.persist.directories;
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
"/etc/machine-id"
|
"/etc/machine-id"
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ in
|
||||||
|
|
||||||
datasources.settings = {
|
datasources.settings = {
|
||||||
prune = true;
|
prune = true;
|
||||||
datasources =
|
datasources = lib.concatLists [
|
||||||
(lib.optional cfg.datasources.prometheus.enable {
|
(lib.optional cfg.datasources.prometheus.enable {
|
||||||
name = "Prometheus";
|
name = "Prometheus";
|
||||||
type = "prometheus";
|
type = "prometheus";
|
||||||
|
|
@ -97,18 +97,19 @@ in
|
||||||
prometheusVersion = "2.50.0";
|
prometheusVersion = "2.50.0";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
++ (lib.optional cfg.datasources.victoriametrics.enable {
|
(lib.optional cfg.datasources.victoriametrics.enable {
|
||||||
name = "VictoriaMetrics";
|
name = "VictoriaMetrics";
|
||||||
type = "victoriametrics-metrics-datasource";
|
type = "victoriametrics-metrics-datasource";
|
||||||
inherit (cfg.datasources.victoriametrics) url;
|
inherit (cfg.datasources.victoriametrics) url;
|
||||||
isDefault = false;
|
isDefault = false;
|
||||||
})
|
})
|
||||||
++ (lib.optional cfg.datasources.victorialogs.enable {
|
(lib.optional cfg.datasources.victorialogs.enable {
|
||||||
name = "VictoriaLogs";
|
name = "VictoriaLogs";
|
||||||
type = "victoriametrics-logs-datasource";
|
type = "victoriametrics-logs-datasource";
|
||||||
inherit (cfg.datasources.victorialogs) url;
|
inherit (cfg.datasources.victorialogs) url;
|
||||||
isDefault = false;
|
isDefault = false;
|
||||||
});
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,10 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
warnings =
|
warnings = lib.concatLists [
|
||||||
lib.optional (lib.pathExists "${modulesPath}/services/misc/memos.nix") "TODO: Use memos module from stable nixpkgs"
|
(lib.optional (lib.pathExists "${modulesPath}/services/misc/memos.nix") "TODO: Use memos module from stable nixpkgs")
|
||||||
++ lib.optional (lib.versionAtLeast lib.version "25.11") "TODO: Use memos package from stable nixpkgs";
|
(lib.optional (lib.versionAtLeast lib.version "25.11") "TODO: Use memos package from stable nixpkgs")
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.list = [ cfg.domain ];
|
domains.list = [ cfg.domain ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue