From 8356e15211735da3edb4e560bd3b756a0bf31932 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sat, 12 Oct 2024 17:45:41 +0200 Subject: [PATCH] feat(hackens-org): deploy ragb server --- hive.nix | 4 +- machines/hackens-org/_configuration.nix | 1 + machines/hackens-org/ragb.nix | 78 ++++++++++++++++++ machines/hackens-org/secrets/default.nix | 6 ++ .../secrets/django-gestiohackens.age | 57 +++++++------ machines/hackens-org/secrets/django.age | 57 ++++++------- .../hackens-org/secrets/matterbridge-env.age | Bin 1670 -> 1670 bytes .../hackens-org/secrets/prometheus-webconf | Bin 1658 -> 1658 bytes machines/hackens-org/secrets/ragb.age | 30 +++++++ machines/hackens-org/secrets/ragbJWT.age | Bin 0 -> 1615 bytes machines/hackens-org/secrets/secrets.nix | 54 ++++-------- machines/hackens-org/secrets/snipeit.age | Bin 1613 -> 1613 bytes machines/hackens-org/secrets/wg-key.age | Bin 1613 -> 1613 bytes npins/sources.json | 11 +++ pkgs/overlays.nix | 7 +- pkgs/ragb-backend.nix | 13 +++ 16 files changed, 221 insertions(+), 97 deletions(-) create mode 100644 machines/hackens-org/ragb.nix create mode 100644 machines/hackens-org/secrets/ragb.age create mode 100644 machines/hackens-org/secrets/ragbJWT.age create mode 100644 pkgs/ragb-backend.nix diff --git a/hive.nix b/hive.nix index 1676f1e..c93acef 100644 --- a/hive.nix +++ b/hive.nix @@ -50,7 +50,7 @@ let arch: p: import p { config.allowUnfree = true; - overlays = import ./pkgs/overlays.nix; + overlays = import ./pkgs/overlays.nix { inherit sources; }; system = arch; }; @@ -61,7 +61,7 @@ in { meta = { specialArgs = { - inherit metadata; + inherit sources metadata; }; nixpkgs = defaultNixpkgs; nodeNixpkgs = concatAttrs (builtins.map mkNixpkgs nodes); diff --git a/machines/hackens-org/_configuration.nix b/machines/hackens-org/_configuration.nix index 568a32a..0edbce0 100644 --- a/machines/hackens-org/_configuration.nix +++ b/machines/hackens-org/_configuration.nix @@ -16,6 +16,7 @@ ./matterbridge.nix ./nginx.nix ./orga + ./ragb.nix ./snipe-it.nix ./secrets ./static-sites.nix diff --git a/machines/hackens-org/ragb.nix b/machines/hackens-org/ragb.nix new file mode 100644 index 0000000..719f6db --- /dev/null +++ b/machines/hackens-org/ragb.nix @@ -0,0 +1,78 @@ +{ + sources, + lib, + pkgs, + config, + ... +}: +{ + services.django.ragb = { + enable = true; + src = pkgs.ragb-src + "/frontend"; + settings = { + DEBUG = false; + WEBSOCKET_ENDPOINT = "https://agb.hackens.org/api"; + ALLOWED_HOSTS = [ + "127.0.0.1" + "agb.hackens.org" + ]; + DATABASES = { + "default" = { + "ENGINE" = "django.db.backends.sqlite3"; + "NAME" = "/var/lib/django-ragb/ragb_frontend.sqlite3"; + }; + }; + }; + processes = 2; + threads = 4; + port = 9991; + extraPackages = p: [ + p.authens + p.pyjwt + ]; + secrets = { + SECRET_KEY = config.age.secrets.ragb.path; + JWT_SECRET = config.age.secrets.ragbJWT.path; + }; + }; + services.nginx.virtualHosts."agb.hackens.org" = { + forceSSL = true; + enableACME = true; + locations = { + "/" = { + proxyPass = "http://localhost:9991"; + }; + "/api" = { + proxyPass = "http://localhost:9999"; + proxyWebsockets = true; + }; + "/static".root = config.services.django.ragb.staticAssets; + "= /api-docs" = { + return = "302 /api-docs/"; + }; + "/api-docs/" = { + alias = "${pkgs.ragb-src + "/api-docs/"}/"; + extraConfig = "autoindex on;"; + }; + "= /api-docs/patch.json".alias = pkgs.ragb-src + "/frontend/patch.json"; + }; + }; + + systemd.services.django-ragb.serviceConfig = { + Wants = [ "ragb-backend.service" ]; + }; + systemd.services.ragb-backend = { + script = '' + export JWT_SECRET=$(cat $CREDENTIALS_DIRECTORY/jwt_secret) + export BK_FILE="$STATE_DIRECTORY/data.json" + # export RUST_LOG=info + ${pkgs.ragb-backend}/bin/ragb-backend + ''; + serviceConfig = { + LoadCredential = [ + "jwt_secret:${config.age.secrets.ragbJWT.path}" + ]; + DynamicUser = true; + }; + }; +} diff --git a/machines/hackens-org/secrets/default.nix b/machines/hackens-org/secrets/default.nix index 121200b..1d70be9 100644 --- a/machines/hackens-org/secrets/default.nix +++ b/machines/hackens-org/secrets/default.nix @@ -3,6 +3,12 @@ age.secrets."django" = { file = ./django.age; }; + age.secrets."ragbJWT" = { + file = ./ragbJWT.age; + }; + age.secrets."ragb" = { + file = ./ragb.age; + }; age.secrets."snipeit" = { file = ./snipeit.age; owner = "snipeit"; diff --git a/machines/hackens-org/secrets/django-gestiohackens.age b/machines/hackens-org/secrets/django-gestiohackens.age index 648eda5..77148e4 100644 --- a/machines/hackens-org/secrets/django-gestiohackens.age +++ b/machines/hackens-org/secrets/django-gestiohackens.age @@ -1,31 +1,30 @@ age-encryption.org/v1 --> ssh-ed25519 JGx7Ng WteJXpTnBzKZpognUrmY7vJkwvgxG2JlqPOkJ1BnoU0 -Hn44BN9Sb0BhgWBDZR7Xm4AAeRY2LE7ILgtBi8D/QTA --> ssh-ed25519 kXobKQ H0VlX0C2BfZWzA+c7tGaokBTGR855cTlE2qlZkKyZXg -9cTALIMwuoLyfjQ6AwzM+DWE1jLmxzoKuQ0NsGud+Ik --> ssh-ed25519 7hZk0g XYW9TFHZ2ule9rmiOeTGPLEGEEhkTGvV946UwV1XVwQ -eOlzfpFFROTb2zni2A0cKwmnjvaUsZpSvDqW8E9mMZg +-> ssh-ed25519 JGx7Ng UMbo24t6bweWPSYr1MUpjW96t3+usu+M3+WmLkJpSTc +vW8wOX/E6p3YEh8rRObScdcKB+uCtVIEOQ58HXSHYRU +-> ssh-ed25519 kXobKQ wEsnzLjnW+tdNvBHYBL+pLQh0GsAviTiD7tODc+5nSc +gW8TEewhh4N0ed6KNe+PYBQuEmuL8iO+KxLQt2imbbo +-> ssh-ed25519 7hZk0g 2Y9Y3DSR9Zt5N1XXckNMlHEpczvsyruqBue54fC4lQY +1UTRMGuN4uXR2ljP+3h7y58dU9C4GCkfKMY6l6GgRas +-> ssh-ed25519 5rrg4g 6ILvq1I6OlTmvxhgo145YUdpNxZomFvCYl7nguL10kI +7DPETzO4s3J4+lHIlkWvo4M0zH2792NttKBIJ09xii4 -> ssh-rsa krWCLQ -1JcEgjO1//IKYtTSj6bwhjudrpcYuaHAa62lhIL0m6ScSaMcZhGIy8SWU+LvlgM4 -eGYvzinsVhxCAgSJnD81yKSOjU0U+BoY1egx6DTAD59YR+IJ299yM1kjqjJhP3lc -fomOiDbr7mz0UoD2/Pe1Q2ps49rYkVH+ms7Dt9jKyYh7TwsyWitsvHEoXHjhG/u3 -PjLCVe3ngJtPagl42g3otOpmiZ1ycx/HP9ppJvQYoH6VUt9x9nPjUqtUQf66jwSn -87lfDXpGoyPO/pKX+IR45zGE4mVHfYsGzfNJMHyE2AImqxfAoZxqmRdQiQLCVihy -4xuHqWeuHN+Q6KAvhlnhRA --> ssh-ed25519 /vwQcQ ShQtj+r8CjS6zB2T4IYps21Wt8psIzrrff9NmibGQRI -dGBMjJfL11Asv+w5FrTJo1iknZZQNekcxoaLxmzAJAI --> ssh-ed25519 0R97PA hhRQZ7ddcQtQfwLHADUz6LI3lofzMxNfsLBSsN+keUA -sMKxjsYj+f75tMsM6d4dqLgTozzRcCzZQf9rgjRi4Wk --> ssh-ed25519 5rrg4g OETtCVypHjgLnenHGL6inIhhestIUEF0LVfJVu6HBSY -4GWYGsrHaCQURF6ffwN67Sz0DSwBWJ+cBn4WsA9+bm4 --> ssh-ed25519 cvTB5g 5QS4yEkwZDcRKx5w9ip/XW2RUKuDoR9hjT2rITG9bj0 -a6uP4DJZuOEy5wFnCoM1pUd5p1ySSNXBd8WINORz314 --> ssh-ed25519 Wu8JLQ 4/ETnzSAyvb1rm30ZXxBvWrCVvYzmvEjjai4W+nfEmU -8YpBxgtgNASRGABkPIWV19iQdcK5OI2toSefifCJi6A --> ssh-ed25519 EIt1vA pKBHFdt17ruSWarLGRMv9Jg5p4owmb05Chqi1waUlEM -21pDqeyKGbmkoHblA6LujvYNMo1DQ6u+0KjASPp88L4 --> ssh-ed25519 X51wxg p7PTrP8g6+85BCyujU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GU838E9JPhdAkYgRRcYi+gMsFFUTvY4iciFi9b43WhY +vsHQ70mCsW0NUzMKjgRq6czFD8FwIFj6uo/jklPzI68 +--- axO8MoSOSkcp2HcVpAz9tQuuf0Unh2Ri20S60/Yq6xA +i0<36,{u$apG710Y&f7(&{3]cݓ>lP"$`U(95+J^ϻ|:~ \ No newline at end of file diff --git a/machines/hackens-org/secrets/django.age b/machines/hackens-org/secrets/django.age index 8340af8..1572685 100644 --- a/machines/hackens-org/secrets/django.age +++ b/machines/hackens-org/secrets/django.age @@ -1,30 +1,31 @@ age-encryption.org/v1 --> ssh-ed25519 JGx7Ng eXYZhPOAu5XuLnLyVZEWG0yGReNd1NrYoZaYWk03rAw -rMmxeUr95ruA24E5rchZ7dWCaJOerRmulpjwbAtqqCA --> ssh-ed25519 kXobKQ rJXA+IoLwVLV/EUlDBQztg1jDIj36u5k7C0wDEfR+UQ -2vWEQ52uMZ+cQvXIdMelvgzeUZ/8bENDJCQDHDuKLaU --> ssh-ed25519 7hZk0g O9G401J2twPY8gB6uYTLkpDSMQRZB3ScmlS91WzWfjU -7piYGZj0UbyS+KnSVfZthI3HfaNcc0eadRAORtyTd0o +-> ssh-ed25519 JGx7Ng IWxk65t5YAq/Sg+0CCcLGJyDhvPydKm1D9rYAfCDjUc +ckB1V+J7Qddbt9EILraMge9RrThyTU2al5Eg6ffD7C4 +-> ssh-ed25519 kXobKQ ZEECnMHvZL3+JfkQpSjuzIuGfcLIIcudeiMlanUUBhc +pBWa6DxVrinuv6urFDKPW2kSaa95FVFCXOFwMQ/X1RY +-> ssh-ed25519 7hZk0g la8ZgkcqYQgFzYoqgkZrdSuaK+89mPx9UbiSWGOVXjQ +4NWbJtWRUnZGMMLyDLArvZktfVfhXmgtn7h5oghH5Ms +-> ssh-ed25519 5rrg4g KC9SOs8NJ18pbE4/HwHmX8W5XSeu528dFl2tEt3JfW0 +at+D2BMK1UAPsA2fkhMW5uHUjJSK2p+BPeFcfqyD/LA -> ssh-rsa krWCLQ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a8PYEbyx5rzu3Qu7Ba/OvcA78 ---- q31//bFmbqBhs9r8hy21qyVIwqSy7sYXRn1a/XIrfJc -*RTRtrCA_j]Dpnw J`j_fgOOX1ẁv \ No newline at end of file +U0DpCXNugnsPlWvDJZIwlFA3lCg/uihhLmLFYsdpwpx7kdyRF3KGn9p4X0kfjNQa +PjT7akh+xaCC9a3GRDEsc3B4L6M/91YdiIX5kCtWccT3fFkdC8xrHnVblE0h6vYM ++I4ay5PR9etittiMIb3coanBU5gZpAhCFvSNjWIV3YvchpOtWO2PL8rR9fRqDfmT +BdTZMUOm01vuFuPFKmzKNbQS5ydwydv8BGc1MktqoyhafYVBirnVcwtsTQKZKDEL +CBNgH81down+UFaCi/FTSffkBtBfnl1mzCF3TJ0CrSeEMgyY5yxvtWHUksDzznfJ +C2ev+95nbRYUSM+OOBABHQ +-> ssh-ed25519 /vwQcQ C7TusZYxTvR03xbxEmUf8+ePmdTRBbi4eAeg2+kbAAY +3YpLUT5mmGLSel0vPpDUwPyFav1z/HCAsPsYA7woQas +-> ssh-ed25519 0R97PA iQRH2sRnDsNoWuom8fVt8naGMrVAX3JAPmwnU/pZ3m8 +CipYmklGkMXYlWyhatEj7cGk51RNdfkkwlKPz26Q220 +-> ssh-ed25519 cvTB5g 05g8kd7yu1+4JzFCrqMEZ6QNsO8VE2egXOUR73fo/hM +AY/8cMfVTyOY4z08Hz6cLnKrM1GYZbbgpwPVnwnJ3NU +-> ssh-ed25519 Wu8JLQ Bn0shD1/Uzb3VdAOuyNeHSzLaboxhAUsqQWXycZYDFc +V2EHtwK0CUdLYCzia43m4WmBxFy8frfR0hkdIkARnl4 +-> ssh-ed25519 EIt1vA FmznskIDNtFkD6HD64uL5OS2rwPwT1S5lCirtYFW0Rk +3TKTCN45ygLTcrfSRdsXJZKdoz+A3tP7lXbNn2NOhvk +-> ssh-ed25519 X51wxg X3KyzjW97PF8CFcb0NWW5F6JNMZslmP22d0+r0FRvlo +mZq7lSEnD3Ui7hcloSCdTH/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6I$zej-m_MIR6<+Hb5djF$W-hIY?>7#!<{qWsyeDd>;fA#5;4?fU-|JoJ! z#fLBddGojWO~L&3S#y7@{_ano|M=zizq@`O*IY5(g-8 literal 1670 zcmZY8$?Nn69mjD&TnH9CcTI@u@{DXkli zUJ4#d?NO!P3LacQsi2;7C_zg4v< zIKaT&cUE1O-6b)C<1oFFg^ASCRaLhGr=wk{TgL30OL>C@x+Z9@(A7%jrIQFy>{HKx!za1 zsgBq&$nR@pcFdu4l?eIX#@5>2EDr(#cb08co8@r!jmos9q(6^6B~V_|%|1{S$Ky_4 z6IzrqEvBIt8KKouapHwIcABWV0ekZyL8?UNzJ|ALilwWuZpa>0$SY>E3GRA)x5f9H zO7as|cT3*^2c8oc+E@$&e%}ZXDP!aJtG}wo#hhUQR~=+rDPUW z=SH1D0+juD8 z5U!a(Db$)FD~R)HJfZ9Zg+jwdrEZiLIBKdhraI7>s1UTXbxyQjCH>W;HC2uQ#F&R` zi=OtAj{?0rX zfhGr2Q#nT|#qPI7gU#aUibcU=BsGTt#9a2%I`h2Zgvee)aRiDS%N+;}A&5bKV#p~9!tU8T3Al|d3#y$<-?XTAad|G>T_Jov@KumAar|9I`W zH-F5({PvHY5}$tI`DZ+8{MmOe`1>RE^jGrNUis>W@BZ=O`(Mz0`R1eFef;uo-S@uv z&R@U%tB)W2{^6@13eUdy(y)E?m5)C7+Yf&J_Yb7cKl9YP|M~Bq`hR<`|K#;AfA)=k m{^e`s_Z|@ci{AM4-S>a^)^8px$aDXC^wRTR`st%TxSs$GP%r`j diff --git a/machines/hackens-org/secrets/prometheus-webconf b/machines/hackens-org/secrets/prometheus-webconf index c3c3e3c4a2509d233372376c10e7a692ec28eadd..e2ca172408c4418e50292e1ecde2ffddb11a8bcf 100644 GIT binary patch literal 1658 zcmZY8yX)fw00(dtJn8(3K$UPWO14jvg6FF-}{dzu&@ z$d@%LadSAHc)4D>=eXW15;`?0W;LgDs)>Xi)%Fm2a$)AkH$@@jh78Oitzb2Z6v4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IjNLh$ zWw?cQ3U>-v6Iq^jcN<9(4+PPvY|ZQU=?JxmGDuj6A4RF2lgUYJ&Bjxv=MBZ+sz@1yOK z+k?>8Ma&rZn$(zqzSb>d9tfS>i7js$FpztZ0n=lN*eJb`U z3jx$XzV3L?%ekN%A95$H(9h*=hEC-=%5-38O*0d{GTQt2tnw;&~ z!?q9Du2rhJEJ(S*AFr>!nfm@I&Bx$r&Nj1BFI?qj(IpY3eaN<$%536ae5~Z*VWVFb&n8GX zLQAd$=_@Q=sPd9g5R;%M2*ca;qL)0QBagiofB&KT{+~Zhz5ndZE-^}yTAY7w2g!pZ@lw^Km75%=Rf}V z?YDpX;X9xG$3NeC`O!)I!neQm@<%U!_ND)PzWU3H^n3q${7&%XQK Tx%kB=1LZeg`QOLaFRK3sA(<=_ diff --git a/machines/hackens-org/secrets/ragb.age b/machines/hackens-org/secrets/ragb.age new file mode 100644 index 0000000..d1b1fe3 --- /dev/null +++ b/machines/hackens-org/secrets/ragb.age @@ -0,0 +1,30 @@ +age-encryption.org/v1 +-> ssh-ed25519 JGx7Ng 6s1XuhN3TFuW433ZrghssoyScvjqG6tg+ZSvHBwYOjQ +54ijsvv7CO/1L9ib4fgiRAQHmlU2r3j/fbc79qiAo38 +-> ssh-ed25519 kXobKQ WMApvaovS/ddPbz7Eh9bCF3SzmUJN1NQGMKzWCJ6jQc +3NehvO3X7uMU/H7g7d4nFsmHk0PhXrRT1XetWUBHAnY +-> ssh-ed25519 7hZk0g RqNPzJqoSY1umAJE/FPZ+MR0R9eCDdxonzuh3uMBRhI +Cfou0mqV4gHGP7OJbgPm8VotU4cM5YVX3iUkd6myU+E +-> ssh-ed25519 5rrg4g mSZUVF9y4vYfBbjgP0UnSfgaGTC3/Yx+fAFquA5022E +1yiri7+CZTSUhPpJlo9f1EraRVl3Ihw4wtjgXJPMRqY +-> ssh-rsa krWCLQ +gMc7ogvibqMuboKqSgqfedIxqyhhljJFp5zI2bK6D5rdcV5CIPVz2xQdk4h678Qg +8pYlg1+UDu+JyXvJgtWZHYMGSs17woIYZmw9UQh+IYMo4Qn89tn4QN4exYwB+7gm +dWEqo7GggWG0Mu2w2OVu2oB1D5aUvF940hUCyl40V7hIkMpJwFfMfvvD04XsScXV +GLpWNYcWIQNaBAxTWRGkpt9jvD1W/DjsOUhOk0BP5hnSPm39awfLFRo3wWFBiaDq +yPRi6P8AJdVWS2n+KdQ1j5dLo19DngkUAmepIR+oiNvgIFKqDAvIB5y30d3guGdP +7zCS7IEOOMLQvBiq99DU2Q +-> ssh-ed25519 /vwQcQ GWEth3AXh2blSPzXzyqaHdRlA+Qmopvdk9DfL69PVlk +sVq7EbVmJ0SnYLueCHB5zOr/aR9QurTqtMIXGdL22cY +-> ssh-ed25519 0R97PA gZLoe8C+FTOXM0i4VWBwBSNSxZhfxG6U3pakRBDwZ0k +LKxzJofqUfdY1swAbRNcOcWfZJ1lbp7S20y+dfjKvUU +-> ssh-ed25519 cvTB5g GbEB6Z/6A/ntU8truri+tshuy5tqYSSo5SF0Brt0VgI +DOkGd68tE85ajEBmKUx9HXiKLjCdUf/tKME6+Ems/RA +-> ssh-ed25519 Wu8JLQ tOF/Dc72uMnmQy4rNjPoRzVhQEuwiYLrmmdCsmJ5wEk +RS5erkX1HIvTDw6g8qrOtZy1zpCphnGw/bqT4F0Q6/8 +-> ssh-ed25519 EIt1vA tSBgk0ljTD1pLRsw7axRh2zl+vIMISjrw7zrr01TBB0 +hb3kb12kRHCxMeBlxjg6tJpgQpHzJkovH5ncuM4MzNA +-> ssh-ed25519 X51wxg Gy0QJbua5ZoNYDnuQXlPVFxQvm7SSOMUR0uDRI719gk +VEYU1qazlM62F2xsXIFhIAEL4ssWW8o2/e07NguMp88 +--- VwkrST6cm5HpWtRWBM4tkk14C/NwtxpBbXHVj6ouyxk +(`W;+u'oj ݏ {MP0DșJ}ō{tj`K:׸I;A2C+ \N \ No newline at end of file diff --git a/machines/hackens-org/secrets/ragbJWT.age b/machines/hackens-org/secrets/ragbJWT.age new file mode 100644 index 0000000000000000000000000000000000000000..75ccf2a78fa78c2df25f6628dce4be1a4c54b6d3 GIT binary patch literal 1615 zcmZA1yUX+h7QkT}SqK&`h`Wg3fLeujbH5cTnPg^?naTa0%G@TIB$NAfDiOBY?H0BW z{QiTFEw)e)`9QF-woz=f-fsJ4-^ya(^bd!_`2}h6lvGi-Hp8{9{!(`-G$Fv#$D6*- zo{|_P2!z=j4+|xyo4dZ+UT7*jEZ2$Sun5=}`$#rq zP^}4Z=FL$%n;w*Ujo7vp<_$K3&LzJChaFNpYK2>eCv5}j+X3SOa(697QZ&{V(ny}2|OFB1p z=6b0he?MV-$Gm-?K_9Y(KPEgbExVRf&`=|6jfSI=rv!c zI4K$Pd(hN%cavc>t+~k~qj-=&+_W(*-iZmBQRASxWlz(LVT&b@(}*3>u9u5}$R+qy zCdiap#TH^b=rUW^g%$|lfVVgW(Hkg;pSnW~J}ov|N4rCIq-h)r3V`*VDvc-BsPoz3b;Et^zp21IFFMtxYQg6FW_T%$(0}(=Hia$Q>0JZM530Z z5q(fbX#h>i@%cTV{A};tnC=92BK?r=mp1JQN2!MW5+)b!!cozqwi5?rVmEB0qH1bZ zG-D&-!C12Hd_5Le?veZ6SjbZ^9zf8J74RMbhbSi@xy+={8Z4joun^_1k;N#KGaM{{SBh;!c(N4#!l2Aytf|#*%6-BF^xkv(@o}M->%;(1O{@g-UW+awfBh+gU;FSo;MI2@jX(br zRsT3&Uaza*w^u*mUwr%PCx3qJ<-7lT^~THh-}?J|*5BTL;eYU%_0E5O`{uu&{_>{q IdHuov0WD1qegFUf literal 0 HcmV?d00001 diff --git a/machines/hackens-org/secrets/secrets.nix b/machines/hackens-org/secrets/secrets.nix index f9ee762..2072486 100644 --- a/machines/hackens-org/secrets/secrets.nix +++ b/machines/hackens-org/secrets/secrets.nix @@ -5,48 +5,28 @@ let builtins.filter (k: k != "") ( lib.splitString "\n" (builtins.readFile (../../../pubkeys + "/${user}.keys")) ); + keys = + (readpubkeys "sinavir") + ++ (readpubkeys "hackens-host") + ++ (readpubkeys "catvayor") + ++ (readpubkeys "raito") + ++ (readpubkeys "gdd") + ++ (readpubkeys "backslash"); in { - "matterbridge-env.age".publicKeys = - (readpubkeys "sinavir") - ++ (readpubkeys "hackens-host") - ++ (readpubkeys "catvayor") - ++ (readpubkeys "raito") - ++ (readpubkeys "gdd") - ++ (readpubkeys "backslash"); + "matterbridge-env.age".publicKeys = keys; "snipeit.age".publicKeys = - (readpubkeys "sinavir") - ++ (readpubkeys "hackens-host") - ++ (readpubkeys "raito") - ++ (readpubkeys "catvayor") - ++ (readpubkeys "gdd") - ++ (readpubkeys "backslash"); + keys; + "ragbJWT.age".publicKeys = + keys; + "ragb.age".publicKeys = + keys; "django.age".publicKeys = - (readpubkeys "sinavir") - ++ (readpubkeys "hackens-host") - ++ (readpubkeys "raito") - ++ (readpubkeys "catvayor") - ++ (readpubkeys "gdd") - ++ (readpubkeys "backslash"); + keys; "django-gestiohackens.age".publicKeys = - (readpubkeys "sinavir") - ++ (readpubkeys "hackens-host") - ++ (readpubkeys "raito") - ++ (readpubkeys "catvayor") - ++ (readpubkeys "gdd") - ++ (readpubkeys "backslash"); + keys; "wg-key.age".publicKeys = - (readpubkeys "sinavir") - ++ (readpubkeys "hackens-host") - ++ (readpubkeys "raito") - ++ (readpubkeys "gdd") - ++ (readpubkeys "catvayor") - ++ (readpubkeys "backslash"); + keys; "prometheus-webconf".publicKeys = - (readpubkeys "sinavir") - ++ (readpubkeys "hackens-host") - ++ (readpubkeys "raito") - ++ (readpubkeys "gdd") - ++ (readpubkeys "catvayor") - ++ (readpubkeys "backslash"); + keys; } diff --git a/machines/hackens-org/secrets/snipeit.age b/machines/hackens-org/secrets/snipeit.age index 3d76be63af127fcfe383cb160d1b1abf690ad49a..0dfb3d38f4b05c0705a38066d9774157b7581382 100644 GIT binary patch literal 1613 zcmZA1Im`5h5eM)p2?&>N+?a(_K|GPPy1_PRb*ygf>XsTKX?3iml~(rwZt?*V2!S-g zq)U1e2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|vMPlRDXO_JR?Olp^Km0QyB9 z9C2`nPh>r6}*y8GjJW9z%sFW;+V_Y z@-5QH3qMscpjS2M)LV)4TT#1+`bI zuyC64C=8c}5j~}6C=uEQxk@}B)3WrM+KCz_yq&YW^58`86tan$tU6Je{all7Ps;~$ z<)l?}u)~uU*Zq|~d$!{^`OVz|%QkD5xS*n)OqBom@HT!|o?;#_s>i7C1bpKnVw z(WtXpwya0oZxSBvtk;*R zR%=cgZv@D_2C{fJxy*0ZjqjYXjp*h+MRfwsI1;Lk7m+yv&1bUbvI+YR8@8*0H4=H^ zlf@qeZyN6y@GCDkFo+^YS+G@fwUIpSkeX=-)rc-njb8+fkY-JT&aC1!(z19s!p?}h zaK^>#<5P#o`)9p*1U61!MJj67W+EXF{VkhHz05OE~V&c29QvaS}BgdU$wPZQ|~9JD&+(T39^>yb@tq z-(iHl=UcskJGC>a7F!3`euUr`|4v@{=kxczdGov7m-su6|NY~K`fKUYt8aYz z{N&?budg}xk6!xub+UZ>{kQ*KKKveip?&=15&OwsFMsy?lgHow^y4pu`t$h<{{5dm F_z!OF7JdK# diff --git a/npins/sources.json b/npins/sources.json index d2de6b3..1e5f72a 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -61,6 +61,17 @@ "revision": "06cf0e1da4208d3766d898b7fdab6513366d45b9", "url": "https://github.com/NixOS/nixpkgs/archive/06cf0e1da4208d3766d898b7fdab6513366d45b9.tar.gz", "hash": "0l68zz8mn2kvp9wvc6rgw7dns8vkl7w9y6z92blvgn1wnm9ib6ab" + }, + "ragb": { + "type": "Git", + "repository": { + "type": "Git", + "url": "https://git.dgnum.eu/HackENS/ragb" + }, + "branch": "main", + "revision": "dfbaf2fd65fe16f5a66b5b16afef83502ea4b237", + "url": null, + "hash": "0vjs8cm2q2f2s8a8zqjj159rg1m7q6fzrg269gfpmrmgwpp3wh52" } }, "version": 3 diff --git a/pkgs/overlays.nix b/pkgs/overlays.nix index 3f4e266..709ad01 100644 --- a/pkgs/overlays.nix +++ b/pkgs/overlays.nix @@ -1,5 +1,6 @@ +{ sources }: [ - (import ((import ../npins).agenix + "/overlay.nix")) + (import (sources.agenix + "/overlay.nix")) (final: prev: { pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [(self: _: { loadcredential = self.callPackage ./loadcredential { }; @@ -11,4 +12,8 @@ markdown-icons = self.callPackage ./markdown-icons { }; })]; }) + (final: prev: { + ragb-backend = final.callPackage ./ragb-backend.nix { src = final.ragb-src; }; + ragb-src = sources.ragb; + }) ] diff --git a/pkgs/ragb-backend.nix b/pkgs/ragb-backend.nix new file mode 100644 index 0000000..76828a7 --- /dev/null +++ b/pkgs/ragb-backend.nix @@ -0,0 +1,13 @@ +{ lib +, rustPlatform +, src +}: + +rustPlatform.buildRustPackage { + pname = "ragb-backend"; + version = "0.3"; + + src = src + "/backend"; + + cargoHash = "sha256-lyYCXjmsm12xYHk30g5PDBpQb10xaB6zpoEi2xpjeiM="; +}