summary refs log tree commit diff
path: root/nixos/modules/services/misc/gitea.nix
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2018-03-18 10:11:02 +0100
committerElis Hirwing <elis@hirwing.se>2018-03-18 10:11:02 +0100
commitfa76c9a38554731933d53a41e741266f43f617d0 (patch)
tree82319eecb899fcf5e804f6cfb0198a82b278b026 /nixos/modules/services/misc/gitea.nix
parent2d28d19edd73850cc2de9455ca8a49d0c23c0124 (diff)
downloadnixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.tar
nixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.tar.gz
nixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.tar.bz2
nixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.tar.lz
nixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.tar.xz
nixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.tar.zst
nixpkgs-fa76c9a38554731933d53a41e741266f43f617d0.zip
gitea: fix usage over ssh
Using gitea over ssh had two isses:
 1. No shell was set for the user
 2. Gitea tried to write logs to
 /nix/store/x83q12kyd9gw1pay036dxz2dq0apf17h-gitea-1.3.2-bin/log when
 serving the ssh usage.
Diffstat (limited to 'nixos/modules/services/misc/gitea.nix')
-rw-r--r--nixos/modules/services/misc/gitea.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix
index 458d0087dbd..63e976ae566 100644
--- a/nixos/modules/services/misc/gitea.nix
+++ b/nixos/modules/services/misc/gitea.nix
@@ -40,6 +40,10 @@ let
     SECRET_KEY = #secretkey#
     INSTALL_LOCK = true
 
+    [log]
+    ROOT_PATH = ${cfg.log.rootPath}
+    LEVEL = ${cfg.log.level}
+
     ${cfg.extraConfig}
   '';
 in
@@ -65,6 +69,19 @@ in
         description = "gitea data directory.";
       };
 
+      log = {
+        rootPath = mkOption {
+          default = "${cfg.stateDir}/log";
+          type = types.str;
+          description = "Root path for log files.";
+        };
+        level = mkOption {
+          default = "Trace";
+          type = types.enum [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ];
+          description = "General log level.";
+        };
+      };
+
       user = mkOption {
         type = types.str;
         default = "gitea";
@@ -287,6 +304,7 @@ in
         description = "Gitea Service";
         home = cfg.stateDir;
         createHome = true;
+        useDefaultShell = true;
       };
     };