diff --git a/flake.nix b/flake.nix index b119686..15bcd78 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: + (flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { defaultPackage = pkgs.stdenv.mkDerivation { @@ -18,6 +18,7 @@ cp -R public/* $out ''; }; + devShell = pkgs.mkShell { buildInputs = with pkgs; [ (python38.withPackages @@ -26,5 +27,20 @@ hugo ]; }; - }); + })) // { + nixosModule = { + services.nginx = { + enable = true; + + virtualHosts."erambler.co.uk" = { + enableACME = true; + forceSSL = true; + + root = "/srv/www/erambler.co.uk"; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; + }; + }; }