commit 6d9848825af85bf3f0084932a0a0156361441bd6
parent d3ecd88e0ccfec738590652803a9581c827bc072
Author: Francesco Saccone <francesco@francescosaccone.com>
Date: Wed, 16 Apr 2025 18:44:27 +0200
feat: add and implement 'user' option
Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/nixos/quark/default.nix b/modules/nixos/quark/default.nix
@@ -23,6 +23,11 @@
readOnly = true;
type = lib.types.uniq lib.types.path;
};
+ user = lib.mkOption {
+ description = "The user to drop privileges to.";
+ default = "quark";
+ type = lib.types.uniq lib.types.str;
+ };
preStart = {
scripts = lib.mkOption {
description = ''
@@ -75,7 +80,7 @@
${pkgs.quark}/bin/quark \
-p 80 \
-d ${config.modules.quark.directory} \
- -u quark \
+ -u ${config.modules.quark.user} \
-g quark \
-i index.html
'';