Skip to content

Commit

Permalink
feat(devenv): add statix
Browse files Browse the repository at this point in the history
  • Loading branch information
uku3lig committed May 18, 2024
1 parent 1f86d66 commit aa8c49c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
5 changes: 4 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
7 changes: 6 additions & 1 deletion parts/dev.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
16 changes: 8 additions & 8 deletions systems/etna/dendrite.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
'';
};
};
Expand Down
9 changes: 4 additions & 5 deletions systems/etna/minecraft.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

mkMinecraftServer = name: {
port,
frpPort,
remotePort,
dataDir ? "/var/lib/${name}",
memory ? "4G",
env ? {},
Expand All @@ -32,11 +32,10 @@

services.frp.settings.proxies = [
{
name = name;
inherit name remotePort;
type = "tcp";
localIp = "127.0.0.1";
localPort = port;
remotePort = frpPort;
}
];

Expand Down Expand Up @@ -95,7 +94,7 @@ in
(mkMinecraftServers {
ragnamod7 = {
port = 25566;
frpPort = 6001;
remotePort = 6001;
memory = "8G";
env = {
USE_AIKAR_FLAGS = "true";
Expand All @@ -109,7 +108,7 @@ in

lynn = {
port = 25567;
frpPort = 6002;
remotePort = 6002;
memory = "4G";
env = {
USE_AIKAR_FLAGS = "true";
Expand Down
2 changes: 1 addition & 1 deletion systems/etna/reposilite.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{...}: {
_: {
cfTunnels."maven.uku3lig.net" = "http://localhost:8080";

# see exprs/reposilite/module.nix
Expand Down
2 changes: 1 addition & 1 deletion systems/etna/vaultwarden.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{...}: {
_: {
cfTunnels."bw.uku3lig.net" = "http://localhost:8222";

services.vaultwarden = {
Expand Down

0 comments on commit aa8c49c

Please sign in to comment.