File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
nixos/modules/services/monitoring Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 3030 configuration file via `environment.etc."alloy/config.alloy"`.
3131
3232 This allows config reload, contrary to specifying a store path.
33- A `reloadTrigger` for `config.alloy` is configured.
3433
35- Other `*.alloy` files in the same directory (ignoring subdirs) are also
36- honored, but it's necessary to manually extend
37- `systemd.services.alloy.reloadTriggers` to enable config reload
38- during nixos-rebuild switch.
34+ All `.alloy` files in the same directory (ignoring subdirs) are also
35+ honored and are added to `systemd.services.alloy.reloadTriggers` to
36+ enable config reload during nixos-rebuild switch.
3937
4038 This can also point to another directory containing `*.alloy` files, or
4139 a single Alloy file in the Nix store (at the cost of reload).
6866 config = lib . mkIf cfg . enable {
6967 systemd . services . alloy = {
7068 wantedBy = [ "multi-user.target" ] ;
71- reloadTriggers = [ config . environment . etc . "alloy/config.alloy" . source or null ] ;
69+ reloadTriggers = lib . mapAttrsToList ( _ : v : v . source or null ) (
70+ lib . filterAttrs ( n : _ : lib . hasPrefix "alloy/" n && lib . hasSuffix ".alloy" n ) config . environment . etc
71+ ) ;
7272 serviceConfig = {
7373 Restart = "always" ;
7474 DynamicUser = true ;
You can’t perform that action at this time.
0 commit comments