@@ -26,12 +26,28 @@ in {
29− capabilities = mkOption {
29+ capabilities = {
30− type = types.commas;
31+ type = types.bool;
31− default = "view";
32+ default = true;
32− description = ''
33+ description = ''
33− Enable the view, add, and/or manage capabilities. E.g. view,add
34+ Enable the view capability.
41+ Enable the add capability.
48+ Enable the manage capability.
37 stateDir = mkOption {
53 stateDir = mkOption {
@@ -86,6 +102,11 @@ in {
86 users.groups.hledger = {};
102 users.groups.hledger = {};
88 systemd.services.hledger-web = let
104 systemd.services.hledger-web = let
105+ capabilityString = with cfg.capabilities; concatStringsSep "," (
106+ (optional view "view")
107+ ++ (optional add "add")
108+ ++ (optional manage "manage")
89 serverArgs = with cfg; escapeShellArgs ([
110 serverArgs = with cfg; escapeShellArgs ([
90 "--serve"
111 "--serve"
91 "--host=${host}"
112 "--host=${host}"