mirror of
https://codeberg.org/ultra/nixos-dotfiles.git
synced 2024-11-09 02:13:08 +02:00
13d7ab12d0
Signed-off-by: Alex Stan <90788596+Ultra980@users.noreply.github.com> git merge is ez with meld
46 lines
1 KiB
Nix
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 );
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|