From 011d702cce8c112b30fc21333fe5d91f1ae888ef Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 29 Jul 2021 13:28:02 -0300 Subject: mv servers{ => /active}/nixvps --- servers/nixvps/configuration.nix | 156 --------------------------------------- 1 file changed, 156 deletions(-) delete mode 100644 servers/nixvps/configuration.nix (limited to 'servers/nixvps/configuration.nix') diff --git a/servers/nixvps/configuration.nix b/servers/nixvps/configuration.nix deleted file mode 100644 index 0a51b68..0000000 --- a/servers/nixvps/configuration.nix +++ /dev/null @@ -1,156 +0,0 @@ -{ config, pkgs, ... }: - -let - envsubstConfiguration = - pkgs.callPackage /etc/nixos/envsubst-configuration.nix { }; - config = rec { - TLD = envsubstConfiguration.TLD; - openSSHPort = 23841; - }; -in { - imports = [ ./hardware-configuration.nix ]; - - boot.loader.grub = { - enable = true; - version = 2; - device = "/dev/vda"; - }; - - networking = { - interfaces.ens3.useDHCP = true; - }; - - nix = { - gc = { - automatic = true; - options = "--delete-older-than 7d"; - }; - # min-free 1G - extraOptions = '' - min-free = ${toString (1024 * 1024 * 1024)} - ''; - }; - - environment = { - systemPackages = let - c99 = pkgs.tinycc.overrideAttrs (oldAttrs: { - postInstall = '' - ln -s $out/bin/tcc $out/bin/c99 - ''; - }); - in with pkgs; [ vim git gitAndTools.git-annex gnumake gnum4 c99 bpytop ]; - shellAliases = { l = "ls -lahF"; }; - }; - - networking.firewall.allowedTCPPorts = [ - # SSH: OpenSSH - config.openSSHPort - - # HTTP and HTPPS: NGINX - 80 - 443 - ]; - - security = { - acme = { - acceptTerms = true; - email = "eu@euandre.org"; - }; - sudo.enable = false; - doas = { - enable = true; - extraConfig = '' - permit nopass setenv { NIX_PATH } :wheel - ''; - }; - }; - - services = { - openssh = { - enable = true; - permitRootLogin = "no"; - passwordAuthentication = false; - ports = [ config.openSSHPort ]; - }; - - nginx = { - enable = true; - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts = { - "${config.TLD}" = { - forceSSL = true; - enableACME = true; - root = "/srv/http/"; - extraConfig = '' - # Allow