nixos-dotfiles/containers/forgejo/forgejo.nix
Alex Stan 13d7ab12d0 some stuff and reorganisation
Signed-off-by: Alex Stan <90788596+Ultra980@users.noreply.github.com>

git merge is ez with meld
2023-09-19 17:45:56 +03:00

46 lines
1 KiB
Nix

{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.forgejo;
in {
options.services.forgejo = {
enable = mkEnableOption (mdDoc "Enable forgejo");
hostAddress = mkOption {
type = types.str;
default = "192.168.0.221";
};
localAddress = mkOption {
type = types.str;
default = "192.168.0.222";
};
stateDir = mkOption {
type = types.str;
default = "/var/lib/forgejo";
};
package = mkOption {
type = types.package;
default = pkgs.forgejo;
};
};
config = mkIf cfg.enable {
containers = {
forgejo = {
autoStart = true;
privateNetwork = true;
hostAddress = cfg.hostAddress;
localAddress = cfg.localAddress;
config = ( cfg: { config, pkgs, ... }: {
services.gitea = cfg; /*{
enable = true;
package = pkgs.forgejo;
stateDir = /var/lib/forgejo;
}; */
networking.useHostResolvConf = mkForce false;
} cfg );
};
};
};
}