Add server config to flake.nix
This commit is contained in:
parent
a7be6d1b37
commit
c5e84d6387
20
flake.nix
20
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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue