BIG changes. Make almost every server service modular, to distribute among multiple servers

This commit is contained in:
Bun 2025-03-18 05:32:05 -04:00
parent 30fc0dc800
commit 7e40fd4fb3
44 changed files with 153 additions and 143 deletions

View file

@ -1,10 +1,7 @@
{ config, lib, pkgs, ... }:
{
options.system.libvirtd.enable = lib.mkEnableOption "Enable libvirtd services";
config = lib.mkIf config.system.libvirtd.enable {
config = lib.mkIf config.virtualisation.libvirtd.enable {
virtualisation.libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemu = {
@ -19,6 +16,13 @@
programs.virt-manager.enable = true;
networking.firewall.trustedInterfaces = [
"virbr0"
"virbr1"
];
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 - libvirtd -" ];
environment.persistence."/persist".directories = [
"/var/lib/libvirt/dnsmasq"
"/var/lib/libvirt/nwfilter"
@ -27,13 +31,5 @@
"/var/lib/libvirt/storage"
"/var/lib/libvirt/swtpm"
];
# Needed to make NAT work
networking.firewall.trustedInterfaces = [
"virbr0"
"virbr1"
];
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 - libvirtd -" ];
};
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:
{
services.tlp.enable = true;
services.tlp.enable = config.system.desktop.enable;
}