1
0
Fork 0
forked from lukas/nixos-config
nixos-config/hosts/pinix/localServices/phanpy.nix

21 lines
606 B
Nix

{ pkgs, ... }:
let
# Build Phanpy from its pinned source and keep the web root in the Nix store.
phanpy = pkgs.callPackage ./phanpy/package.nix { };
in
{
systemd.services."phanpy" = {
wantedBy = [ "multi-user.target" ];
description = "Phanpy Fediverse client web application";
serviceConfig = {
ExecStart = "${pkgs.static-web-server}/bin/static-web-server --host 0.0.0.0 --port 8004 --root ${phanpy}";
Restart = "always";
DynamicUser = true;
NoNewPrivileges = true;
PrivateTmp = true;
ProtectHome = true;
ProtectSystem = "strict";
};
};
}