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"
|
||||
]
|
||||
++ config.custom.persist.directories;
|
||||
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ in
|
|||
|
||||
datasources.settings = {
|
||||
prune = true;
|
||||
datasources =
|
||||
datasources = lib.concatLists [
|
||||
(lib.optional cfg.datasources.prometheus.enable {
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
|
|
@ -97,18 +97,19 @@ in
|
|||
prometheusVersion = "2.50.0";
|
||||
};
|
||||
})
|
||||
++ (lib.optional cfg.datasources.victoriametrics.enable {
|
||||
(lib.optional cfg.datasources.victoriametrics.enable {
|
||||
name = "VictoriaMetrics";
|
||||
type = "victoriametrics-metrics-datasource";
|
||||
inherit (cfg.datasources.victoriametrics) url;
|
||||
isDefault = false;
|
||||
})
|
||||
++ (lib.optional cfg.datasources.victorialogs.enable {
|
||||
(lib.optional cfg.datasources.victorialogs.enable {
|
||||
name = "VictoriaLogs";
|
||||
type = "victoriametrics-logs-datasource";
|
||||
inherit (cfg.datasources.victorialogs) url;
|
||||
isDefault = false;
|
||||
});
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -29,9 +29,10 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
warnings =
|
||||
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";
|
||||
warnings = lib.concatLists [
|
||||
(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")
|
||||
];
|
||||
|
||||
meta = {
|
||||
domains.list = [ cfg.domain ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue