Skip to content

Commit 44c2311

Browse files
committed
systemd: pull latest changes of sandbox applications on updates
1 parent 66b8277 commit 44c2311

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ versioning is done in a continuous fashion without worries of breaking changes.
66

77
## patches
88

9+
- `systemd`: pull latest changes of sandbox applications on updates 2025-03-22
910
- `nvim`: jump to diagnostic information if code raises the warning 2025-03-22
1011
- `go`: install an entire suite of gotools for improved development 2025-03-22
1112
- `ruby`: remove installations and environments from ruby languages 2025-03-22

machines/tom/systemd/services/default.nix

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,65 @@
4444
StartLimitIntervalSec = 24;
4545
};
4646
};
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+
};
4769
"slack:snaek" = {
4870
documentation = [ "https://github.com/zimeg/slack-sandbox" ];
4971
wantedBy = [ "default.target" ];
50-
path = [ pkgs.git ];
72+
path = [
73+
pkgs.git
74+
pkgs.nix
75+
];
5176
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;
5378
ExecStart = "${pkgs.nix}/bin/nix develop --command bash -c \"python3 app.py\"";
5479
Restart = "always";
5580
RestartSec = 2;
56-
WorkingDirectory = /home/ez/programming/slack/sandbox/py.bolt.snaek;
81+
WorkingDirectory = /home/ez/productions/slack/sandbox/py.bolt.snaek;
5782
};
5883
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;
6085
StartLimitBurst = 12;
6186
StartLimitIntervalSec = 24;
6287
};
6388
};
6489
"slack:tails" = {
6590
documentation = [ "https://github.com/zimeg/slack-sandbox" ];
6691
wantedBy = [ "default.target" ];
67-
path = [ pkgs.git ];
92+
path = [
93+
pkgs.git
94+
pkgs.nix
95+
];
6896
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;
7098
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\"";
71100
Restart = "always";
72101
RestartSec = 2;
73-
WorkingDirectory = /home/ez/programming/slack/sandbox/js.bolt.tails;
102+
WorkingDirectory = /home/ez/productions/slack/sandbox/js.bolt.tails;
74103
};
75104
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;
77106
StartLimitBurst = 12;
78107
StartLimitIntervalSec = 24;
79108
};

0 commit comments

Comments
 (0)