-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice.nix
More file actions
34 lines (31 loc) · 819 Bytes
/
service.nix
File metadata and controls
34 lines (31 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, pkgs, config, ... }:
let
cfg = config.services.galactus;
appEnv = pkgs.python311.withPackages (p: with p; [ waitress
(callPackage ./default.nix {}) ]);
in {
options.services.galactus = {
enable = lib.mkEnableOption "galactus";
};
config = lib.mkIf cfg.enable {
systemd.services.galactus = {
path =
let
env = pkgs.buildEnv {
name = "append-driver-to-path";
paths = with pkgs; [
chromium
chromedriver
];
};
in
[ env ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${appEnv}/bin/waitress-serve galactus:app";
Restart = "always";
RestartSec = 1;
};
};
};
}