157 lines
3.6 KiB
Nix
Raw Normal View History

2024-02-08 23:21:10 +03:00
{ inputs, lib, pkgs, config, ... }:
2023-06-27 01:25:28 +03:00
let persistRoot = config.autoinstall.persist.persistRoot or "/persist";
2023-01-26 00:24:32 +03:00
in {
imports = with inputs.self; [
2024-11-18 03:14:13 +03:00
inputs.disko.nixosModules.disko
inputs.srvos.nixosModules.server
inputs.srvos.nixosModules.mixins-terminfo
./disk-config.nix
./backups.nix
2023-01-26 00:24:32 +03:00
./boot.nix
2024-11-18 03:14:13 +03:00
./networking.nix
2023-01-26 00:24:32 +03:00
./virtualisation.nix
2023-10-13 19:43:02 +03:00
customProfiles.hardened
customRoles.hypervisor
2024-01-21 16:32:12 +03:00
2024-11-18 03:14:13 +03:00
./nginx.nix
# customProfiles.tg-bot
2024-06-30 13:53:24 +03:00
2023-10-13 19:43:02 +03:00
customProfiles.acme
2024-11-18 03:14:13 +03:00
# customProfiles.attic
# customProfiles.atticd
# customProfiles.authentik
# customProfiles.battery-historian
# customProfiles.coturn
# customProfiles.fail2ban
2023-10-13 19:43:02 +03:00
customProfiles.gitea
2024-11-18 03:14:13 +03:00
# customProfiles.homepage
# customProfiles.hoyolab
# customProfiles.inpx-web
# customProfiles.it-tools
customProfiles.media-stack
2024-11-18 03:14:13 +03:00
# customProfiles.metrics
# customProfiles.minio
# customProfiles.netbird-server
# customProfiles.nginx
# customProfiles.ocis
# customProfiles.onlyoffice
# customProfiles.openbooks
# customProfiles.outline
# customProfiles.radicale
# customProfiles.spdf
# customProfiles.synapse
2023-10-13 19:43:02 +03:00
customProfiles.tinyproxy
2024-11-18 03:14:13 +03:00
# customProfiles.vault
# customProfiles.vaultwarden
# customProfiles.webhooks
# customProfiles.wiki
# customProfiles.yandex-db
# (import customProfiles.blocky {
# inherit (import ./dns-mapping.nix) dnsmasq-list;
# })
# (import customProfiles.headscale {
# inherit (import ./dns-mapping.nix) headscale-list;
# })
2023-01-26 00:24:32 +03:00
];
2024-03-04 00:00:27 +03:00
security.lockKernelModules = lib.mkForce false;
2023-01-26 00:24:32 +03:00
deviceSpecific.devInfo = {
2024-01-21 19:29:36 +03:00
cpu.vendor = "intel";
drive.type = "ssd";
gpu.vendor = "other";
2024-11-18 03:14:13 +03:00
ram = 8;
2023-01-26 00:24:32 +03:00
fileSystem = "zfs";
};
deviceSpecific.isServer = true;
2024-01-21 19:29:36 +03:00
deviceSpecific.vpn.tailscale.enable = true;
# Tailscale auto-login
2024-11-18 03:14:13 +03:00
# services.headscale-auth.home-hypervisor = {
# outPath = "/tmp/hypervisor-authkey";
# before = [ "tailscaled-autoconnect.service" ];
# };
# services.tailscale = {
# authKeyFile = "/tmp/hypervisor-authkey";
# extraUpFlags = [
# "--login-server=https://wg.ataraxiadev.com"
# "--accept-dns=false"
# "--advertise-exit-node=false"
# "--operator=${config.mainuser}"
# ];
# };
2023-01-26 00:24:32 +03:00
zramSwap = {
enable = true;
algorithm = "zstd";
2023-05-24 21:28:50 +03:00
memoryPercent = 150;
2023-01-26 00:24:32 +03:00
};
# Impermanence
persist = {
enable = true;
cache.clean.enable = true;
state = {
files = [ "/etc/machine-id" ];
};
2023-01-26 00:24:32 +03:00
};
2023-06-23 18:28:56 +03:00
environment.memoryAllocator.provider = "libc";
2024-11-18 03:14:13 +03:00
services.udisks2.enable = false;
fonts.enableDefaultPackages = false;
2023-08-04 02:37:47 +03:00
fonts.packages =
2023-06-27 01:25:28 +03:00
[ (pkgs.nerdfonts.override { fonts = [ "FiraCode" "VictorMono" ]; }) ];
2023-01-26 00:24:32 +03:00
security.polkit.enable = true;
services.zfs = {
autoScrub.enable = true;
2023-11-22 05:57:58 +03:00
autoScrub.interval = "monthly";
2023-01-26 00:24:32 +03:00
trim.enable = true;
trim.interval = "weekly";
};
2024-11-18 03:14:13 +03:00
services.postgresql.enable = true;
2024-07-07 16:59:27 +03:00
services.postgresql.settings = {
full_page_writes = "off";
wal_init_zero = "off";
wal_recycle = "off";
};
2023-01-26 00:24:32 +03:00
2024-11-18 03:14:13 +03:00
nix.settings.experimental-features = [
"cgroups"
"fetch-closure"
"recursive-nix"
];
2023-01-26 00:24:32 +03:00
home-manager.users.${config.mainuser} = {
home.file.".config/libvirt/libvirt.conf".text = ''
uri_default = "qemu:///system"
'';
2023-01-13 04:03:15 +03:00
home.packages = with pkgs; [
2023-06-27 01:25:28 +03:00
bat
bottom
comma
2023-11-11 03:15:07 +03:00
dig.dnsutils
2023-07-30 03:27:14 +03:00
fd
2023-06-27 01:25:28 +03:00
kitty
micro
nix-index-update
2023-07-30 03:27:14 +03:00
p7zip
2023-06-27 01:25:28 +03:00
podman-compose
pwgen
2023-11-11 03:14:37 +03:00
rclone
2023-07-30 03:27:14 +03:00
repgrep
2023-11-11 03:14:37 +03:00
restic
2024-01-21 19:29:36 +03:00
rsync
2023-11-11 03:14:37 +03:00
rustic-rs
2023-06-27 01:25:28 +03:00
smartmontools
2023-01-13 04:03:15 +03:00
];
2023-01-26 00:24:32 +03:00
xdg.mime.enable = false;
2024-11-18 03:14:13 +03:00
home.stateVersion = "24.11";
2023-01-26 00:24:32 +03:00
};
2024-11-18 03:14:13 +03:00
system.stateVersion = "24.11";
2023-01-26 00:24:32 +03:00
}