{
  description = "A very basic flake";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, nixpkgs, flake-utils }:
    (flake-utils.lib.eachDefaultSystem (system:
      let pkgs = nixpkgs.legacyPackages.${system};
      in {
        defaultPackage = pkgs.stdenv.mkDerivation {
          name = "erambler-html";
          src = ./.;
          nativeBuildInputs = [ pkgs.hugo ];
          buildPhase = "hugo";
          installPhase = ''
            mkdir $out
            cp -R public/* $out
          '';
        };

        devShell = pkgs.mkShell {
          buildInputs = with pkgs; [
            (python38.withPackages
              (py: with py; [ python invoke rich requests ruamel_yaml sh ]))
            yarn
            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 ];
        };
      };
}
