feat(devenv): add statix

This commit is contained in:
uku 2024-05-18 12:35:02 +02:00
parent 1f86d66063
commit aa8c49c5bd
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
6 changed files with 24 additions and 17 deletions

View file

@ -16,3 +16,6 @@ switch *args:
deploy system: deploy system:
deploy -s .#{{ system }} deploy -s .#{{ system }}
lint *args:
statix check -i flake.nix **/hardware-configuration.nix {{ args }}

View file

@ -1,7 +1,12 @@
{ {
perSystem = {pkgs, ...}: { perSystem = {pkgs, ...}: {
devShells.default = pkgs.mkShellNoCC { devShells.default = pkgs.mkShellNoCC {
packages = with pkgs; [just nil deploy-rs]; packages = with pkgs; [
just
nil
statix
deploy-rs
];
}; };
formatter = pkgs.alejandra; formatter = pkgs.alejandra;

View file

@ -62,26 +62,26 @@
nginx = { nginx = {
enable = true; enable = true;
virtualHosts."m.uku.moe" = { virtualHosts."m.uku.moe".locations = let
locations."=/.well-known/matrix/server" = let
server = {"m.server" = "m.uku.moe:443";}; server = {"m.server" = "m.uku.moe:443";};
client = {"m.homeserver"."base_url" = "https://m.uku.moe";};
in { in {
"=/.well-known/matrix/server" = {
return = "200 '${builtins.toJSON server}'"; return = "200 '${builtins.toJSON server}'";
}; };
locations."=/.well-known/matrix/client" = let "=/.well-known/matrix/client" = {
client = {"m.homeserver"."base_url" = "https://m.uku.moe";};
in {
return = "200 '${builtins.toJSON client}'"; return = "200 '${builtins.toJSON client}'";
}; };
locations."/" = { "/" = {
proxyPass = "http://localhost:8008"; proxyPass = "http://localhost:8008";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = '' extraConfig = ''
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 600; proxy_read_timeout 600;
client_max_body_size 100M;
''; '';
}; };
}; };

View file

@ -9,7 +9,7 @@
mkMinecraftServer = name: { mkMinecraftServer = name: {
port, port,
frpPort, remotePort,
dataDir ? "/var/lib/${name}", dataDir ? "/var/lib/${name}",
memory ? "4G", memory ? "4G",
env ? {}, env ? {},
@ -32,11 +32,10 @@
services.frp.settings.proxies = [ services.frp.settings.proxies = [
{ {
name = name; inherit name remotePort;
type = "tcp"; type = "tcp";
localIp = "127.0.0.1"; localIp = "127.0.0.1";
localPort = port; localPort = port;
remotePort = frpPort;
} }
]; ];
@ -95,7 +94,7 @@ in
(mkMinecraftServers { (mkMinecraftServers {
ragnamod7 = { ragnamod7 = {
port = 25566; port = 25566;
frpPort = 6001; remotePort = 6001;
memory = "8G"; memory = "8G";
env = { env = {
USE_AIKAR_FLAGS = "true"; USE_AIKAR_FLAGS = "true";
@ -109,7 +108,7 @@ in
lynn = { lynn = {
port = 25567; port = 25567;
frpPort = 6002; remotePort = 6002;
memory = "4G"; memory = "4G";
env = { env = {
USE_AIKAR_FLAGS = "true"; USE_AIKAR_FLAGS = "true";

View file

@ -1,4 +1,4 @@
{...}: { _: {
cfTunnels."maven.uku3lig.net" = "http://localhost:8080"; cfTunnels."maven.uku3lig.net" = "http://localhost:8080";
# see exprs/reposilite/module.nix # see exprs/reposilite/module.nix

View file

@ -1,4 +1,4 @@
{...}: { _: {
cfTunnels."bw.uku3lig.net" = "http://localhost:8222"; cfTunnels."bw.uku3lig.net" = "http://localhost:8222";
services.vaultwarden = { services.vaultwarden = {