Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/parsoid: fix service by reinstating nodePackages.parsoid #80998

Merged
merged 3 commits into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions nixos/modules/services/misc/parsoid.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let

cfg = config.services.parsoid;

parsoid = pkgs.nodePackages."parsoid-git://github.com/abbradar/parsoid#stable";
parsoid = pkgs.nodePackages.parsoid;

confTree = {
worker_heartbeat_timeout = 300000;
Expand Down Expand Up @@ -98,8 +98,29 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
User = "nobody";
Copy link
Member

@Mic92 Mic92 Feb 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, nobody should be never used actually for services.

ExecStart = "${parsoid}/lib/node_modules/parsoid/bin/server.js -c ${confFile} -n ${toString cfg.workers}";

DynamicUser = true;
User = "parsoid";
Group = "parsoid";

CapabilityBoundingSet = "";
NoNewPrivileges = true;
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
PrivateDevices = true;
ProtectHostname = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
RestrictNamespaces = true;
LockPersonality = true;
#MemoryDenyWriteExecute = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
RemoveIPC = true;
};
};

Expand Down
1 change: 1 addition & 0 deletions pkgs/development/node-packages/node-packages-v10.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
, {"npm2nix": "git://github.com/NixOS/npm2nix.git#5.12.0"}
, "ocaml-language-server"
, "parcel-bundler"
, "parsoid"
, "peerflix"
, "peerflix-server"
, "pnpm"
Expand Down
Loading