summaryrefslogtreecommitdiff
path: root/modules/webapps
diff options
context:
space:
mode:
Diffstat (limited to 'modules/webapps')
-rw-r--r--modules/webapps/diaspora.nix28
-rw-r--r--modules/webapps/mastodon.nix26
-rw-r--r--modules/webapps/mediagoblin.nix26
-rw-r--r--modules/webapps/peertube.nix26
4 files changed, 57 insertions, 49 deletions
diff --git a/modules/webapps/diaspora.nix b/modules/webapps/diaspora.nix
index 65599b73..d9e9989f 100644
--- a/modules/webapps/diaspora.nix
+++ b/modules/webapps/diaspora.nix
@@ -108,19 +108,21 @@ in
108 }; 108 };
109 109
110 config = lib.mkIf cfg.enable { 110 config = lib.mkIf cfg.enable {
111 users.users = lib.optionalAttrs (cfg.user == name) (lib.singleton { 111 users.users = lib.optionalAttrs (cfg.user == name) {
112 inherit name; 112 "${name}" = {
113 inherit uid; 113 inherit uid;
114 group = cfg.group; 114 group = cfg.group;
115 description = "Diaspora user"; 115 description = "Diaspora user";
116 home = cfg.dataDir; 116 home = cfg.dataDir;
117 packages = [ cfg.workdir.gems pkgs.nodejs cfg.workdir.gems.ruby ]; 117 packages = [ cfg.workdir.gems pkgs.nodejs cfg.workdir.gems.ruby ];
118 useDefaultShell = true; 118 useDefaultShell = true;
119 }); 119 };
120 users.groups = lib.optionalAttrs (cfg.group == name) (lib.singleton { 120 };
121 inherit name; 121 users.groups = lib.optionalAttrs (cfg.group == name) {
122 inherit gid; 122 "${name}" = {
123 }); 123 inherit gid;
124 };
125 };
124 126
125 systemd.services.diaspora = { 127 systemd.services.diaspora = {
126 description = "Diaspora"; 128 description = "Diaspora";
diff --git a/modules/webapps/mastodon.nix b/modules/webapps/mastodon.nix
index 68531cf3..cd550c0e 100644
--- a/modules/webapps/mastodon.nix
+++ b/modules/webapps/mastodon.nix
@@ -96,18 +96,20 @@ in
96 }; 96 };
97 97
98 config = lib.mkIf cfg.enable { 98 config = lib.mkIf cfg.enable {
99 users.users = lib.optionalAttrs (cfg.user == name) (lib.singleton { 99 users.users = lib.optionalAttrs (cfg.user == name) {
100 inherit name; 100 "${name}" = {
101 inherit uid; 101 inherit uid;
102 group = cfg.group; 102 group = cfg.group;
103 description = "Mastodon user"; 103 description = "Mastodon user";
104 home = cfg.dataDir; 104 home = cfg.dataDir;
105 useDefaultShell = true; 105 useDefaultShell = true;
106 }); 106 };
107 users.groups = lib.optionalAttrs (cfg.group == name) (lib.singleton { 107 };
108 inherit name; 108 users.groups = lib.optionalAttrs (cfg.group == name) {
109 inherit gid; 109 "${name}" = {
110 }); 110 inherit gid;
111 };
112 };
111 113
112 systemd.services.mastodon-streaming = { 114 systemd.services.mastodon-streaming = {
113 description = "Mastodon Streaming"; 115 description = "Mastodon Streaming";
diff --git a/modules/webapps/mediagoblin.nix b/modules/webapps/mediagoblin.nix
index 78bbef6f..dbc4c2b1 100644
--- a/modules/webapps/mediagoblin.nix
+++ b/modules/webapps/mediagoblin.nix
@@ -151,18 +151,20 @@ in
151 }; 151 };
152 152
153 config = lib.mkIf cfg.enable { 153 config = lib.mkIf cfg.enable {
154 users.users = lib.optionalAttrs (cfg.user == name) (lib.singleton { 154 users.users = lib.optionalAttrs (cfg.user == name) {
155 inherit name; 155 "${name}" = {
156 inherit uid; 156 inherit uid;
157 group = cfg.group; 157 group = cfg.group;
158 description = "Mediagoblin user"; 158 description = "Mediagoblin user";
159 home = cfg.dataDir; 159 home = cfg.dataDir;
160 useDefaultShell = true; 160 useDefaultShell = true;
161 }); 161 };
162 users.groups = lib.optionalAttrs (cfg.group == name) (lib.singleton { 162 };
163 inherit name; 163 users.groups = lib.optionalAttrs (cfg.group == name) {
164 inherit gid; 164 "${name}" = {
165 }); 165 inherit gid;
166 };
167 };
166 168
167 systemd.services.mediagoblin-web = { 169 systemd.services.mediagoblin-web = {
168 description = "Mediagoblin service"; 170 description = "Mediagoblin service";
diff --git a/modules/webapps/peertube.nix b/modules/webapps/peertube.nix
index 89dcc67a..281ff8bc 100644
--- a/modules/webapps/peertube.nix
+++ b/modules/webapps/peertube.nix
@@ -53,18 +53,20 @@ in
53 }; 53 };
54 54
55 config = lib.mkIf cfg.enable { 55 config = lib.mkIf cfg.enable {
56 users.users = lib.optionalAttrs (cfg.user == name) (lib.singleton { 56 users.users = lib.optionalAttrs (cfg.user == name) {
57 inherit name; 57 "${name}" = {
58 inherit uid; 58 inherit uid;
59 group = cfg.group; 59 group = cfg.group;
60 description = "Peertube user"; 60 description = "Peertube user";
61 home = cfg.dataDir; 61 home = cfg.dataDir;
62 useDefaultShell = true; 62 useDefaultShell = true;
63 }); 63 };
64 users.groups = lib.optionalAttrs (cfg.group == name) (lib.singleton { 64 };
65 inherit name; 65 users.groups = lib.optionalAttrs (cfg.group == name) {
66 inherit gid; 66 "${name}" = {
67 }); 67 inherit gid;
68 };
69 };
68 70
69 systemd.services.peertube = { 71 systemd.services.peertube = {
70 description = "Peertube"; 72 description = "Peertube";