feat(nixos): deploy Gitea on Pikachu
This commit was merged in pull request #212.
This commit is contained in:
1 parent
c370d635e5
commit
d342370b89
6 files changed
+142
-14
No files matched your search
@@ -0,0 +1,48 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
registry,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.guests.gitea;
|
||||
in
|
||||
{
|
||||
options.guests.gitea.dataPath = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "/srv/gitea";
|
||||
description = "Host path mounted as Gitea's state directory.";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.dataPath != null;
|
||||
message = "guests.gitea.dataPath must point at the host directory that stores Gitea state.";
|
||||
}
|
||||
];
|
||||
|
||||
registry.homepage.${config.networking.hostName}.gitea = {
|
||||
tab = "Apps";
|
||||
section = "Other";
|
||||
name = "Gitea";
|
||||
description = "Git forge";
|
||||
icon = "gitea.png";
|
||||
};
|
||||
|
||||
guests.gitea = {
|
||||
interior.modules.services.gitea = {
|
||||
enable = true;
|
||||
reverseProxyAddress = registry.address.${config.networking.hostName}."reverse-proxy";
|
||||
};
|
||||
|
||||
mounts."/var/lib/gitea" = {
|
||||
directory = cfg.dataPath;
|
||||
owner = config.registry."stable-uid".${config.networking.hostName}.gitea;
|
||||
group = "storage";
|
||||
mode = "2770";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user