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

@ -15,4 +15,7 @@ switch *args:
sudo nixos-rebuild switch --flake . --keep-going {{ args }}
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, ...}: {
devShells.default = pkgs.mkShellNoCC {
packages = with pkgs; [just nil deploy-rs];
packages = with pkgs; [
just
nil
statix
deploy-rs
];
};
formatter = pkgs.alejandra;

View file

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

View file

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

View file

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

View file

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