if imported in external projects `inputs.self` will point to the external resource instead of malobeo leading to errors. therefore all occurences of inputs.self got replaces with inputs.malobeo
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{ 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 = "ec584c0c4bd4ddd9ff8353bf8a926bd94526d304";
|
|
sha256 = "sha256-o5alTWBZIaUJiwYE0/gkGlxH+v1BxaGauxHDb6gK3+I=";
|
|
};
|
|
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
in
|
|
{
|
|
networking = {
|
|
hostName = mkDefault "antamap";
|
|
useDHCP = false;
|
|
};
|
|
|
|
imports = [
|
|
inputs.malobeo.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?
|
|
}
|
|
|