60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{ self, config, lib, pkgs, inputs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
antamap-pkg = pkgs.stdenv.mkDerivation {
|
|
name = "antamap";
|
|
src = pkgs.fetchgit {
|
|
url = "https://0xacab.org/AND/antamap.git";
|
|
branchName = "master";
|
|
rev = "9ae22e3e8e436b54064a0be371f835273272c322";
|
|
sha256 = "sha256-LHDAYzHLcazIf/bEUXSRytwkOadyYjFwwwQiMQqFtUY=";
|
|
};
|
|
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
in
|
|
{
|
|
networking = {
|
|
hostName = mkDefault "antamap";
|
|
useDHCP = false;
|
|
};
|
|
|
|
imports = [
|
|
self.nixosModules.malobeo.users
|
|
../modules/sshd.nix
|
|
];
|
|
|
|
malobeo.users = {
|
|
malobeo = false;
|
|
admin = true;
|
|
};
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
virtualHosts."_" = {
|
|
listen = [
|
|
{ addr = "0.0.0.0"; port = 80; }
|
|
];
|
|
root = "${antamap-pkg}";
|
|
extraConfig = ''
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
'';
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
|
}
|
|
|