2024-06-19 08:34:47 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-06-21 13:46:57 +02:00
|
|
|
sources,
|
2024-06-19 08:34:47 +02:00
|
|
|
...
|
|
|
|
}:
|
2024-06-21 13:46:57 +02:00
|
|
|
let
|
|
|
|
host = "betamail.katvayor.net";
|
|
|
|
in
|
2024-06-19 08:34:47 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2024-06-21 13:46:57 +02:00
|
|
|
"${sources.nixos-mailserver}"
|
2024-06-19 08:34:47 +02:00
|
|
|
./hardware-configuration.nix
|
|
|
|
./disks.nix
|
2024-06-21 13:46:57 +02:00
|
|
|
./modo.nix
|
2024-06-19 08:34:47 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
boot.supportedFilesystems = [ "bcachefs" ];
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
interfaces."enp1s0" = {
|
|
|
|
useDHCP = false;
|
|
|
|
ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "192.168.122.3";
|
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
ipv6.addresses = [
|
|
|
|
{
|
|
|
|
address = "fe80::3";
|
|
|
|
prefixLength = 64;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
defaultGateway = "192.168.122.1";
|
|
|
|
defaultGateway6 = {
|
|
|
|
address = "fe80::1";
|
|
|
|
interface = "enp1s0";
|
|
|
|
};
|
|
|
|
nameservers = [
|
|
|
|
"192.168.122.1"
|
|
|
|
"fe80::1%enp1s0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
console = {
|
|
|
|
font = "Lat2-Terminus16";
|
|
|
|
keyMap = "fr";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.dbus.packages = with pkgs; [ dconf ];
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
nix-search-cli
|
|
|
|
git
|
|
|
|
btop
|
|
|
|
ranger
|
|
|
|
screen
|
|
|
|
];
|
|
|
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
|
2024-06-21 13:46:57 +02:00
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
|
|
|
defaults.email = "root@katvayor.net";
|
|
|
|
};
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts."betamail.katvayor.net" = {
|
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
2024-07-09 17:55:50 +02:00
|
|
|
locations."/" = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
proxyPass = "http://localhost:8000/";
|
|
|
|
};
|
2024-06-21 13:46:57 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
|
|
|
fqdn = host;
|
|
|
|
domains = [ host ];
|
|
|
|
|
|
|
|
loginAccounts = {
|
2024-06-23 15:57:17 +02:00
|
|
|
"root@${host}" = {
|
2024-06-25 18:31:43 +02:00
|
|
|
catchAll = [ host ];
|
2024-06-23 15:57:17 +02:00
|
|
|
aliases = builtins.genList (id: "user${toString id}@${host}") 10 ++ [ "moderators@${host}" ];
|
2024-06-21 13:46:57 +02:00
|
|
|
hashedPassword = "$2b$05$FoCVDECXYG0KXPigPuIZtuNFiviwSg8RuXx0FbnzC7ZRp.Mz8VWOe";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
certificateScheme = "acme";
|
|
|
|
};
|
|
|
|
|
2024-06-19 08:34:47 +02:00
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|