update
This commit is contained in:
parent
9490e85547
commit
7899b924cd
12
flake.lock
12
flake.lock
@ -817,11 +817,11 @@
|
|||||||
"parts": "parts_5"
|
"parts": "parts_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683296163,
|
"lastModified": 1683618968,
|
||||||
"narHash": "sha256-pOdVitwRl8gUNMxInXwJJtXffSYYsAc0EWkFSFGvrRk=",
|
"narHash": "sha256-OkxkRYNKv0nR37YxrNC/3SW6wGBFMA0MzUWnV4nW5eU=",
|
||||||
"owner": "yusdacra",
|
"owner": "yusdacra",
|
||||||
"repo": "musikquadrupled",
|
"repo": "musikquadrupled",
|
||||||
"rev": "e259740d501d00fb3548b0be145817ef8fdc35ae",
|
"rev": "792efb0c9f2e76eb125e654ee1495c071e57e02f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -840,11 +840,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683276540,
|
"lastModified": 1683646918,
|
||||||
"narHash": "sha256-JiuT8wmMH+vNVyBS18i/RNLDBUDEUCNdeqkwPQYsMDM=",
|
"narHash": "sha256-DKD5gN4mj4mDd81xo6kSmtmnMrX/Ue+nQxuVGC4JbuY=",
|
||||||
"owner": "yusdacra",
|
"owner": "yusdacra",
|
||||||
"repo": "musikspider",
|
"repo": "musikspider",
|
||||||
"rev": "913b0df0b0a5ed78aa761584d9c6f87eff0e781d",
|
"rev": "77ed4a6de6970ec1846d04fd1da8c3fd2a31feac",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -2,10 +2,45 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
pkg =
|
||||||
|
inputs.musikspider.packages.${pkgs.system}.musikspider.overrideAttrs
|
||||||
|
(old: {
|
||||||
|
LOCAL_MUSIKQUAD_SERVER = "http://localhost:5005";
|
||||||
|
PUBLIC_MUSIKQUAD_SERVER = "mq.gaze.systems";
|
||||||
|
PUBLIC_BASEURL = "ms.gaze.systems";
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
users.users.musikspider = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "musikspider";
|
||||||
|
};
|
||||||
|
users.groups.musikspider = {};
|
||||||
|
|
||||||
|
systemd.services.musikspider= {
|
||||||
|
description = "musikspider";
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
after = ["network.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "musikspider";
|
||||||
|
ExecStart = "${pkgs.deno}/bin/deno run --allow-env --allow-read --allow-net ${pkg}/index.js";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
WorkingDirectory = "/var/lib/musikspider";
|
||||||
|
EnvironmentFile = pkgs.writeText "musikspider-env" ''
|
||||||
|
DENO_NO_UPDATE_CHECK=1
|
||||||
|
DENO_DIR=/var/lib/musikspider/.deno
|
||||||
|
PORT=4004
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."ms.gaze.systems" = {
|
services.nginx.virtualHosts."ms.gaze.systems" = {
|
||||||
useACMEHost = "gaze.systems";
|
useACMEHost = "gaze.systems";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
root = "${inputs.musikspider.packages.${pkgs.system}.musikspider}";
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:4004";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user