Loading nixos/modules/services/monitoring/alloy.nix +6 −6 Original line number Diff line number Diff line Loading @@ -30,12 +30,10 @@ in configuration file via `environment.etc."alloy/config.alloy"`. This allows config reload, contrary to specifying a store path. A `reloadTrigger` for `config.alloy` is configured. Other `*.alloy` files in the same directory (ignoring subdirs) are also honored, but it's necessary to manually extend `systemd.services.alloy.reloadTriggers` to enable config reload during nixos-rebuild switch. All `.alloy` files in the same directory (ignoring subdirs) are also honored and are added to `systemd.services.alloy.reloadTriggers` to enable config reload during nixos-rebuild switch. This can also point to another directory containing `*.alloy` files, or a single Alloy file in the Nix store (at the cost of reload). Loading Loading @@ -68,7 +66,9 @@ in config = lib.mkIf cfg.enable { systemd.services.alloy = { wantedBy = [ "multi-user.target" ]; reloadTriggers = [ config.environment.etc."alloy/config.alloy".source or null ]; reloadTriggers = lib.mapAttrsToList (_: v: v.source or null) ( lib.filterAttrs (n: _: lib.hasPrefix "alloy/" n && lib.hasSuffix ".alloy" n) config.environment.etc ); serviceConfig = { Restart = "always"; DynamicUser = true; Loading Loading
nixos/modules/services/monitoring/alloy.nix +6 −6 Original line number Diff line number Diff line Loading @@ -30,12 +30,10 @@ in configuration file via `environment.etc."alloy/config.alloy"`. This allows config reload, contrary to specifying a store path. A `reloadTrigger` for `config.alloy` is configured. Other `*.alloy` files in the same directory (ignoring subdirs) are also honored, but it's necessary to manually extend `systemd.services.alloy.reloadTriggers` to enable config reload during nixos-rebuild switch. All `.alloy` files in the same directory (ignoring subdirs) are also honored and are added to `systemd.services.alloy.reloadTriggers` to enable config reload during nixos-rebuild switch. This can also point to another directory containing `*.alloy` files, or a single Alloy file in the Nix store (at the cost of reload). Loading Loading @@ -68,7 +66,9 @@ in config = lib.mkIf cfg.enable { systemd.services.alloy = { wantedBy = [ "multi-user.target" ]; reloadTriggers = [ config.environment.etc."alloy/config.alloy".source or null ]; reloadTriggers = lib.mapAttrsToList (_: v: v.source or null) ( lib.filterAttrs (n: _: lib.hasPrefix "alloy/" n && lib.hasSuffix ".alloy" n) config.environment.etc ); serviceConfig = { Restart = "always"; DynamicUser = true; Loading