aether/modules/forgejo/options.nix
Kiana Sheibani dedd95c442
fix: resolve conflicting module options
Apparently you aren't allowed to define the same option in multiple
modules, even if the definitions are identical.
2025-04-01 22:36:14 -04:00

59 lines
1.4 KiB
Nix

args@{ config, lib, ... }:
{
imports = [ ../options.nix ];
options.aether = {
forgejo = {
subdomain = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = "git";
description = ''
The subdomain to host the Forgejo instance under.
If null, then Forgejo is hosted at the domain itself.
'';
};
user = lib.mkOption {
type = lib.types.str;
default = "git";
description = ''
The user to run Forgejo with.
'';
};
createUser = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to create the Forgejo user automatically.
'';
};
theme = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
A directory containing a custom Forgejo theme.
This directory should contain two subdirectories `css` and `img`.
'';
};
templates = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
A directory of templates for customizing Forgejo's appearance.
'';
};
};
};
config.assertions = lib.mkIf config.aether.https [
{
assertion = !(builtins.isNull config.aether.acmeEmail);
message = "HTTPS support requires providing a contact email";
}
];
}