nix-infra/hosts/bloodletting/configuration.nix

80 lines
2.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, ... }: {
imports = [
./hardware-configuration.nix
../../common/fragments/bin.nix
../../common/fragments/fail2ban.nix
../../common/fragments/grafana.nix
../../common/fragments/homepage.nix
../../common/fragments/mastodon-ebooks.nix
../../common/fragments/matterbridge.nix
../../common/fragments/nyandroid.nix
../../common/fragments/prometheus_exporters.nix
../../common/home_manager/common.nix
];
nixpkgs.overlays = [
(self: super: { bin = self.callPackage ../../common/pkgs/bin.nix { }; })
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "bloodletting";
# Enable networking
networking.networkmanager.enable = true;
# System packages
environment.systemPackages = with pkgs; [ bin matterbridge vsftpd ];
environment.variables.EDITOR = "helix";
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
banner = ''
Hello mistress ^,,^
'';
passwordAuthentication = false;
};
# Open ports in the firewall.
networking.firewall = {
allowedTCPPorts = [ 80 443 20 21 22 990 6162 ];
allowedTCPPortRanges = [{
from = 40000;
to = 40200;
}];
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.dnsname.enable = true;
};
oci-containers = { backend = "podman"; };
};
# SSL/TLS Certificates
security.acme.acceptTerms = true;
security.acme.defaults.email = "letsencrypt@technogothic.net";
security.acme.certs."technogothic.net" = {
domain = "*.technogothic.net";
dnsProvider = "rfc2136";
credentialsFile = "/var/lib/secrets/rfc2136-technogothic-net";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
}