Add forgejo

This commit is contained in:
muon 2025-01-25 14:27:23 +00:00
parent 194c838432
commit be802886d6
4 changed files with 25 additions and 11 deletions

View file

@ -27,6 +27,7 @@ in {
mods.server.astral.enable = false; mods.server.astral.enable = false;
mods.server.astral.autoStart = false; mods.server.astral.autoStart = false;
mods.docker.enable = true;
mods.docker.media.enable = false; mods.docker.media.enable = false;
mods.server.sync.enable = true; mods.server.sync.enable = true;

View file

@ -13,6 +13,9 @@
# Podcasts # Podcasts
gpodder gpodder
# Interactive
bottles
]; ];
programs.mpv.enable = true; programs.mpv.enable = true;
}; };

View file

@ -1,7 +1,5 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
imports = [ imports = [ ./media.nix ];
./media.nix
];
options.mods.docker = { options.mods.docker = {
enable = lib.mkEnableOption { enable = lib.mkEnableOption {
@ -14,19 +12,19 @@
environment.systemPackages = [ environment.systemPackages = [
pkgs.arion pkgs.arion
# Do install the docker CLI to talk to podman. # Do install the docker CLI to talk to podman.
# Not needed when virtualisation.docker.enable = true; # Not needed when virtualisation.docker.enable = true;
pkgs.docker-client pkgs.docker-client
]; ];
# Arion works with Docker, but for NixOS-based containers, you need Podman # Arion works with Docker, but for NixOS-based containers, you need Podman
# since NixOS 21.05. # since NixOS 21.05.
virtualisation.docker.enable = false; virtualisation.docker.enable = true;
virtualisation.podman.enable = true; # virtualisation.podman.enable = true;
virtualisation.podman.dockerSocket.enable = true; # virtualisation.podman.dockerSocket.enable = true;
virtualisation.podman.defaultNetwork.dnsname.enable = true; # virtualisation.podman.defaultNetwork.dnsname.enable = true;
# Use your username instead of `myuser` # Use your username instead of `myuser`
users.extraUsers.${config.mods.user.name}.extraGroups = ["podman"]; users.extraUsers.${config.mods.user.name}.extraGroups = [ "podman" ];
}; };
} }

View file

@ -12,5 +12,17 @@ in with lib; {
}; };
}; };
config = mkIf cfg.enable { services.forgejo = { enable = true; }; }; config = mkIf cfg.enable {
services.forgejo = {
enable = true;
stateDir = "/srv/forgejo";
lfs.enable = true;
settings.server = {
HTTP_ADDR = "0.0.0.0";
HTTP_PORT = port;
SSH_PORT = 91722;
DOMAIN = "git.muon.host";
};
};
};
} }