mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-01 00:12:39 +03:00
nixos/salt-minion: Fix salt-call without -c
This commit is contained in:
parent
adf8261192
commit
37c9915340
@ -15,7 +15,6 @@ let
|
|||||||
# Default is in /etc/salt/pki/minion
|
# Default is in /etc/salt/pki/minion
|
||||||
pki_dir = "/var/lib/salt/pki/minion";
|
pki_dir = "/var/lib/salt/pki/minion";
|
||||||
} cfg.configuration;
|
} cfg.configuration;
|
||||||
configDir = pkgs.writeTextDir "minion" (builtins.toJSON fullConfig);
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -36,7 +35,16 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [ salt ];
|
environment = {
|
||||||
|
# Set this up in /etc/salt/minion so `salt-call`, etc. work.
|
||||||
|
# The alternatives are
|
||||||
|
# - passing --config-dir to all salt commands, not just the minion unit,
|
||||||
|
# - setting aglobal environment variable.
|
||||||
|
etc."salt/minion".source = pkgs.writeText "minion" (
|
||||||
|
builtins.toJSON fullConfig
|
||||||
|
);
|
||||||
|
systemPackages = with pkgs; [ salt ];
|
||||||
|
};
|
||||||
systemd.services.salt-minion = {
|
systemd.services.salt-minion = {
|
||||||
description = "Salt Minion";
|
description = "Salt Minion";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
@ -45,7 +53,7 @@ in
|
|||||||
utillinux
|
utillinux
|
||||||
];
|
];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.salt}/bin/salt-minion --config-dir=${configDir}";
|
ExecStart = "${pkgs.salt}/bin/salt-minion";
|
||||||
LimitNOFILE = 8192;
|
LimitNOFILE = 8192;
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
NotifyAccess = "all";
|
NotifyAccess = "all";
|
||||||
|
Loading…
Reference in New Issue
Block a user