tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
nixos/amazon-ssm-agent: fix missing seelog.xml file
Anthony Roussel
2 years ago
3dd50eaa
ea71f171
+6
-3
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
misc
amazon-ssm-agent.nix
+6
-3
nixos/modules/services/misc/amazon-ssm-agent.nix
···
33
};
34
35
config = mkIf cfg.enable {
0
36
systemd.services.amazon-ssm-agent = {
37
inherit (cfg.package.meta) description;
38
-
after = [ "network.target" ];
39
wantedBy = [ "multi-user.target" ];
40
41
path = [ fake-lsb-release pkgs.coreutils ];
0
42
serviceConfig = {
43
ExecStart = "${cfg.package}/bin/amazon-ssm-agent";
44
KillMode = "process";
45
# We want this restating pretty frequently. It could be our only means
46
# of accessing the instance.
47
Restart = "always";
48
-
RestartSec = "1min";
0
49
};
50
};
51
···
70
group = "ssm-user";
71
};
72
73
-
environment.etc."amazon/ssm/seelog.xml".source = "${cfg.package}/seelog.xml.template";
74
75
environment.etc."amazon/ssm/amazon-ssm-agent.json".source = "${cfg.package}/etc/amazon/ssm/amazon-ssm-agent.json.template";
76
···
33
};
34
35
config = mkIf cfg.enable {
36
+
# See https://github.com/aws/amazon-ssm-agent/blob/mainline/packaging/linux/amazon-ssm-agent.service
37
systemd.services.amazon-ssm-agent = {
38
inherit (cfg.package.meta) description;
39
+
after = [ "network-online.target" ];
40
wantedBy = [ "multi-user.target" ];
41
42
path = [ fake-lsb-release pkgs.coreutils ];
43
+
44
serviceConfig = {
45
ExecStart = "${cfg.package}/bin/amazon-ssm-agent";
46
KillMode = "process";
47
# We want this restating pretty frequently. It could be our only means
48
# of accessing the instance.
49
Restart = "always";
50
+
RestartPreventExitStatus = 194;
51
+
RestartSec = "90";
52
};
53
};
54
···
73
group = "ssm-user";
74
};
75
76
+
environment.etc."amazon/ssm/seelog.xml".source = "${cfg.package}/etc/amazon/ssm/seelog.xml.template";
77
78
environment.etc."amazon/ssm/amazon-ssm-agent.json".source = "${cfg.package}/etc/amazon/ssm/amazon-ssm-agent.json.template";
79