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.openssh.settings.AcceptEnv = mkForce "COLORTERM GIT_PROTOCOL";
|
||||||
|
|
||||||
services.forgejo = enabled {
|
services.forgejo = enabled {
|
||||||
|
inherit fqdn;
|
||||||
|
|
||||||
lfs = enabled;
|
lfs = enabled;
|
||||||
|
|
||||||
mailerPasswordFile = config.secrets.forgejoMailPassword.path;
|
mailerPasswordFile = config.secrets.forgejoMailPassword.path;
|
||||||
|
|
|
@ -28,7 +28,7 @@ in systemConfiguration {
|
||||||
};
|
};
|
||||||
|
|
||||||
mailserver = enabled {
|
mailserver = enabled {
|
||||||
inherit fqdn;
|
inherit domain fqdn;
|
||||||
|
|
||||||
domains = [ domain ];
|
domains = [ domain ];
|
||||||
certificateScheme = "acme";
|
certificateScheme = "acme";
|
||||||
|
|
|
@ -65,9 +65,8 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
(let
|
(let
|
||||||
inherit (self.disk.networking) domain;
|
gitDomain = self.cube.services.forgejo.fqdn;
|
||||||
|
mailDomain = self.disk.mailserver.domain;
|
||||||
gitHost = self.cube.networking.hostName;
|
|
||||||
in homeConfiguration {
|
in homeConfiguration {
|
||||||
programs.nushell.configFile.text = mkAfter ''
|
programs.nushell.configFile.text = mkAfter ''
|
||||||
# Sets the remote origin to the specified user and repository on my git instance
|
# Sets the remote origin to the specified user and repository on my git instance
|
||||||
|
@ -78,7 +77,7 @@ in homeConfiguration {
|
||||||
"RGBCube/" + $user_and_repo
|
"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;
|
package = pkgs.gitFull;
|
||||||
|
|
||||||
userName = "RGBCube";
|
userName = "RGBCube";
|
||||||
userEmail = "git@${domain}";
|
userEmail = "git@${mailDomain}";
|
||||||
|
|
||||||
lfs = enabled;
|
lfs = enabled;
|
||||||
|
|
||||||
|
@ -125,9 +124,9 @@ in homeConfiguration {
|
||||||
# https://bernsteinbear.com/git
|
# https://bernsteinbear.com/git
|
||||||
alias.recent = "! git branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\" | head -10";
|
alias.recent = "! git branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\" | head -10";
|
||||||
|
|
||||||
core.sshCommand = "ssh -i ~/.ssh/id";
|
core.sshCommand = "ssh -i ~/.ssh/id";
|
||||||
url."ssh://git@github.com/".insteadOf = "https://github.com/";
|
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 {
|
} (mkIf isDesktop {
|
||||||
commit.gpgSign = true;
|
commit.gpgSign = true;
|
||||||
tag.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