1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: make virtiofsd tags short and friendly to not upset the software

with oh-so-bad long strings with underscores
This commit is contained in:
oddlama 2023-12-23 00:07:03 +01:00
parent 66c1c9d72d
commit d5304bbe2b
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 9 additions and 7 deletions

View file

@ -71,7 +71,7 @@ in {
_: zfsCfg: {
source = zfsCfg.hostMountpoint;
mountPoint = zfsCfg.guestMountpoint;
tag = lib.replaceStrings ["/"] ["_"] zfsCfg.hostMountpoint;
tag = builtins.substring 0 16 (builtins.hashString "sha256" zfsCfg.hostMountpoint);
proto = "virtiofs";
}
);

View file

@ -1,6 +1,7 @@
{
config,
lib,
minimal,
nodes,
...
}: let
@ -23,7 +24,7 @@ in {
};
};
config = mkIf cfg.enable {
config = mkIf (!minimal && cfg.enable) {
age.secrets.promtail-loki-basic-auth-password = {
generator.script = "alnum";
mode = "440";

View file

@ -1,6 +1,7 @@
{
config,
lib,
minimal,
nodes,
pkgs,
...
@ -56,7 +57,7 @@ in {
};
};
config = mkIf cfg.enable {
config = mkIf (!minimal && cfg.enable) {
nodes.${cfg.influxdb2.node} = {
# Mirror the original secret on the influx host
age.secrets."telegraf-influxdb-token-${config.node.name}" = {