diff --git a/flake.nix b/flake.nix index 7296372..ba63f07 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,18 @@ inherit system; }; }; + nginx = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + "${inputs.self}/services" + { + networking.hostName = "nginx"; + services.vm_nginx = { + enable = true; + }; + } + ]; + }; jellyfin = nixpkgs.lib.nixosSystem { inherit system; modules = [ @@ -116,6 +128,18 @@ } ]; }; + redis = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + "${inputs.self}/services" + { + networking.hostName = "redis"; + services.vm_redis = { + enable = true; + }; + } + ]; + }; grafana = nixpkgs.lib.nixosSystem { inherit system; modules = [ diff --git a/services/minimalConfig/default.nix b/services/minimalConfig/default.nix index cb2fa79..6757520 100644 --- a/services/minimalConfig/default.nix +++ b/services/minimalConfig/default.nix @@ -1,12 +1,18 @@ -{ config, pkgs, lib, inputs, ... }: +{ config, pkgs, lib, inputs, modulesPath, ... }: { nix = { settings.experimental-features = [ "nix-command" "flakes" ]; settings.trusted-users = [ "root" "@wheel" ]; }; + imports = [ (modulesPath + "/virtualisation/proxmox-lxc.nix") ]; + + systemd.suppressedSystemUnits = [ + "dev-mqueue.mount" + "sys-kernel-debug.mount" + "sys-fs-fuse-connections.mount" + ]; networking = { - hostName = "${config.services.vm.hostname}"; firewall = { enable = true; allowedTCPPorts = [ 22 9002 ]; diff --git a/services/nginx/default.nix b/services/nginx/default.nix index 40621db..d6b3bc6 100644 --- a/services/nginx/default.nix +++ b/services/nginx/default.nix @@ -55,16 +55,16 @@ in https "max-age=31536000; includeSubdomains; preload"; } add_header Strict-Transport-Security $hsts_header; - + # Enable CSP for your services. #add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always; - + # Minimize information leaked to other domains add_header 'Referrer-Policy' 'origin-when-cross-origin'; - + # Disable embedding as a frame - add_header X-Frame-Options DENY; - + add_header X-Frame-Options SAMEORIGIN; + # Prevent injection of code in other mime types (XSS Attacks) add_header X-Content-Type-Options nosniff; client_body_buffer_size 400M; @@ -121,7 +121,7 @@ in forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://192.168.1.25:9000"; + proxyPass = "http://192.168.1.125:9000"; recommendedProxySettings = true; proxyWebsockets = true; };