feat: switch git domain
This commit is contained in:
parent
6ecd282976
commit
5fc8b856e7
|
@ -21,7 +21,7 @@
|
||||||
nextcloud = uidGid 213;
|
nextcloud = uidGid 213;
|
||||||
redis-nextcloud = uidGid 214;
|
redis-nextcloud = uidGid 214;
|
||||||
radicale = uidGid 215;
|
radicale = uidGid 215;
|
||||||
forgejo = uidGid 215;
|
git = uidGid 215;
|
||||||
vaultwarden = uidGid 215;
|
vaultwarden = uidGid 215;
|
||||||
redis-paperless = uidGid 216;
|
redis-paperless = uidGid 216;
|
||||||
microvm = uidGid 217;
|
microvm = uidGid 217;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
forgejoDomain = "git.${config.secrets.secrets.global.domains.web}";
|
forgejoDomain = "forge.${config.secrets.secrets.global.domains.web}";
|
||||||
in {
|
in {
|
||||||
age.secrets.resticpasswd = {
|
age.secrets.resticpasswd = {
|
||||||
generator.script = "alnum";
|
generator.script = "alnum";
|
||||||
|
@ -42,6 +42,14 @@ in {
|
||||||
# Recommended by forgejo: https://forgejo.org/docs/latest/admin/recommendations/#git-over-ssh
|
# Recommended by forgejo: https://forgejo.org/docs/latest/admin/recommendations/#git-over-ssh
|
||||||
services.openssh.settings.AcceptEnv = "GIT_PROTOCOL";
|
services.openssh.settings.AcceptEnv = "GIT_PROTOCOL";
|
||||||
|
|
||||||
|
users.groups.git = {};
|
||||||
|
users.users.git = {
|
||||||
|
isSystemUser = true;
|
||||||
|
useDefaultShell = true;
|
||||||
|
group = "git";
|
||||||
|
home = config.services.forgejo.stateDir;
|
||||||
|
};
|
||||||
|
|
||||||
wireguard.elisabeth = {
|
wireguard.elisabeth = {
|
||||||
client.via = "elisabeth";
|
client.via = "elisabeth";
|
||||||
firewallRuleForNode.elisabeth.allowedTCPPorts = [config.services.forgejo.settings.server.HTTP_PORT];
|
firewallRuleForNode.elisabeth.allowedTCPPorts = [config.services.forgejo.settings.server.HTTP_PORT];
|
||||||
|
@ -51,15 +59,15 @@ in {
|
||||||
environment.persistence."/panzer".directories = [
|
environment.persistence."/panzer".directories = [
|
||||||
{
|
{
|
||||||
directory = config.services.forgejo.stateDir;
|
directory = config.services.forgejo.stateDir;
|
||||||
user = "forgejo";
|
user = "git";
|
||||||
group = "forgejo";
|
group = "git";
|
||||||
mode = "0700";
|
mode = "0700";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
age.secrets.forgejo-mailer-passwd = {
|
age.secrets.forgejo-mailer-passwd = {
|
||||||
rekeyFile = config.node.secretsDir + "/forgejo-passwd.age";
|
rekeyFile = config.node.secretsDir + "/forgejo-passwd.age";
|
||||||
owner = "forgejo";
|
owner = "git";
|
||||||
group = "forgejo";
|
group = "git";
|
||||||
mode = "0700";
|
mode = "0700";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,6 +75,8 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
# TODO db backups
|
# TODO db backups
|
||||||
# dump.enable = true;
|
# dump.enable = true;
|
||||||
|
user = "git";
|
||||||
|
group = "git";
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
mailerPasswordFile = config.age.secrets.forgejo-mailer-passwd.path;
|
mailerPasswordFile = config.age.secrets.forgejo-mailer-passwd.path;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -150,7 +150,7 @@ in {
|
||||||
};
|
};
|
||||||
systems.oauth2.forgejo = {
|
systems.oauth2.forgejo = {
|
||||||
displayName = "Forgejo";
|
displayName = "Forgejo";
|
||||||
originUrl = "https://git.${config.secrets.secrets.global.domains.web}/";
|
originUrl = "https://forge.${config.secrets.secrets.global.domains.web}/";
|
||||||
basicSecretFile = config.age.secrets.oauth2-forgejo.path;
|
basicSecretFile = config.age.secrets.oauth2-forgejo.path;
|
||||||
scopeMaps."forgejo.access" = ["openid" "email" "profile"];
|
scopeMaps."forgejo.access" = ["openid" "email" "profile"];
|
||||||
allowInsecureClientDisablePkce = true;
|
allowInsecureClientDisablePkce = true;
|
||||||
|
|
18
flake.lock
18
flake.lock
|
@ -1730,8 +1730,7 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks_5",
|
"pre-commit-hooks": "pre-commit-hooks_5",
|
||||||
"spicetify-nix": "spicetify-nix",
|
"spicetify-nix": "spicetify-nix",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"systems": "systems_13",
|
"systems": "systems_13"
|
||||||
"templates": "templates"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
@ -2019,21 +2018,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"templates": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696855554,
|
|
||||||
"narHash": "sha256-9VYXESOCqGGZ8HHl4LN51k+74Kf5Nf9czoqqIN7IEo0=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "a6c35c2af9f26599e81002630329054b99efbe79",
|
|
||||||
"revCount": 11,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.lel.lol/patrick/nix-templates.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.lel.lol/patrick/nix-templates.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
templates.url = "git+https://git.lel.lol/patrick/nix-templates.git";
|
#templates.url = "git+https://forge.lel.lol/patrick/nix-templates.git";
|
||||||
|
|
||||||
nix-topology.url = "github:oddlama/nix-topology";
|
nix-topology.url = "github:oddlama/nix-topology";
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
domainOf = hostName: let
|
domainOf = hostName: let
|
||||||
domains = {
|
domains = {
|
||||||
adguardhome = "adguardhome";
|
adguardhome = "adguardhome";
|
||||||
forgejo = "git";
|
forgejo = "forge";
|
||||||
immich = "immich";
|
immich = "immich";
|
||||||
nextcloud = "nc";
|
nextcloud = "nc";
|
||||||
ollama = "ollama";
|
ollama = "ollama";
|
||||||
|
|
Loading…
Reference in a new issue