mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
nixos/alloy: add environmentFile option (#405269)
This commit is contained in:
commit
47718fe885
1 changed files with 10 additions and 0 deletions
|
@ -48,6 +48,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environmentFile = lib.mkOption {
|
||||||
|
type = with lib.types; nullOr path;
|
||||||
|
default = null;
|
||||||
|
example = "/run/secrets/alloy.env";
|
||||||
|
description = ''
|
||||||
|
EnvironmentFile as defined in {manpage}`systemd.exec(5)`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraFlags = lib.mkOption {
|
extraFlags = lib.mkOption {
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
@ -84,6 +93,7 @@ in
|
||||||
StateDirectory = "alloy";
|
StateDirectory = "alloy";
|
||||||
WorkingDirectory = "%S/alloy";
|
WorkingDirectory = "%S/alloy";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
|
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue