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:
parent
db4696fc5f
commit
e0f6493d7f
4 changed files with 17 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -28,7 +28,7 @@ in systemConfiguration {
|
|||
};
|
||||
|
||||
mailserver = enabled {
|
||||
inherit fqdn;
|
||||
inherit domain fqdn;
|
||||
|
||||
domains = [ domain ];
|
||||
certificateScheme = "acme";
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -125,9 +124,9 @@ in homeConfiguration {
|
|||
# https://bernsteinbear.com/git
|
||||
alias.recent = "! git branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\" | head -10";
|
||||
|
||||
core.sshCommand = "ssh -i ~/.ssh/id";
|
||||
url."ssh://git@github.com/".insteadOf = "https://github.com/";
|
||||
url."ssh://forgejo@${domain}:2222/".insteadOf = "https://git.${gitHost}/";
|
||||
core.sshCommand = "ssh -i ~/.ssh/id";
|
||||
url."ssh://git@github.com/".insteadOf = "https://github.com/";
|
||||
url."ssh://forgejo@${gitDomain}:2222/".insteadOf = "https://${gitDomain}/";
|
||||
} (mkIf isDesktop {
|
||||
commit.gpgSign = true;
|
||||
tag.gpgSign = true;
|
||||
|
|
7
options/domains.nix
Normal file
7
options/domains.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ lib, ... }: {
|
||||
options = {
|
||||
mailserver.domain = lib.mkValue null;
|
||||
|
||||
services.forgejo.fqdn = lib.mkValue null;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue