This commit is contained in:
Akiyama Mizuki 2026-08-18 10:18:38 +09:00
commit 56add49b96
3 changed files with 30 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ inputs, pkgs, ... }:
{
systemd.services.cfwithoutincident = {
@ -11,13 +11,19 @@
Type = "simple";
User = "imnyang";
Group = "users";
WorkingDirectory = "/home/imnyang/git/imnyang/cfwithoutincident";
WorkingDirectory = "/var/lib/cfwithoutincident";
Environment = [
"PORT=31774"
];
ExecStartPre = [
"${pkgs.coreutils}/bin/cp -r ${inputs.cfwithoutincident}/. /var/lib/cfwithoutincident/"
"${pkgs.bun}/bin/bun install --frozen-lockfile"
];
ExecStart = "${pkgs.bun}/bin/bun run src/index.ts";
Restart = "always";
RestartSec = 5;
StateDirectory = "cfwithoutincident";
StateDirectoryMode = "0755";
};
path = [ pkgs.bun ];