about summary refs log tree commit diff
path: root/machines/srv1/configuration.nix
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-03-04 22:35:01 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-03-04 22:35:01 +0100
commitcdc56f5df571d7a5e1a3ce294324a23baaf58875 (patch)
treef3ea17a4ceede41c1c4875d903232d2a124a2b11 /machines/srv1/configuration.nix
parent88c012006011f465b99db1cec5e66b1afde5312e (diff)
downloaddots-cdc56f5df571d7a5e1a3ce294324a23baaf58875.tar.gz
dots-cdc56f5df571d7a5e1a3ce294324a23baaf58875.zip
Charset
Diffstat (limited to 'machines/srv1/configuration.nix')
-rw-r--r--machines/srv1/configuration.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/machines/srv1/configuration.nix b/machines/srv1/configuration.nix
index 362423a..e9d23fd 100644
--- a/machines/srv1/configuration.nix
+++ b/machines/srv1/configuration.nix
@@ -21,9 +21,7 @@ in
     networking.hostName = "srv1";
     networking.extraHosts = ''
       192.168.1.136 srv1.niedzwiedzinski.cyou git.niedzwiedzinski.cyou tmp.niedzwiedzinski.cyou
-    '';
-
-    networking.extraHosts = pkgs.stdenv.lib.readFile ( pkgs.fetchurl {
+    '' + pkgs.stdenv.lib.readFile ( pkgs.fetchurl {
       url = "https://raw.githubusercontent.com/StevenBlack/hosts/d2be343994aacdec74865ff8d159cf6e46359adf/alternates/fakenews-gambling-porn/hosts";
       sha256 = "1la5rd0znc25q8yd1iwbx22zzqi6941vyzmgar32jx568j856s8j";
     } );
@@ -91,10 +89,19 @@ in
   services.sshguard.enable = true;
 
   services.nginx.enable = true;
+  services.nginx.appendHttpConfig = ''
+    charset utf-8;
+    source_charset utf-8;
+  '';
   services.nginx.virtualHosts = {
     "srv1.niedzwiedzinski.cyou" = {
       enableACME = true;
       forceSSL = true;
+      extraConfig = ''
+        location ~ /*.md {
+	  types { } default_type "text/markdown; charset=utf-8";
+        }
+      '';
       root = "/var/www/srv1.niedzwiedzinski.cyou";
     };
     "pics.srv1.niedzwiedzinski.cyou" = {
@@ -141,6 +148,7 @@ in
       '';
       serviceConfig = {
         Type = "oneshot";
+        User = "pn";
       };
     };
     timers.git-fetch = {