nixos-config/hosts/orion/default.nix

125 lines
2.5 KiB
Nix
Raw Normal View History

2025-03-12 14:11:59 +03:00
{
2025-07-08 19:58:35 +03:00
lib,
pkgs,
inputs,
...
}:
{
imports = [
inputs.srvos.nixosModules.server
inputs.srvos.nixosModules.mixins-terminfo
2025-07-08 19:58:52 +03:00
./boot.nix
2025-07-08 19:58:35 +03:00
./disk-config.nix
2025-07-08 19:59:19 +03:00
./backups.nix
2025-07-08 19:58:35 +03:00
];
2025-03-12 14:11:59 +03:00
ataraxia.defaults.role = "server";
2025-07-08 19:58:35 +03:00
ataraxia.defaults.hardware.cpuVendor = "intel";
ataraxia.defaults.hardware.gpuVendor = "intel";
2025-03-12 15:42:24 +03:00
# Impermanence
2025-07-08 19:58:35 +03:00
ataraxia.filesystems.zfs.enable = true;
2025-03-12 15:42:24 +03:00
ataraxia.filesystems.zfs.eraseOnBoot.enable = true;
ataraxia.filesystems.zfs.eraseOnBoot.snapshots = [
2025-07-08 19:58:35 +03:00
"rpool/nixos/root@empty"
"rpool/user/home@empty"
2025-03-12 15:42:24 +03:00
];
ataraxia.filesystems.zfs.mountpoints = [
"/etc/secrets"
"/media/libvirt"
"/nix"
"/persist"
2025-07-08 19:58:35 +03:00
"/srv"
"/var/lib/containers"
"/etc/secrets"
2025-03-12 15:42:24 +03:00
"/var/lib/docker"
"/var/lib/libvirt"
"/var/lib/nixos-containers"
"/var/lib/postgresql"
"/var/log"
"/vol"
];
2025-07-08 19:58:35 +03:00
ataraxia.networkd = {
enable = true;
domain = "home.ataraxiadev.com";
ifname = "enp2s0";
mac = "d4:3d:7e:26:a8:af";
bridge.enable = true;
ipv4 = [
{
address = "10.10.10.10/24";
gateway = "10.10.10.1";
dns = [
"10.10.10.1"
"9.9.9.9"
];
}
];
};
security.lockKernelModules = lib.mkForce false;
environment.memoryAllocator.provider = lib.mkForce "libc";
# Services
services.postgresql.enable = true;
services.postgresql.settings = {
full_page_writes = "off";
wal_init_zero = "off";
wal_recycle = "off";
};
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
};
# Auto-mount lan nfs share
fileSystems."/media/local-nfs" = {
device = "10.10.10.11:/";
fsType = "nfs4";
options = [
"nfsvers=4.2"
"x-systemd.automount"
"noauto"
];
};
environment.systemPackages = with pkgs; [
bat
bottom
dnsutils
fd
kitty.terminfo
micro
mkvtoolnix-cli
nfs-utils
p7zip
podman-compose
pwgen
ripgrep
rsync
rustic-rs
smartmontools
];
2025-07-08 20:14:14 +03:00
ataraxia.containers.filestash.enable = true;
2025-07-08 20:14:39 +03:00
ataraxia.containers.media-stack.enable = true;
ataraxia.containers.tinyproxy.enable = true;
2025-07-08 20:06:38 +03:00
ataraxia.security.acme.enable = true;
2025-07-08 20:08:11 +03:00
ataraxia.services.authentik.enable = true;
2025-07-08 20:08:38 +03:00
ataraxia.services.gitea.enable = true;
2025-07-08 20:09:57 +03:00
ataraxia.services.syncyomi.enable = true;
2025-07-08 20:03:12 +03:00
ataraxia.services.vaultwarden.enable = true;
2025-07-08 20:00:25 +03:00
ataraxia.virtualisation.guests = {
omv = {
autoStart = true;
2025-07-10 18:29:41 +03:00
user = "root";
group = "root";
2025-07-08 20:00:25 +03:00
xmlFile = ./vm/omv.xml;
};
};
2025-07-08 19:58:35 +03:00
system.stateVersion = "25.05";
2025-03-12 14:11:59 +03:00
}