mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-14 22:45:14 +00:00
Allow writing to cdn path
This commit is contained in:
+18
-2
@@ -6,6 +6,22 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
filteredSrc = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = (
|
||||
lib.fileset.intersection ./. (
|
||||
lib.fileset.unions [
|
||||
./src
|
||||
./package.json
|
||||
./tsconfig.json
|
||||
./package-lock.json
|
||||
./assets
|
||||
]
|
||||
)
|
||||
);
|
||||
};
|
||||
in
|
||||
pkgs.buildNpmPackage {
|
||||
pname = "spacebar-server-ts";
|
||||
nodejs = pkgs.nodejs_24;
|
||||
@@ -20,8 +36,8 @@ pkgs.buildNpmPackage {
|
||||
maintainers = with maintainers; [ RorySys ]; # lol.
|
||||
};
|
||||
|
||||
src = ./.;
|
||||
npmDeps = pkgs.importNpmLock { npmRoot = ./.; };
|
||||
src = filteredSrc;
|
||||
npmDeps = pkgs.importNpmLock { npmRoot = filteredSrc; };
|
||||
npmConfigHook = pkgs.importNpmLock.npmConfigHook;
|
||||
|
||||
npmBuildScript = "build:src";
|
||||
|
||||
@@ -253,6 +253,8 @@ in
|
||||
StateDirectoryMode = "0750";
|
||||
RuntimeDirectory = "spacebar";
|
||||
RuntimeDirectoryMode = "0750";
|
||||
ReadWritePaths = [ cfg.cdnPath ];
|
||||
NoExecPaths = [ cfg.cdnPath ];
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 10;
|
||||
@@ -267,10 +269,10 @@ in
|
||||
in
|
||||
{
|
||||
assertions = [
|
||||
# {
|
||||
# assertion = lib.all (map (key: !(key == "CONFIG_PATH" || key == "CONFIG_READONLY" || key == "PORT" || key == "STORAGE_LOCATION")) (lib.attrNames cfg.extraEnvironment));
|
||||
# message = "You cannot set CONFIG_PATH, CONFIG_READONLY, PORT or STORAGE_LOCATION in extraEnvironment, these are managed by the NixOS module.";
|
||||
# }
|
||||
# {
|
||||
# assertion = lib.all (map (key: !(key == "CONFIG_PATH" || key == "CONFIG_READONLY" || key == "PORT" || key == "STORAGE_LOCATION")) (lib.attrNames cfg.extraEnvironment));
|
||||
# message = "You cannot set CONFIG_PATH, CONFIG_READONLY, PORT or STORAGE_LOCATION in extraEnvironment, these are managed by the NixOS module.";
|
||||
# }
|
||||
];
|
||||
|
||||
users.users.spacebarchat = {
|
||||
|
||||
Reference in New Issue
Block a user