diff options
author | EuAndreh <eu@euandre.org> | 2020-10-23 08:42:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-10-23 08:43:14 -0300 |
commit | 42d440c542f10593f2f7f3b5556526db06305f35 (patch) | |
tree | 8e1a026abd580da92f9d9c059dbf0669b154caff | |
parent | Add bash scripts for tests instead of Nix (diff) | |
download | toph-42d440c542f10593f2f7f3b5556526db06305f35.tar.gz toph-42d440c542f10593f2f7f3b5556526db06305f35.tar.xz |
Run nixfmt
-rw-r--r-- | default.nix | 3 | ||||
-rw-r--r-- | envsubst-configuration.nix | 4 | ||||
-rw-r--r-- | vps-configuration.nix | 122 |
3 files changed, 56 insertions, 73 deletions
diff --git a/default.nix b/default.nix index ae37a1f..5a11e34 100644 --- a/default.nix +++ b/default.nix @@ -2,8 +2,7 @@ let niv-sources = import ./nix/sources.nix; pkgs = import niv-sources.nixpkgs { }; src = pkgs.nix-gitignore.gitignoreSource [ "!.git" ] ./.; - projectBuildInputs = with pkgs; [ - ]; + projectBuildInputs = with pkgs; [ ]; in { test = pkgs.stdenv.mkDerivation { inherit src; diff --git a/envsubst-configuration.nix b/envsubst-configuration.nix index 005239b..3ec28c3 100644 --- a/envsubst-configuration.nix +++ b/envsubst-configuration.nix @@ -1,3 +1 @@ -{ }: { - TLD = "$TLD"; -} +{ }: { TLD = "$TLD"; } diff --git a/vps-configuration.nix b/vps-configuration.nix index 574d1d7..c167d29 100644 --- a/vps-configuration.nix +++ b/vps-configuration.nix @@ -73,18 +73,10 @@ in { ''; }; - environment = { - systemPackages = with pkgs; [ - vim - git - gitAndTools.git-annex - gotop - ]; + systemPackages = with pkgs; [ vim git gitAndTools.git-annex gotop ]; - shellAliases = { - l = "ls -lahF"; - }; + shellAliases = { l = "ls -lahF"; }; }; networking.firewall.allowedTCPPorts = [ @@ -115,66 +107,62 @@ in { recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts = - builtins.fold - (repo: acc: acc // static-site-from-repo repo) - {} - config.static-sites // - builtins.fold - (project: acc: acc // docs-site-for-project project) - {} - config.docs-projects // { - "${config.TLD}" = { - locations."= /.well-known/matrix/server".extraConfig = '' - add_header Content-Type application/json; - return 200 '${builtins.toJSON config.matrixServerJSON}'; - ''; - locations."= /.well-known/matrix/client".extraConfig = '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON config.matrixClientJSON}'; - ''; - }; - "${config.matrixDomain}" = { - enableACME = true; - forceSSL = true; - locations."/_matrix" = { - proxyPass = "http://[::1]:${toString config.matrixPort}"; - }; + builtins.fold (repo: acc: acc // static-site-from-repo repo) { } + config.static-sites + // builtins.fold (project: acc: acc // docs-site-for-project project) + { } config.docs-projects // { + "${config.TLD}" = { + locations."= /.well-known/matrix/server".extraConfig = '' + add_header Content-Type application/json; + return 200 '${builtins.toJSON config.matrixServerJSON}'; + ''; + locations."= /.well-known/matrix/client".extraConfig = '' + add_header Content-Type application/json; + add_header Access-Control-Allow-Origin *; + return 200 '${builtins.toJSON config.matrixClientJSON}'; + ''; + }; + "${config.matrixDomain}" = { + enableACME = true; + forceSSL = true; + locations."/_matrix" = { + proxyPass = "http://[::1]:${toString config.matrixPort}"; }; - "${config.elementDomain}" = { - enableACME = true; - forceSSL = true; - root = pkgs.element-web.override { - conf = { - default_server_config."m.homeserver" = { - "base_url" = "https://${config.matrixDomain}"; - "server_name" = "https://${config.matrixDomain}"; - }; + }; + "${config.elementDomain}" = { + enableACME = true; + forceSSL = true; + root = pkgs.element-web.override { + conf = { + default_server_config."m.homeserver" = { + "base_url" = "https://${config.matrixDomain}"; + "server_name" = "https://${config.matrixDomain}"; }; }; }; - "${config.nextcloudDomain}" = { - forceSSL = true; - enableACME = true; - }; - "git.${config.TLD}" = { - forceSSL = true; - enableACME = true; - extraConfig = '' - location = /favicon.ico { - alias /data/favicons/git.ico; - } - location / { - proxy_pass http://localhost:${config.gitPort}; - } - ''; - }; - "ci.${config.TLD}" = { - forceSSL = true; - enableACME = true; - root = "/data/static/ci-logs/"; - }; }; + "${config.nextcloudDomain}" = { + forceSSL = true; + enableACME = true; + }; + "git.${config.TLD}" = { + forceSSL = true; + enableACME = true; + extraConfig = '' + location = /favicon.ico { + alias /data/favicons/git.ico; + } + location / { + proxy_pass http://localhost:${config.gitPort}; + } + ''; + }; + "ci.${config.TLD}" = { + forceSSL = true; + enableACME = true; + root = "/data/static/ci-logs/"; + }; + }; }; nextcloud = { @@ -259,9 +247,7 @@ in { cron = { enable = true; - systemCronJobs = [ - "0 12 * * * root /data/cron/borg.sh" - ]; + systemCronJobs = [ "0 12 * * * root /data/cron/borg.sh" ]; }; }; |