From 5bf9572734025ddbe680c0c4978f72df5718ae4b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 7 Mar 2022 19:12:06 -0300 Subject: Delete all old code and configuration to start from scratch with Guix only Delete files related to: - Terraform - opt/* - scripts/deploy - secrets/* - git-crypt - Nix --- servers/active/nixvps/configuration.nix | 229 -------------------------------- 1 file changed, 229 deletions(-) delete mode 100644 servers/active/nixvps/configuration.nix (limited to 'servers/active/nixvps/configuration.nix') diff --git a/servers/active/nixvps/configuration.nix b/servers/active/nixvps/configuration.nix deleted file mode 100644 index 4d793db..0000000 --- a/servers/active/nixvps/configuration.nix +++ /dev/null @@ -1,229 +0,0 @@ -{ config, pkgs, ... }: - -let - envsubstConfiguration = - pkgs.callPackage /opt/secrets/envsubst-configuration.nix { }; - config = rec { - TLD = envsubstConfiguration.TLD; - cgitPort = "81"; - openSSHPort = 23841; - }; -in { - imports = [ - ./hardware-configuration.nix - (builtins.fetchTarball { - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/master/nixos-mailserver-master.tar.gz"; - }) - ]; - - 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 - - # Git daemon - 9418 - ]; - - 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