cleanup and change gitlab domain
This commit is contained in:
parent
a88e630ad0
commit
eb77443d9c
2 changed files with 19 additions and 50 deletions
|
@ -11,7 +11,7 @@ anki.cy7.sh {
|
||||||
}
|
}
|
||||||
|
|
||||||
git.cy7.sh, git.cything.io {
|
git.cy7.sh, git.cything.io {
|
||||||
reverse_proxy localhost:3000
|
reverse_proxy unix//run/gitlab/gitlab-workhorse.socket
|
||||||
}
|
}
|
||||||
|
|
||||||
rss.cything.io {
|
rss.cything.io {
|
||||||
|
@ -60,7 +60,3 @@ pad.cything.io {
|
||||||
red.cything.io {
|
red.cything.io {
|
||||||
reverse_proxy localhost:8087
|
reverse_proxy localhost:8087
|
||||||
}
|
}
|
||||||
|
|
||||||
gitlab.cything.io {
|
|
||||||
reverse_proxy unix//run/gitlab/gitlab-workhorse.socket
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
{
|
||||||
let
|
|
||||||
fake-gitea = pkgs.writeShellScriptBin "gitea" ''
|
|
||||||
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" /usr/local/bin/gitea $@"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in {
|
|
||||||
disabledModules = [ "services/web-servers/caddy/default.nix" ];
|
disabledModules = [ "services/web-servers/caddy/default.nix" ];
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
|
@ -28,24 +22,24 @@ in {
|
||||||
"wireguard/pskphone" = { };
|
"wireguard/pskphone" = { };
|
||||||
"miniflux" = { };
|
"miniflux" = { };
|
||||||
"gitlab/root" = {
|
"gitlab/root" = {
|
||||||
owner = config.users.users.gitlab.name;
|
owner = config.users.users.git.name;
|
||||||
group = config.users.users.gitlab.group;
|
group = config.users.users.git.group;
|
||||||
};
|
};
|
||||||
"gitlab/secret" = {
|
"gitlab/secret" = {
|
||||||
owner = config.users.users.gitlab.name;
|
owner = config.users.users.git.name;
|
||||||
group = config.users.users.gitlab.group;
|
group = config.users.users.git.group;
|
||||||
};
|
};
|
||||||
"gitlab/jws" = {
|
"gitlab/jws" = {
|
||||||
owner = config.users.users.gitlab.name;
|
owner = config.users.users.git.name;
|
||||||
group = config.users.users.gitlab.group;
|
group = config.users.users.git.group;
|
||||||
};
|
};
|
||||||
"gitlab/db" = {
|
"gitlab/db" = {
|
||||||
owner = config.users.users.gitlab.name;
|
owner = config.users.users.git.name;
|
||||||
group = config.users.users.gitlab.group;
|
group = config.users.users.git.group;
|
||||||
};
|
};
|
||||||
"gitlab/otp" = {
|
"gitlab/otp" = {
|
||||||
owner = config.users.users.gitlab.name;
|
owner = config.users.users.git.name;
|
||||||
group = config.users.users.gitlab.group;
|
group = config.users.users.git.group;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -93,11 +87,6 @@ in {
|
||||||
users.users.root.openssh.authorizedKeys.keys =
|
users.users.root.openssh.authorizedKeys.keys =
|
||||||
[ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux" ];
|
[ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux" ];
|
||||||
|
|
||||||
users.users.git = {
|
|
||||||
isNormalUser = true;
|
|
||||||
packages = [ fake-gitea ];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
@ -144,28 +133,7 @@ in {
|
||||||
package = pkgs.postgresql_17;
|
package = pkgs.postgresql_17;
|
||||||
enableTCPIP = true;
|
enableTCPIP = true;
|
||||||
ensureDatabases = [
|
ensureDatabases = [
|
||||||
"forgejo"
|
|
||||||
"freshrss"
|
|
||||||
"hedgedoc"
|
"hedgedoc"
|
||||||
"linkwarden"
|
|
||||||
];
|
|
||||||
ensureUsers = [
|
|
||||||
{
|
|
||||||
name = "forgejo";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "linkwarden";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "freshrss";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "hedgedoc";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
authentication = lib.mkForce ''
|
authentication = lib.mkForce ''
|
||||||
local all all trust
|
local all all trust
|
||||||
|
@ -357,8 +325,13 @@ in {
|
||||||
services.gitlab = {
|
services.gitlab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
https = true;
|
https = true;
|
||||||
host = "gitlab.cything.io";
|
host = "git.cything.io";
|
||||||
port = 443;
|
user = "git"; # so that you can ssh with git@git.cything.io
|
||||||
|
group = "git";
|
||||||
|
port = 443; # this *not* the port gitlab will run on
|
||||||
|
puma.workers = 0; # https://docs.gitlab.com/omnibus/settings/memory_constrained_envs.html#optimize-puma
|
||||||
|
sidekiq.concurrency = 10;
|
||||||
|
databaseUsername = "git"; # needs to be same as user
|
||||||
initialRootEmail = "hi@cything.io";
|
initialRootEmail = "hi@cything.io";
|
||||||
initialRootPasswordFile = "/run/secrets/gitlab/root";
|
initialRootPasswordFile = "/run/secrets/gitlab/root";
|
||||||
secrets = {
|
secrets = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue