style: auto-formatting

Changed files
+16 -11
global
systems
koumakan
services
matrix
proxies
+4 -1
flake.nix
···
];
forAllSystems = fn: lib.genAttrs systems (s: fn nixpkgs.legacyPackages.${s});
in {
-
lib.x86_64-linux = import ./global/utils.nix {inherit inputs; system = "x86_64-linux";};
nixosConfigurations = {
koumakan = import ./systems/koumakan {
···
];
forAllSystems = fn: lib.genAttrs systems (s: fn nixpkgs.legacyPackages.${s});
in {
+
lib.x86_64-linux = import ./global/utils.nix {
+
inherit inputs;
+
system = "x86_64-linux";
+
};
nixosConfigurations = {
koumakan = import ./systems/koumakan {
+10 -5
global/utils.nix
···
map (x: namespace + lib.optionalString (lib.stringLength namespace != 0) "/" + x) files
) (_: value);
-
mkNginxFile = {filename ? "index.html", content, status ? 200}: let
contentDir =
if (builtins.typeOf content) == "string"
then builtins.toString (pkgs.writeTextDir filename content) + "/"
···
mkNginxJSON = filename: attrset:
if (builtins.typeOf attrset) != "set"
then throw "attrset: expected argument type `set`, got `${builtins.typeOf attrset}` instead."
-
else mkNginxFile {
-
inherit filename;
-
content = builtins.toJSON attrset;
-
};
}
···
map (x: namespace + lib.optionalString (lib.stringLength namespace != 0) "/" + x) files
) (_: value);
+
mkNginxFile = {
+
filename ? "index.html",
+
content,
+
status ? 200,
+
}: let
contentDir =
if (builtins.typeOf content) == "string"
then builtins.toString (pkgs.writeTextDir filename content) + "/"
···
mkNginxJSON = filename: attrset:
if (builtins.typeOf attrset) != "set"
then throw "attrset: expected argument type `set`, got `${builtins.typeOf attrset}` instead."
+
else
+
mkNginxFile {
+
inherit filename;
+
content = builtins.toJSON attrset;
+
};
}
+1 -1
systems/koumakan/services/matrix/synapse.nix
···
services.nginx.virtualHosts."nue.soopy.moe" = _utils.mkVhost {
locations."= /.well-known/matrix/server" = _utils.mkNginxJSON "server" {
-
"m.server" = "nue.soopy.moe:443";
};
locations."~ ^(/_matrix|/_synapse/client)" = {
···
services.nginx.virtualHosts."nue.soopy.moe" = _utils.mkVhost {
locations."= /.well-known/matrix/server" = _utils.mkNginxJSON "server" {
+
"m.server" = "nue.soopy.moe:443";
};
locations."~ ^(/_matrix|/_synapse/client)" = {
+1 -4
systems/koumakan/services/proxies/nitter.nix
···
-
{
-
_utils,
-
...
-
}: {
services.nginx.virtualHosts."nitter.soopy.moe" = _utils.mkVhost {
locations."/" = _utils.mkNginxFile {
content = ''
···
+
{_utils, ...}: {
services.nginx.virtualHosts."nitter.soopy.moe" = _utils.mkVhost {
locations."/" = _utils.mkNginxFile {
content = ''