From 56add49b96ab397b690d48aa998e9c20812d9e95 Mon Sep 17 00:00:00 2001 From: mizuki Date: Tue, 18 Aug 2026 10:18:38 +0900 Subject: [PATCH] wow --- flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ .../server/natsu/services/cfwithoutincident.nix | 10 ++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index d07ced2..7bc9444 100644 --- a/flake.lock +++ b/flake.lock @@ -51,6 +51,22 @@ "type": "github" } }, + "cfwithoutincident": { + "flake": false, + "locked": { + "lastModified": 1787005362, + "narHash": "sha256-VnpE5Tnq7Q4tTpNTJCWR9+SVEf6OZAgKBEROtGHD+lI=", + "ref": "refs/heads/main", + "rev": "e5c54597c52f0344f696ec24c618710d2fa250ba", + "revCount": 2, + "type": "git", + "url": "https://git.mizuki.guru/imnyang/cfwithoutincident.git" + }, + "original": { + "type": "git", + "url": "https://git.mizuki.guru/imnyang/cfwithoutincident.git" + } + }, "codex-app": { "inputs": { "flake-utils": "flake-utils", @@ -762,6 +778,7 @@ "inputs": { "amiaBot": "amiaBot", "catppuccin": "catppuccin", + "cfwithoutincident": "cfwithoutincident", "codex-app": "codex-app", "darwin": "darwin", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 051996b..91f85bf 100644 --- a/flake.nix +++ b/flake.nix @@ -83,6 +83,11 @@ url = "git+ssh://forgejo@mizuki.guru/imnyang/amia"; flake = false; }; + + cfwithoutincident = { + url = "git+https://git.mizuki.guru/imnyang/cfwithoutincident.git"; + flake = false; + }; }; outputs = diff --git a/hosts/server/natsu/services/cfwithoutincident.nix b/hosts/server/natsu/services/cfwithoutincident.nix index fc98f6b..2602946 100644 --- a/hosts/server/natsu/services/cfwithoutincident.nix +++ b/hosts/server/natsu/services/cfwithoutincident.nix @@ -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 ];