diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index 2fb05209c5c8..c5a80e2d7d9d 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -11,6 +11,7 @@ let NODE_CONFIG_DIR = "/var/lib/peertube/config"; NODE_ENV = "production"; NODE_EXTRA_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt"; + NPM_CONFIG_CACHE = "/var/cache/peertube/.npm"; NPM_CONFIG_PREFIX = cfg.package; HOME = cfg.package; }; @@ -425,6 +426,9 @@ in { # State directory and mode StateDirectory = "peertube"; StateDirectoryMode = "0750"; + # Cache directory and mode + CacheDirectory = "peertube"; + CacheDirectoryMode = "0750"; # Access write directories ReadWritePaths = cfg.dataDirs; # Environment diff --git a/pkgs/servers/peertube/default.nix b/pkgs/servers/peertube/default.nix index f4a80cbe26f6..6b94fec15384 100644 --- a/pkgs/servers/peertube/default.nix +++ b/pkgs/servers/peertube/default.nix @@ -6,18 +6,18 @@ let if stdenv.hostPlatform.system == "x86_64-linux" then "linux-x64" else throw "Unsupported architecture: ${stdenv.hostPlatform.system}"; - version = "4.2.1"; + version = "4.2.2"; source = fetchFromGitHub { owner = "Chocobozzz"; repo = "PeerTube"; rev = "v${version}"; - sha256 = "sha256-bb22/GidSPaRtvbht6FzVqTGzzNDYgBdHqHGnzA1Iy0="; + sha256 = "sha256-q6wSk5AO91Z6dw5MgpO7QTAlA8Q5Xx1CboBr7SElVUA="; }; yarnOfflineCacheServer = fetchYarnDeps { yarnLock = "${source}/yarn.lock"; - sha256 = "sha256-7fYQ4YS92XbzeI7nwpQfI2reDp6EiDgncK5YGSWzHF0="; + sha256 = "sha256-MMsxh20jcbW4YYsJyoupKbT9+Xa1BWZAmYHoj2/t+LM="; }; yarnOfflineCacheTools = fetchYarnDeps {