main
1{
2 lib,
3 inputs,
4 ...
5}: {
6 den.aspects.services.proxy.sub-store = {
7 settings = {
8 port = lib.mkOption {
9 default = 3000;
10 type = lib.types.port;
11 description = "Port the sub-store frontend listen on";
12 };
13 };
14
15 persist = {
16 directories = [
17 {
18 directory = "/var/lib/private/sub-store";
19 user = "nobody";
20 group = "nogroup";
21 mode = "0755";
22 }
23 ];
24 };
25
26 nixos = {host, ...}: let
27 cfg = host.settings.services.proxy.sub-store;
28 in {
29 imports = [inputs.nur-hpcesia.nixosModules.sub-store];
30
31 services.sub-store = {
32 enable = true;
33 port = cfg.port;
34 frontend = {
35 enable = true;
36 port = cfg.port;
37 # sub-store uses the URL path for authentication.
38 # Since I only access it locally, I've made this path public.
39 backendPath = "/backend";
40 };
41 };
42 };
43 };
44}