mirror of
https://github.com/RGBCube/ncc
synced 2025-07-28 10:37:44 +00:00
feat: add nix-serve to best
This commit is contained in:
parent
20ce1c9ff5
commit
5c9b98bdfc
5 changed files with 47 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,6 +7,7 @@
|
||||||
!hosts/
|
!hosts/
|
||||||
|
|
||||||
!hosts/best/
|
!hosts/best/
|
||||||
|
!hosts/best/nix-serve/
|
||||||
|
|
||||||
!hosts/cube/
|
!hosts/cube/
|
||||||
!hosts/cube/matrix/
|
!hosts/cube/matrix/
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://cache.garnix.io/"
|
"https://cache.garnix.io/"
|
||||||
"https://cache.privatevoid.net"
|
"https://cache.privatevoid.net"
|
||||||
|
"https://cache.rgbcu.be/"
|
||||||
"https://hyprland.cachix.org/"
|
"https://hyprland.cachix.org/"
|
||||||
"https://nix-community.cachix.org/"
|
"https://nix-community.cachix.org/"
|
||||||
];
|
];
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
||||||
|
"cache.rgbcu.be:nBN/5Qg5E8GIYwaoslm9DYo2zeqlBiCVNCPf17djr+w="
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
];
|
];
|
||||||
|
|
27
hosts/best/nix-serve/default.nix
Normal file
27
hosts/best/nix-serve/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ self, config, lib, pkgs, ... }: let
|
||||||
|
inherit (config.networking) domain;
|
||||||
|
inherit (lib) enabled merge;
|
||||||
|
|
||||||
|
fqdn = "cache.${domain}";
|
||||||
|
port = 8003;
|
||||||
|
in {
|
||||||
|
imports = [(self + /modules/nginx.nix)];
|
||||||
|
|
||||||
|
secrets.nixServeKey = {
|
||||||
|
file = ./key.age;
|
||||||
|
owner = "nix-serve";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nix-serve = enabled {
|
||||||
|
package = pkgs.nix-serve-ng;
|
||||||
|
secretKeyFile = config.secrets.nixServeKey.path;
|
||||||
|
|
||||||
|
# Not ::1 because nix-serve doesn't like that.
|
||||||
|
bindAddress = "127.0.0.1";
|
||||||
|
inherit port;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${fqdn} = merge config.services.nginx.sslTemplate {
|
||||||
|
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
||||||
|
};
|
||||||
|
}
|
8
hosts/best/nix-serve/key.age
Normal file
8
hosts/best/nix-serve/key.age
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 8y3T6w +fPOWUbuD+JGfimuJnNa0wBpQyxC2nXGLGFdxAhfwns
|
||||||
|
bonLQGaN8rp0KmZHW9efsPyCQ8eujuxEB9p7Ewdp4Bo
|
||||||
|
-> ssh-ed25519 CzqbPQ 91liBCRmtq4YGG8Zz6+ObSEDlGVmA8Jn+NPQzTLQoGY
|
||||||
|
Gurxg2Tp1sdpz7xESiZCVw5BAuMI5vYH/UtdrFH9vd0
|
||||||
|
--- MJVivHhiqkVMke+mib2EZiFeZFX/BnFuEUctH+fdwd4
|
||||||
|
8k
|
||||||
|
Ôh}p©®lðz¾!I{xÃ
<0A>z@SíZy/‘ôC3JÞQ:t¯ñ»NS&<26>CXw<58>·`%ÕûE {£f'Oä<Äq‹<71>ï\‚;yù‚S—AöùÒ!‚Û_Ù<pñJ „@#‰Û·É(Õ63(«/G·ØgãIvÄ%ýºœ†
|
14
secrets.nix
14
secrets.nix
|
@ -2,26 +2,30 @@ let
|
||||||
inherit (import ./keys.nix) best cube disk nine admins all;
|
inherit (import ./keys.nix) best cube disk nine admins all;
|
||||||
in {
|
in {
|
||||||
# best
|
# best
|
||||||
"hosts/best/id.age".publicKeys = [ best ] ++ admins;
|
"hosts/best/id.age".publicKeys = [ best ] ++ admins;
|
||||||
"hosts/best/password.the.age".publicKeys = [ best ] ++ admins;
|
"hosts/best/password.the.age".publicKeys = [ best ] ++ admins;
|
||||||
|
|
||||||
|
"hosts/best/nix-serve/key.age".publicKeys = [ best ] ++ admins;
|
||||||
|
|
||||||
# cube
|
# cube
|
||||||
|
"hosts/cube/id.age".publicKeys = [ cube ] ++ admins;
|
||||||
|
"hosts/cube/password.rgb.age".publicKeys = [ cube ] ++ admins;
|
||||||
|
|
||||||
"hosts/cube/forgejo/password.runner.age".publicKeys = [ cube ] ++ admins;
|
"hosts/cube/forgejo/password.runner.age".publicKeys = [ cube ] ++ admins;
|
||||||
"hosts/cube/grafana/password.age".publicKeys = [ cube ] ++ admins;
|
"hosts/cube/grafana/password.age".publicKeys = [ cube ] ++ admins;
|
||||||
"hosts/cube/id.age".publicKeys = [ cube ] ++ admins;
|
|
||||||
"hosts/cube/matrix/password.secret.age".publicKeys = [ cube ] ++ admins;
|
"hosts/cube/matrix/password.secret.age".publicKeys = [ cube ] ++ admins;
|
||||||
"hosts/cube/nextcloud/password.age".publicKeys = [ cube ] ++ admins;
|
"hosts/cube/nextcloud/password.age".publicKeys = [ cube ] ++ admins;
|
||||||
"hosts/cube/password.rgb.age".publicKeys = [ cube ] ++ admins;
|
|
||||||
|
|
||||||
# disk
|
# disk
|
||||||
"hosts/disk/id.age".publicKeys = [ disk ] ++ admins;
|
"hosts/disk/id.age".publicKeys = [ disk ] ++ admins;
|
||||||
"hosts/disk/password.floppy.age".publicKeys = [ disk ] ++ admins;
|
"hosts/disk/password.floppy.age".publicKeys = [ disk ] ++ admins;
|
||||||
|
|
||||||
# nine
|
# nine
|
||||||
"hosts/nine/github2forgejo/environment.age".publicKeys = [ nine ] ++ admins;
|
|
||||||
"hosts/nine/id.age".publicKeys = [ nine ] ++ admins;
|
"hosts/nine/id.age".publicKeys = [ nine ] ++ admins;
|
||||||
"hosts/nine/password.seven.age".publicKeys = [ nine ] ++ admins;
|
"hosts/nine/password.seven.age".publicKeys = [ nine ] ++ admins;
|
||||||
|
|
||||||
|
"hosts/nine/github2forgejo/environment.age".publicKeys = [ nine ] ++ admins;
|
||||||
|
|
||||||
# shared
|
# shared
|
||||||
"modules/common/ssh/config.age".publicKeys = all;
|
"modules/common/ssh/config.age".publicKeys = all;
|
||||||
"modules/linux/restic/password.age".publicKeys = all;
|
"modules/linux/restic/password.age".publicKeys = all;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue