BIG changes. Make almost every server service modular, to distribute among multiple servers
This commit is contained in:
parent
30fc0dc800
commit
7e40fd4fb3
44 changed files with 153 additions and 143 deletions
|
@ -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 -" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.tlp.enable = true;
|
||||
services.tlp.enable = config.system.desktop.enable;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue