diff --git a/machines/configuration.nix b/machines/configuration.nix index f62f7bd..3939721 100644 --- a/machines/configuration.nix +++ b/machines/configuration.nix @@ -94,4 +94,12 @@ in ./lucia/hardware_configuration.nix ]; }; + + gitea = nixosSystem { + system = "x86_64-linux"; + specialArgs.inputs = inputs; + modules = makeMicroVM "gitea" "10.0.0.6" [ + ./gitea/configuration.nix + ]; + }; } diff --git a/machines/gitea/configuration.nix b/machines/gitea/configuration.nix new file mode 100644 index 0000000..2ea0141 --- /dev/null +++ b/machines/gitea/configuration.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, inputs, ... }: + +with lib; + +{ + #sops.defaultSopsFile = ./secrets.yaml; + + networking = { + hostName = mkDefault "gitea"; + useDHCP = false; + nameservers = [ "1.1.1.1" ]; + }; + + imports = [ + ../modules/malobeo_user.nix + ../modules/sshd.nix + ../modules/minimal_tools.nix + ../modules/autoupdate.nix + ]; + + services.gitea = { + enable = true; + appName = "malobeo git instance"; + + settings.server = { + DOMAIN = "git.malobeo.org"; + HTTP_PORT = 3001; + SSH_PORT = 22; + ROOT_URL = "https://git.malobeo.org/"; + }; + }; + + networking.firewall.allowedTCPPorts = [ 3001 ]; + + system.stateVersion = "22.11"; # Did you read the comment? +} +