From 082dabb1af107ab0c8a0e9219c231ffe1dba3de9 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Fri, 28 Feb 2025 00:41:20 +0300 Subject: [PATCH] feat: don't hardcode urls --- modules/common/git.nix | 8 +++----- modules/common/jujutsu.nix | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/common/git.nix b/modules/common/git.nix index 8f41cd6..aa8cf9d 100644 --- a/modules/common/git.nix +++ b/modules/common/git.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: let +{ self, config, lib, pkgs, ... }: let inherit (lib) head mkAfter enabled merge mkIf; inherit (lib.strings) match; in { @@ -77,8 +77,7 @@ in { (homeArgs: let homeConfig = homeArgs.config; - # TODO: gitUrl = self.cube.services.forgejo.settings.server.ROOT_URL; - gitUrl = "https://git.rgbcu.be/"; + gitUrl = self.best.services.forgejo.settings.server.ROOT_URL; gitDomain = head <| match "https://(.*)/" gitUrl; in { programs.nushell.configFile.text = mkAfter /* nu */ '' @@ -137,8 +136,7 @@ in { } <| mkIf config.isDesktop { core.sshCommand = "ssh -i ~/.ssh/id"; url."ssh://git@github.com/".insteadOf = "https://github.com/"; - # TODO: url."ssh://forgejo@${gitDomain}:${toString (head self.cube.services.openssh.ports)}/".insteadOf = gitUrl; - url."ssh://forgejo@${gitDomain}:2222/".insteadOf = gitUrl; + url."ssh://forgejo@${gitDomain}:${toString self.cube.services.forgejo.settings.server.SSH_PORT}/".insteadOf = gitUrl; commit.gpgSign = true; tag.gpgSign = true; diff --git a/modules/common/jujutsu.nix b/modules/common/jujutsu.nix index 50cd5cf..dabf6cb 100644 --- a/modules/common/jujutsu.nix +++ b/modules/common/jujutsu.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }: let - inherit (lib) enabled getExe; +{ self, config, lib, pkgs, ... }: let + inherit (lib) enabled getExe head; in { environment.systemPackages = [ pkgs.difftastic @@ -15,8 +15,7 @@ in { programs.jujutsu = enabled { settings = let - # TODO: mailDomain = head self.disk.mailserver.domains; - mailDomain = "rgbcu.be"; + mailDomain = head self.disk.mailserver.domains; in { user.name = "RGBCube"; user.email = "git@${mailDomain}";