80 lines
1.9 KiB
Nix
80 lines
1.9 KiB
Nix
{ config, lib, pkgs, ... }: {
|
|
imports = [
|
|
./utils/bento.nix
|
|
./utils/modules/sops.nix
|
|
./utils/modules/nginx.nix
|
|
./utils/modules/set-nix-channel.nix
|
|
|
|
./modules/mysql.nix
|
|
./modules/web/stack.nix
|
|
./modules/laravel-storage.nix
|
|
./modules/laravel-scheduler.nix
|
|
./modules/blackbox-exporter.nix
|
|
./modules/postfix.nix
|
|
./modules/rspamd.nix
|
|
|
|
./utils/modules/autoupgrade.nix
|
|
./utils/modules/promtail
|
|
./utils/modules/victoriametrics
|
|
./utils/modules/borgbackup.nix
|
|
|
|
./hardware-configuration.nix
|
|
|
|
./sites
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
vim
|
|
screen
|
|
php82
|
|
];
|
|
|
|
time.timeZone = "Europe/Vienna";
|
|
|
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
|
|
|
nix.gc = {
|
|
automatic = true;
|
|
options = "--delete-older-than 60d";
|
|
};
|
|
|
|
boot.tmp.cleanOnBoot = true;
|
|
zramSwap.enable = true;
|
|
|
|
networking.hostName = "amzebs-01";
|
|
networking.domain = "cloonar.com";
|
|
|
|
services.openssh.enable = true;
|
|
users.users.root.openssh.authorizedKeys.keys = import ./utils/ssh-keys.nix;
|
|
|
|
programs.ssh = {
|
|
knownHosts = {
|
|
"git.cloonar.com" = {
|
|
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDlUj7eEfS/4+z/3IhFhOTXAfpGEpNv6UWuYSL5OAhus";
|
|
};
|
|
};
|
|
};
|
|
|
|
# Systemd services to monitor
|
|
services.victoriametrics.monitoredServices = [ "mysql" "nginx" "phpfpm-.*" ];
|
|
|
|
# backups - adjust repo for this host
|
|
borgbackup.repo = "u149513-sub10@u149513-sub10.your-backup.de:borg";
|
|
|
|
# Use HTTP-01 challenge for Let's Encrypt (not DNS)
|
|
security.acme.acceptTerms = true;
|
|
security.acme.defaults.email = "admin+acme@cloonar.com";
|
|
|
|
networking.firewall = {
|
|
enable = true;
|
|
allowedTCPPorts = [ 22 80 443 3306 ];
|
|
|
|
# Allow MariaDB access only from specific IP
|
|
extraCommands = ''
|
|
iptables -A nixos-fw -p tcp --dport 3306 -s 77.119.230.30 -j nixos-fw-accept
|
|
'';
|
|
};
|
|
|
|
system.stateVersion = "25.11";
|
|
}
|