This commit is contained in:
Histausse 2023-04-17 21:56:36 +02:00
parent 4bd0715d27
commit 7d00638c04
2 changed files with 7 additions and 14 deletions

View file

@ -16,9 +16,14 @@ Modules can be imported with `fetchurl` like this:
Where the value of `sha256` can be found using `nix-prefetch-url` like this:
```
```
# nix-prefetch-url https://git.mineau.eu/histausse/nixos-modules/raw/branch/master/default.nix
path is '/nix/store/jrypv02r1c2i05iw8q0y1h386mjrp6da-default.nix'
0r7rj0in3f5m171sx0savbynijcj3bfnnm9zi60l1l4v5l6dgv78
```
To test a derivation:
```
# nix repl '<nixpkgs/nixos>'
```

View file

@ -6,14 +6,6 @@ let
in
{
options.services.ppGitea = {
# baseModule = mkOption {
# type = types.str;
# default = builtins.fetchurl {
# url = "https://git.mineau.eu/histausse/nixos-modules/raw/branch/master/base.nix";
# sha256 = "1iiz2igsklw8nhmng3gxpjgy47n9hivzlrpwmxy2rw8aziax1cgz";
# };
# description = "The base module to use";
# };
domain = mkOption {
type = types.str;
default = "git.${cfgBase.domainName}";
@ -35,16 +27,12 @@ in
};
};
# imports = [
# cfg.baseModule
# ];
config = {
services.gitea.appName = "git";
services.gitea.stateDir = "/var/lib/gitea"; # default value
services.gitea.enable = true;
services.gitea.rootUrl = "https://git.${cfg.domain}/";
services.gitea.rootUrl = "https://${cfg.domain}/";
services.gitea.settings.service.DISABLE_REGISTRATION = lib.mkForce cfg.disableRegistration; # Only set after initial deploy
services.gitea.settings.session.COOKIE_SECURE = lib.mkForce true; # Why do I need to override this???
services.gitea.lfs.enable = true;