Reformat. Small changes.

Ran nixfmt on the whole project. Added an alias for doing that. Changed
some SSH aliases.
This commit is contained in:
kat witch 2021-02-22 05:40:19 +00:00 committed by kat
parent 6dcbea4918
commit fdf7cb9e98
9 changed files with 62 additions and 65 deletions

View file

@ -8,51 +8,49 @@ let
secrets = (import ../../../../secrets.nix);
in {
services.nginx.virtualHosts = {
"kittywit.ch" = {
root = "/var/www/kittywitch";
locations = {
"/_matrix" = { proxyPass = "http://[::1]:8008"; };
"= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "kittywit.ch:443"; };
in ''
add_header Content-Type application/json;
return 200 '${builtins.toJSON server}';
'';
"= /.well-known/matrix/client".extraConfig = let
client = {
"m.homeserver" = { "base_url" = "https://kittywit.ch"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
};
"kittywit.ch" = {
root = "/var/www/kittywitch";
locations = {
"/_matrix" = { proxyPass = "http://[::1]:8008"; };
"= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "kittywit.ch:443"; };
in ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
return 200 '${builtins.toJSON server}';
'';
};
} // common;
"vault.kittywit.ch" = {
locations = {
"/".proxyPass = "http://127.0.0.1:4000";
"/notifications/hub".proxyPass = "http://127.0.0.1:3012";
"/notifications/hub/negotiate".proxyPass = "http://127.0.0.1:80";
};
} // common;
"git.kittywit.ch" = {
locations = {
"/".proxyPass = "http://127.0.0.1:3000";
};
} // common;
"znc.kittywit.ch" = {
locations = { "/".proxyPass = "http://127.0.0.1:5000"; };
} // common;
"irc.kittywit.ch" = {
locations = {
"/" = { root = pkgs.glowing-bear; };
"^~ /weechat" = {
proxyPass = "http://127.0.0.1:9000";
proxyWebsockets = true;
"= /.well-known/matrix/client".extraConfig = let
client = {
"m.homeserver" = { "base_url" = "https://kittywit.ch"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
};
in ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
};
} // common;
"vault.kittywit.ch" = {
locations = {
"/".proxyPass = "http://127.0.0.1:4000";
"/notifications/hub".proxyPass = "http://127.0.0.1:3012";
"/notifications/hub/negotiate".proxyPass = "http://127.0.0.1:80";
};
} // common;
"git.kittywit.ch" = {
locations = { "/".proxyPass = "http://127.0.0.1:3000"; };
} // common;
"znc.kittywit.ch" = {
locations = { "/".proxyPass = "http://127.0.0.1:5000"; };
} // common;
"irc.kittywit.ch" = {
locations = {
"/" = { root = pkgs.glowing-bear; };
"^~ /weechat" = {
proxyPass = "http://127.0.0.1:9000";
proxyWebsockets = true;
};
} // common;
} // secrets.virtualHosts.athame;
}
};
} // common;
} // secrets.virtualHosts.athame;
}

View file

@ -18,7 +18,7 @@
domain = "kittywit.ch";
hostId = "0417b551";
useDHCP = false;
interfaces.ens3.ipv4.addresses = [{
interfaces.ens3.ipv4.addresses = [{
address = "104.244.73.10";
prefixLength = 24;
}];

View file

@ -9,8 +9,7 @@
./torrenting.nix
];
meta.deploy.profiles =
[ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.profiles = [ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.ssh.host = "192.168.1.135";
# libvirtd is used for our virtual machine

View file

@ -1,13 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./hardware.nix
../../services/zfs.nix
];
imports = [ ./hardware.nix ../../services/zfs.nix ];
meta.deploy.profiles =
[ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.profiles = [ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.ssh.host = "192.168.1.92";
boot.loader.systemd-boot.enable = true;