From f57f64a880998daa337450a99d78db2bc04ea65f Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 20 Sep 2025 15:57:01 -0600 Subject: [PATCH] gitea file properly linted --- modules/servers/gitea.nix | 132 +++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 65 deletions(-) diff --git a/modules/servers/gitea.nix b/modules/servers/gitea.nix index 3735458..f019606 100644 --- a/modules/servers/gitea.nix +++ b/modules/servers/gitea.nix @@ -10,75 +10,77 @@ let in { options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083; - config.services = { + config = { sops.secrets = lib.mkIf cfg.enable { gitea.sopsFile = ../../secrets/env.yaml; }; - gitea = lib.mkIf cfg.enable { - enable = true; - domain = cfg.host; - rootUrl = cfg.url; - settings = { - session.COOKIE_SECURE = true; - server.HTTP_PORT = cfg.port; - mailer = { - ENABLED = true; - PROTOCOL = "sendmail"; - FROM = config.my.smtpemail; - SENDMAIL_PATH = "${pkgs.msmtp}/bin/msmtp"; + services = { + gitea = lib.mkIf cfg.enable { + enable = true; + domain = cfg.host; + rootUrl = cfg.url; + settings = { + session.COOKIE_SECURE = true; + server.HTTP_PORT = cfg.port; + mailer = { + ENABLED = true; + PROTOCOL = "sendmail"; + FROM = config.my.smtpemail; + SENDMAIL_PATH = "${pkgs.msmtp}/bin/msmtp"; + }; + }; + database = { + socket = config.my.postgresSocket; + type = "postgres"; + createDatabase = false; }; }; - database = { - socket = config.my.postgresSocket; - type = "postgres"; - createDatabase = false; + gitea-actions-runner.instances.ryujinx = { + enable = true; + url = cfg.url; + name = "${config.networking.hostName}-ryujinx"; + tokenFile = config.sops.secrets.gitea.path; + labels = [ + "ubuntu-latest:host" + "ubuntu-20.04:host" + ]; + hostPackages = + let + python3 = pkgs.python3.withPackages ( + ps: + builtins.attrValues { + inherit (ps) + pyyaml + lxml + ; + } + ); + in + builtins.attrValues { + inherit python3; + inherit (pkgs) + bash + coreutils + curl + gawk + gitMinimal + gnused + nodejs + wget + gnutar + gzip + dotnet-sdk_8 + openal + vulkan-loader + libGL + gtk3 + llvm_15 + rcodesign + gh + p7zip + ; + inherit (pkgs.xorg) libX11; + }; }; + nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg); }; - gitea-actions-runner.instances.ryujinx = { - enable = true; - url = cfg.url; - name = "${config.networking.hostName}-ryujinx"; - tokenFile = config.sops.secrets.gitea.path; - labels = [ - "ubuntu-latest:host" - "ubuntu-20.04:host" - ]; - hostPackages = - let - python3 = pkgs.python3.withPackages ( - ps: - builtins.attrValues { - inherit (ps) - pyyaml - lxml - ; - } - ); - in - builtins.attrValues { - inherit python3; - inherit (pkgs) - bash - coreutils - curl - gawk - gitMinimal - gnused - nodejs - wget - gnutar - gzip - dotnet-sdk_8 - openal - vulkan-loader - libGL - gtk3 - llvm_15 - rcodesign - gh - p7zip - ; - inherit (pkgs.xorg) libX11; - }; - }; - nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg); }; }