mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/gitea: add lfs options
This commit is contained in:
parent
6c258a7c21
commit
31ce2636a4
1 changed files with 23 additions and 1 deletions
|
@ -189,6 +189,20 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lfs = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enables git-lfs support.";
|
||||||
|
};
|
||||||
|
|
||||||
|
contentDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "${cfg.stateDir}/data/lfs";
|
||||||
|
description = "Where to store LFS files.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
appName = mkOption {
|
appName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "gitea: Gitea Service";
|
default = "gitea: Gitea Service";
|
||||||
|
@ -353,6 +367,11 @@ in
|
||||||
(mkIf (!cfg.ssh.enable) {
|
(mkIf (!cfg.ssh.enable) {
|
||||||
DISABLE_SSH = true;
|
DISABLE_SSH = true;
|
||||||
})
|
})
|
||||||
|
(mkIf cfg.lfs.enable {
|
||||||
|
LFS_START_SERVER = true;
|
||||||
|
LFS_CONTENT_PATH = cfg.lfs.contentDir;
|
||||||
|
})
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
session = {
|
session = {
|
||||||
|
@ -406,6 +425,9 @@ in
|
||||||
"d '${cfg.dump.backupDir}' 0750 ${cfg.user} gitea - -"
|
"d '${cfg.dump.backupDir}' 0750 ${cfg.user} gitea - -"
|
||||||
"z '${cfg.dump.backupDir}' 0750 ${cfg.user} gitea - -"
|
"z '${cfg.dump.backupDir}' 0750 ${cfg.user} gitea - -"
|
||||||
"Z '${cfg.dump.backupDir}' - ${cfg.user} gitea - -"
|
"Z '${cfg.dump.backupDir}' - ${cfg.user} gitea - -"
|
||||||
|
"d '${cfg.lfs.contentDir}' 0750 ${cfg.user} gitea - -"
|
||||||
|
"z '${cfg.lfs.contentDir}' 0750 ${cfg.user} gitea - -"
|
||||||
|
"Z '${cfg.lfs.contentDir}' - ${cfg.user} gitea - -"
|
||||||
"d '${cfg.repositoryRoot}' 0750 ${cfg.user} gitea - -"
|
"d '${cfg.repositoryRoot}' 0750 ${cfg.user} gitea - -"
|
||||||
"z '${cfg.repositoryRoot}' 0750 ${cfg.user} gitea - -"
|
"z '${cfg.repositoryRoot}' 0750 ${cfg.user} gitea - -"
|
||||||
"Z '${cfg.repositoryRoot}' - ${cfg.user} gitea - -"
|
"Z '${cfg.repositoryRoot}' - ${cfg.user} gitea - -"
|
||||||
|
@ -494,7 +516,7 @@ in
|
||||||
RuntimeDirectory = "gitea";
|
RuntimeDirectory = "gitea";
|
||||||
RuntimeDirectoryMode = "0755";
|
RuntimeDirectoryMode = "0755";
|
||||||
# Access write directories
|
# Access write directories
|
||||||
ReadWritePaths = [ cfg.dump.backupDir cfg.repositoryRoot cfg.stateDir ];
|
ReadWritePaths = [ cfg.dump.backupDir cfg.repositoryRoot cfg.stateDir cfg.lfs.contentDir ];
|
||||||
UMask = "0027";
|
UMask = "0027";
|
||||||
# Capabilities
|
# Capabilities
|
||||||
CapabilityBoundingSet = "";
|
CapabilityBoundingSet = "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue