# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
-{ config, lib, pkgs, ... } @ args:
+{ config, lib, pkgs, inputs, ... } @ args:
{
imports =
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.download-buffer-size = 500000000;
- nix.package = pkgs.nixVersions.nix_2_28;
nix.gc = {
automatic = true;
sudo.wheelNeedsPassword = false;
};
- # nixpkgs.config.allowUnfree = true;
+ nixpkgs.config.allowUnfree = true;
+
+ nixpkgs.overlays = [
+ (inputs.psch-flakes.overlays.cgit)
+ ];
# List packages installed in system profile. To search, run:
# $ nix search wget
# virtualisation.qemu.guestAgent.enable = true;
programs.mosh.enable = true;
-
services.caddy = {
enable = true;
+
+ virtualHosts."tnx.sh".extraConfig = ''
+ respond "The Website is under Construction."
+ '';
virtualHosts."psch.dev".extraConfig = ''
basic_auth /julius_cam/* { test $2a$14$iKv0GlwavCunG0zQbaf2fOl4r4/8k8gDKUVUouu9Q3o.MfSDkp6Te }
root * /srv/www
request_buffers 8192
}
'';
+ virtualHosts."mail.psch.dev".extraConfig = ''
+ respond mail
+ '';
};
services.caddy.virtualHosts."git.psch.dev".extraConfig = ''
encode gzip zstd
clone-url=https://git.psch.dev/$CGIT_REPO_URL git://psch.dev/$CGIT_REPO_URL ssh://git@psch.dev/~/$CGIT_REPO_URL
noplainemail=1
side-by-side-diffs=1
+ repository-sort=age
about-filter=${pkgs.writeShellScript "markdown-filter" ''
echo '<div class="markdown-body">'
${pkgs.md4c}/bin/md2html --github --ftables
};
};
+ # Mail Server
+ mailserver = {
+ enable = true;
+ # stateVersion = 1;
+ fqdn = "mail.psch.dev";
+ domains = [ "psch.dev" ];
+
+ # A list of all login accounts. To create the password hashes, use
+ # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
+ loginAccounts = {
+ "ps@psch.dev" = {
+ hashedPassword = "$2b$05$dd65mMjWxZNc.MK4YUwLgeRMInJHvwNTazptImrw4paRqyX/p4TQG";
+ aliases = ["p@psch.dev" "patrick@psch.dev"];
+ };
+ };
+
+ certificateScheme = "manual";
+ certificateFile = "/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.psch.dev/mail.psch.dev.crt";
+ keyFile = "/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.psch.dev/mail.psch.dev.key";
+ };
+ # security.acme.acceptTerms = true;
+ # security.acme.defaults.email = "patrick.schoenberger@posteo.de";
+
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.