1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Actually fix git schenanigans

This commit is contained in:
RGBCube 2024-04-30 12:56:08 +03:00
parent db4696fc5f
commit e0f6493d7f
No known key found for this signature in database
4 changed files with 17 additions and 9 deletions

View file

@ -66,6 +66,8 @@ in systemConfiguration {
services.openssh.settings.AcceptEnv = mkForce "COLORTERM GIT_PROTOCOL";
services.forgejo = enabled {
inherit fqdn;
lfs = enabled;
mailerPasswordFile = config.secrets.forgejoMailPassword.path;

View file

@ -28,7 +28,7 @@ in systemConfiguration {
};
mailserver = enabled {
inherit fqdn;
inherit domain fqdn;
domains = [ domain ];
certificateScheme = "acme";

View file

@ -65,9 +65,8 @@
})
(let
inherit (self.disk.networking) domain;
gitHost = self.cube.networking.hostName;
gitDomain = self.cube.services.forgejo.fqdn;
mailDomain = self.disk.mailserver.domain;
in homeConfiguration {
programs.nushell.configFile.text = mkAfter ''
# Sets the remote origin to the specified user and repository on my git instance
@ -78,7 +77,7 @@ in homeConfiguration {
"RGBCube/" + $user_and_repo
}
git remote add origin ("https://${gitHost}/" + $user_and_repo)
git remote add origin ("https://${gitDomain}/" + $user_and_repo)
}
'';
@ -86,7 +85,7 @@ in homeConfiguration {
package = pkgs.gitFull;
userName = "RGBCube";
userEmail = "git@${domain}";
userEmail = "git@${mailDomain}";
lfs = enabled;
@ -127,7 +126,7 @@ in homeConfiguration {
core.sshCommand = "ssh -i ~/.ssh/id";
url."ssh://git@github.com/".insteadOf = "https://github.com/";
url."ssh://forgejo@${domain}:2222/".insteadOf = "https://git.${gitHost}/";
url."ssh://forgejo@${gitDomain}:2222/".insteadOf = "https://${gitDomain}/";
} (mkIf isDesktop {
commit.gpgSign = true;
tag.gpgSign = true;

7
options/domains.nix Normal file
View file

@ -0,0 +1,7 @@
{ lib, ... }: {
options = {
mailserver.domain = lib.mkValue null;
services.forgejo.fqdn = lib.mkValue null;
};
}