|
44 | 44 | StartLimitIntervalSec = 24; |
45 | 45 | }; |
46 | 46 | }; |
| 47 | + "slack:git" = { |
| 48 | + documentation = [ "https://github.com/zimeg/slack-sandbox" ]; |
| 49 | + requiredBy = [ |
| 50 | + "slack:snaek.service" |
| 51 | + "slack:tails.service" |
| 52 | + ]; |
| 53 | + path = [ |
| 54 | + pkgs.git |
| 55 | + pkgs.openssh |
| 56 | + ]; |
| 57 | + serviceConfig = { |
| 58 | + ExecStart = "${pkgs.git}/bin/git pull origin main"; |
| 59 | + Restart = "on-failure"; |
| 60 | + RestartSec = 2; |
| 61 | + WorkingDirectory = /home/ez/productions/slack/sandbox; |
| 62 | + }; |
| 63 | + unitConfig = { |
| 64 | + ConditionPathExists = /home/ez/productions/slack/sandbox; |
| 65 | + StartLimitBurst = 12; |
| 66 | + StartLimitIntervalSec = 24; |
| 67 | + }; |
| 68 | + }; |
47 | 69 | "slack:snaek" = { |
48 | 70 | documentation = [ "https://github.com/zimeg/slack-sandbox" ]; |
49 | 71 | wantedBy = [ "default.target" ]; |
50 | | - path = [ pkgs.git ]; |
| 72 | + path = [ |
| 73 | + pkgs.git |
| 74 | + pkgs.nix |
| 75 | + ]; |
51 | 76 | serviceConfig = { |
52 | | - EnvironmentFile = /home/ez/programming/slack/sandbox/py.bolt.snaek/.env.production; |
| 77 | + EnvironmentFile = /home/ez/productions/slack/sandbox/py.bolt.snaek/.env.production; |
53 | 78 | ExecStart = "${pkgs.nix}/bin/nix develop --command bash -c \"python3 app.py\""; |
54 | 79 | Restart = "always"; |
55 | 80 | RestartSec = 2; |
56 | | - WorkingDirectory = /home/ez/programming/slack/sandbox/py.bolt.snaek; |
| 81 | + WorkingDirectory = /home/ez/productions/slack/sandbox/py.bolt.snaek; |
57 | 82 | }; |
58 | 83 | unitConfig = { |
59 | | - ConditionPathExists = /home/ez/programming/slack/sandbox/py.bolt.snaek/slack.json; |
| 84 | + ConditionPathExists = /home/ez/productions/slack/sandbox/py.bolt.snaek/.slack/hooks.json; |
60 | 85 | StartLimitBurst = 12; |
61 | 86 | StartLimitIntervalSec = 24; |
62 | 87 | }; |
63 | 88 | }; |
64 | 89 | "slack:tails" = { |
65 | 90 | documentation = [ "https://github.com/zimeg/slack-sandbox" ]; |
66 | 91 | wantedBy = [ "default.target" ]; |
67 | | - path = [ pkgs.git ]; |
| 92 | + path = [ |
| 93 | + pkgs.git |
| 94 | + pkgs.nix |
| 95 | + ]; |
68 | 96 | serviceConfig = { |
69 | | - EnvironmentFile = /home/ez/programming/slack/sandbox/js.bolt.tails/.env.production; |
| 97 | + EnvironmentFile = /home/ez/productions/slack/sandbox/js.bolt.tails/.env.production; |
70 | 98 | ExecStart = "${pkgs.nix}/bin/nix develop --command bash -c \"npm run start\""; |
| 99 | + ExecStartPre = "${pkgs.nix}/bin/nix develop --command bash -c \"npm ci --omit=dev --omit=optional\""; |
71 | 100 | Restart = "always"; |
72 | 101 | RestartSec = 2; |
73 | | - WorkingDirectory = /home/ez/programming/slack/sandbox/js.bolt.tails; |
| 102 | + WorkingDirectory = /home/ez/productions/slack/sandbox/js.bolt.tails; |
74 | 103 | }; |
75 | 104 | unitConfig = { |
76 | | - ConditionPathExists = /home/ez/programming/slack/sandbox/js.bolt.tails/slack.json; |
| 105 | + ConditionPathExists = /home/ez/productions/slack/sandbox/js.bolt.tails/.slack/hooks.json; |
77 | 106 | StartLimitBurst = 12; |
78 | 107 | StartLimitIntervalSec = 24; |
79 | 108 | }; |
|
0 commit comments