From 6c1bdaaec4ef47a7ff118ee5c30c3ae10361c609 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 30 Apr 2024 12:56:08 +0300 Subject: [PATCH] Remove options/domains.nix --- hosts/cube/forgejo/default.nix | 2 -- modules/git.nix | 8 +++++--- options/domains.nix | 3 --- 3 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 options/domains.nix diff --git a/hosts/cube/forgejo/default.nix b/hosts/cube/forgejo/default.nix index 0307aad..e9371f7 100644 --- a/hosts/cube/forgejo/default.nix +++ b/hosts/cube/forgejo/default.nix @@ -66,8 +66,6 @@ in systemConfiguration { services.openssh.settings.AcceptEnv = mkForce "COLORTERM GIT_PROTOCOL"; services.forgejo = enabled { - inherit fqdn; - lfs = enabled; mailerPasswordFile = config.secrets.forgejoMailPassword.path; diff --git a/modules/git.nix b/modules/git.nix index 764cce3..70605b6 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -65,7 +65,9 @@ }) (let - gitDomain = self.cube.services.forgejo.fqdn; + gitUrl = self.cube.services.forgejo.settings.server.ROOT_URL; + gitDomain = head (strings.match "https://(.*)/" gitUrl); + mailDomain = head self.disk.mailserver.domains; in homeConfiguration { programs.nushell.configFile.text = mkAfter '' @@ -77,7 +79,7 @@ in homeConfiguration { "RGBCube/" + $user_and_repo } - git remote add origin ("https://${gitDomain}/" + $user_and_repo) + git remote add origin ("${gitUrl}" + $user_and_repo) } ''; @@ -126,7 +128,7 @@ in homeConfiguration { core.sshCommand = "ssh -i ~/.ssh/id"; url."ssh://git@github.com/".insteadOf = "https://github.com/"; - url."ssh://forgejo@${gitDomain}:${head self.cube.openssh.ports}/".insteadOf = "https://${gitDomain}/"; + url."ssh://forgejo@${gitDomain}:${toString (head self.cube.services.openssh.ports)}/".insteadOf = gitUrl; } (mkIf isDesktop { commit.gpgSign = true; tag.gpgSign = true; diff --git a/options/domains.nix b/options/domains.nix deleted file mode 100644 index 076ba91..0000000 --- a/options/domains.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ lib, ... }: { - options.services.forgejo.fqdn = lib.mkValue null; -}