From 427db406c6bac511542ef95bffafb921f4c6b5ed Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 10 Nov 2024 21:59:30 +0100 Subject: [PATCH] cluster/services/gitlab: drop --- cluster/services/gitlab/default.nix | 10 --- cluster/services/gitlab/host.nix | 94 ----------------------- secrets.nix | 7 -- secrets/gitlab-db-credentials.age | Bin 758 -> 0 bytes secrets/gitlab-initial-root-password.age | 12 --- secrets/gitlab-openid-secret.age | 11 --- secrets/gitlab-secret-db.age | Bin 609 -> 0 bytes secrets/gitlab-secret-jws.age | Bin 3837 -> 0 bytes secrets/gitlab-secret-otp.age | 14 ---- secrets/gitlab-secret-secret.age | Bin 666 -> 0 bytes 10 files changed, 148 deletions(-) delete mode 100644 cluster/services/gitlab/default.nix delete mode 100644 cluster/services/gitlab/host.nix delete mode 100644 secrets/gitlab-db-credentials.age delete mode 100644 secrets/gitlab-initial-root-password.age delete mode 100644 secrets/gitlab-openid-secret.age delete mode 100644 secrets/gitlab-secret-db.age delete mode 100644 secrets/gitlab-secret-jws.age delete mode 100644 secrets/gitlab-secret-otp.age delete mode 100644 secrets/gitlab-secret-secret.age diff --git a/cluster/services/gitlab/default.nix b/cluster/services/gitlab/default.nix deleted file mode 100644 index fd1c416..0000000 --- a/cluster/services/gitlab/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ depot, ... }: - -{ - services.gitlab = { - nodes.host = [ "VEGAS" ]; - nixos.host = ./host.nix; - }; - - dns.records.git.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ]; -} diff --git a/cluster/services/gitlab/host.nix b/cluster/services/gitlab/host.nix deleted file mode 100644 index 85f548c..0000000 --- a/cluster/services/gitlab/host.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ cluster, config, lib, depot, ... }: - -let - inherit (depot.lib.meta) domain adminEmail; - - patroni = cluster.config.links.patroni-pg-access; - - mkSecret = name: { - owner = "gitlab"; - group = "gitlab"; - mode = "0400"; - file = ../../../secrets/${name}.age; - }; - - secrets = lib.mapAttrs (_: v: v.path) config.age.secrets; - - cfg = config.services.gitlab; -in - -{ - age.secrets = lib.flip lib.genAttrs mkSecret [ - "gitlab-db-credentials" - "gitlab-initial-root-password" - "gitlab-openid-secret" - "gitlab-secret-db" - "gitlab-secret-jws" - "gitlab-secret-otp" - "gitlab-secret-secret" - ]; - - services.gitlab = { - enable = true; - https = true; - host = "git.${domain}"; - port = 443; - - databaseCreateLocally = false; - databaseHost = patroni.ipv4; - extraDatabaseConfig = { inherit (patroni) port; }; - databaseUsername = "gitlab"; - databasePasswordFile = secrets.gitlab-db-credentials; - - initialRootEmail = adminEmail; - - statePath = "/srv/storage/private/gitlab/state"; - - smtp = { - enable = true; - inherit domain; - }; - - initialRootPasswordFile = secrets.gitlab-initial-root-password; - - secrets = with secrets; { - dbFile = gitlab-secret-db; - jwsFile = gitlab-secret-jws; - otpFile = gitlab-secret-otp; - secretFile = gitlab-secret-secret; - }; - - extraConfig = { - omniauth = { - enabled = true; - auto_sign_in_with_provider = "openid_connect"; - allow_single_sign_on = ["openid_connect"]; - block_auto_created_users = false; - providers = [ - - { - name = "openid_connect"; - label = "Private Void Account"; - args = { - name = "openid_connect"; - scope = ["openid" "profile"]; - response_type = "code"; - issuer = "https://login.${domain}/auth/realms/master"; - discovery = true; - client_auth_method = "query"; - uid_field = "preferred_username"; - client_options = { - identifier = "net.privatevoid.git2"; - secret = { _secret = secrets.gitlab-openid-secret; }; - redirect_uri = "https://${cfg.host}/users/auth/openid_connect/callback"; - }; - }; - } - - ]; - }; - }; - }; - - services.nginx.virtualHosts."${cfg.host}" = depot.lib.nginx.vhosts.proxy "http://unix:/run/gitlab/gitlab-workhorse.socket"; -} diff --git a/secrets.nix b/secrets.nix index 3e1c920..a2225f1 100644 --- a/secrets.nix +++ b/secrets.nix @@ -16,13 +16,6 @@ in with hosts; "cluster/services/storage/secrets/garage-rpc-secret.age".publicKeys = max ++ map systemKeys [ grail VEGAS prophet ]; "cluster/services/storage/secrets/storage-box-credentials.age".publicKeys = max ++ map systemKeys [ grail VEGAS prophet ]; "secrets/dovecot-ldap-token.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-db-credentials.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-initial-root-password.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-openid-secret.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-secret-db.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-secret-jws.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-secret-otp.age".publicKeys = max ++ map systemKeys [ VEGAS ]; - "secrets/gitlab-secret-secret.age".publicKeys = max ++ map systemKeys [ VEGAS ]; "secrets/hyprspace-key-checkmate.age".publicKeys = max ++ map systemKeys [ checkmate ]; "secrets/hyprspace-key-grail.age".publicKeys = max ++ map systemKeys [ grail ]; "secrets/hyprspace-key-thunderskin.age".publicKeys = max ++ map systemKeys [ thunderskin ]; diff --git a/secrets/gitlab-db-credentials.age b/secrets/gitlab-db-credentials.age deleted file mode 100644 index 485ac1590fe9326996117852f8f874fd576ec141..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmZ9`-AfYz008hr%2=6wftdzF>!Id#x0}1|iiF#CTepw9-P|>AAbGdV+ji~lyxVTx zg3zKKqKv)>DzNB7At{0&v4`p*E25Gtl2ZDxkfIPD(t_ygwZGu^*aPZ2tX_xi?hx_+H9J^}LPay_ z^yDxfBqjA2S?n|-B&QfiRx9w7u2A{B>`lh#PK39G8QO$n&OBo!2&=|G2pZj$z)F5T z62lcc@!4>9PeOV$MDsYiJW5{%pq7p&c zg8C6g{`>HVCW!@uF;{^1Q$k4l0P+MFI0$%0t|+`9lir9GxvXTwdJlm$>D~&<&T9L`uyhha}T!kyq<2T-S=zBr!()a z&KAE{ZeMtB>S*r7%Xt5&nQ!sGe|}(LHGcf!wy#9j@axNIU`%X`4BWoB{!#H`*{csV zW#0z1=A)J6jT7hl-rSs9v~`3JR$nT|Mjkn*W_#MCp?>_z;?MbBU&Y-E(`CGEUB|(( SJ+&7;{usQsfBET?qkjM(YaNsT diff --git a/secrets/gitlab-initial-root-password.age b/secrets/gitlab-initial-root-password.age deleted file mode 100644 index 1f703ff..0000000 --- a/secrets/gitlab-initial-root-password.age +++ /dev/null @@ -1,12 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 NO562A XRrOSniXZk7nvufR3liJ3ocjX257eenhQUYZdlYCpl4 -ctZGdEgc9SgWka/3R/2WW4G9m1DHIk7HLKaBNyUeHtE --> ssh-ed25519 5/zT0w k3z9vLsjCPABV2kTRMC3xiriW+4BwSdvnk02Xtoi3zk -w43L1pm8VvwxVp6k8NJA73afZtPGfD8eCb2koa2goZQ --> ssh-ed25519 d3WGuA Bi1l2WS3kL5Y5NoVh7jAja3BG9LXxem801SSR76j52s -fKhRIb+Ug3sW4JI2rczNnh3Frx/EEnbQfhTUGdwLSo8 --> AOy-grease dju$ xL|5Hh q(A -h0bIKBg8yQBMqNR8M9DlA/wZWWFB+sdo4ApLXvTT19Moz3E5Vly8N2XKHrV3ggCE -Vn2a3snrXDrWxqQgfQEfJo7FnydItRcgO7ZDOuNAlnooyk0 ---- 9bMYjHMQsJt4fqnmE2ezRzN4AoKIrlRKAqh8pYRw8SQ -ܙj>r|>Q7pdh 357{Z9L $DU$0Y٠3BM@oU_dDݶ5jq/j`6ZiA&Qʡ*Օ:R%+ ɡ \ No newline at end of file diff --git a/secrets/gitlab-openid-secret.age b/secrets/gitlab-openid-secret.age deleted file mode 100644 index 3a57392..0000000 --- a/secrets/gitlab-openid-secret.age +++ /dev/null @@ -1,11 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 NO562A ZCflrN3Tm5CiGr6ajyHWUBB/tQqvBuZkwTrJDrd/aV0 -ItnkxqiZTCT77SDnG0JgzaQlDL3LZ96V+kzjxjAJx5s --> ssh-ed25519 5/zT0w WoKnbgmzpR+HuLdXYCOkPfScle7g7U+NGA/YAmyfIhk -pNfp+gOVyTfnXpVDRXuk16RyjlWjDILrO7Gibh7nRmU --> ssh-ed25519 d3WGuA L5xjtPNva83jZWsu2bCbcgaDNlou5BFVMsFkR8+L+2Q -4+UtIsyOgY0NAuHtdg4lBJwMyZWquRsmRNeQ+YXqeA0 --> hD-grease q%QV%; &/ -jl4ZKGU+SBSR0xhJN0yz7sV2uW/+Yhw ---- 1LIvBjAzD1lUotPXuI4cPHSfUsMFbEaGjE/t+KnQcW4 -AWee c[ 3myΈ6 g{7rd_7WP':u N \ No newline at end of file diff --git a/secrets/gitlab-secret-db.age b/secrets/gitlab-secret-db.age deleted file mode 100644 index 347fe7f2c707b92eaddbfc6f1cdad81c0e3a4583..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmZ9_OKZ~r003YQW7;quD8fLHpu>YDOVT#UqA*C4Y-^GwZPV@%aN0JnwrR3F+N3$` zAbRrPe1Jz~-~$oyAhP*HWYde@L=U3EU_%iR_2Oe7UibZhuVQGBX4ky#Y*2UXLB})T z4hlfSpzoWIrlv3qB|%Zb@Dv4-^=YidOH*i3)7!3>a?=!19T5vIHQnmCp^_rtVwGZ5 zlxBf6!edfXpekjykzzwX?L@^=mY_H$84H#QM`b>8;yB+PbvADp9G8#~Ea%6&u$WOP zE1kwitKo<)pq`#2u#g|AX%#u;hIP6m^W#Vv;D#_1$sl9FkVo2CxQIwYN&1*2>R5%>V-gH)uo za)2{!$b{pW4TJGrd~C8-DHce@4g-_Tjd!|rI2X!_?qN-$`G4zZ$05VhD!vACfTyUE znJEaZEEZ-7Jz^XgE|PhM5fyd9$N>-pfqug-O4)k8@WB-ps}GTd2O5^Q)JmgT}>I zdlzO;td;gHow<5fnCbj#j4eN~1_v5z2LSe%{p9!Rg?r|sg_U(`>E}Z`!R@(p=p6rW zc>QML?fJha-*KO}toXAVh9C%HNNF@Lcu8ntXJt5WacFXKWN1idS4?(6cvw(vK}T|OH$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We+wN`{S;ZD>ZW)jou;nQ$-1xeW=I#;cQE&#lJju}*TO z6|h!#V{f-k+SeaBNmCjvtwnZWu7zKv(%oK{m%TJq*}KSi{P^b{Ut?7>oGyjVZVHDO zym@l8&sWi;k=&oH0!2Kt$3xpnBRAv4|%g+Fz38$8oJWNgG>q zbX_9nfi;D^7h9Ij1QMe&Y0M_f0_`auil_;)9=#S-7Sz8>rokL<1ROnZI(!x_zwK;7 zbGUR^jKS-aAyj}p2yXw5-3jDZua19$Q`)fD^iHWN9e(B#THywJE){9AgpdxHvXC0D z|GvWu2x)NiNdM0XD@)VABZ7l4T=g`9E9eo7SahJ4Kz4w5u0 z&oyH?ncXPFs+-4REuzf*}T^{wLt7he!0F-boj|Lo=acyG3@}c diff --git a/secrets/gitlab-secret-otp.age b/secrets/gitlab-secret-otp.age deleted file mode 100644 index 28e6c7f..0000000 --- a/secrets/gitlab-secret-otp.age +++ /dev/null @@ -1,14 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 NO562A su6ATd6CDJ/TD/nAPw1K4ZmELBDdNLZI63DsZl0zCF0 -J+2ZXXZArtjDDLIaQL6HaEdawHo8tonMdzHf45IQMO4 --> ssh-ed25519 5/zT0w wdKMnoA5/huvtT/jyj1Aixf9nKtkzcyPSs1yoUpxoAk -yGiW4Zg0h4NGkdU0BZiWzC+72CJZK6pJdrSBuZCVGAE --> ssh-ed25519 d3WGuA p4QVeohmXdTo8v0Wh2pkEoyqMhZhmdrblBpq39ENnVk -7TybdsMNokMu+2q5ESnvdcNwAeWTl/5XGZltzJ7etjI --> Q-grease KJL\,Pw& c!aOPX -C6DVdLd90RXPgjf22U5Y8OsW9O9rkfE3kY0LGQhmmjCSZ7yHde4bhOAVNeNronxE -xFy8GtD+ZllI4NPUSyl3Y/90//H2fVUb32WA3Ga5WJmksrGXzg ---- yWDk0jbHXLxwE9jWTT85ORZy0Pw20jaRVihmkKfGnKo -@# -Q)F:G # gL-k{Td+8܃/-a\O*!^Ry@Z/o~I -[PO've^,?oM]1WFJęB&y yVv_ %Ǐ' \ No newline at end of file diff --git a/secrets/gitlab-secret-secret.age b/secrets/gitlab-secret-secret.age deleted file mode 100644 index 0b8f89ee44b2f695098fe4d802d99a4483c47c00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 666 zcmZ9_O>5I&007_}bZnJ5^&ogM9>xwOOVT#!3iG3FnzT)mr7>-mu}juBY11}M@+RrW zb{bv;6)d}mAfkBCTgAhe-eh_bRK#6GMZJh~1JQ#xb>el;A9%E?j_R!n>^Z(^x29}Z z#o9y&J%e~&4b?$}B#8tf%#u_ji4^&4ouvqo6Qw$@0r@^24tb2{@?0TXcg+3rz6WQGT&6& zQ7#Bkr7ZBtZrqZ(6pj0;$%>+3!#HI$GaAFBD!{2HXbQ{o(|M?vR+CVZ?J#s9;g)8p zv=*|QEJ?D{JnS;AB04y9L!W=7Bs}N>o_qr zG?C~p+?wQGKiM4F`>@kI7o`bw>GY*-2HeyhZdr#L70|!eKXQlNx_$S?qtE^I3vXve z4%lz5O5mM0wDId>^xJ~>`^)g))!D)LALQs?xOq)f#y_p^t`uiZr0kjI<10hMqYJA$ zKe6o}FL&(~aqs=+vB5>`#e=Wt{gaoyk-gQ?v8T^^&nM^7-`9legNajz;s;}?jpebm H