Add all printing support and add vm guest services module

This commit is contained in:
Tyler Kelley 2024-05-14 14:01:31 -05:00
parent 69f449823b
commit c3280afa7a
3 changed files with 36 additions and 0 deletions

View File

@ -16,6 +16,7 @@ in
./users.nix
../../modules/amd-drivers.nix
../../modules/nvidia-drivers.nix
../../modules/vm-guest-services.nix
];
# Bootloader.
@ -179,6 +180,17 @@ in
services.libinput.enable = true;
services.openssh.enable = true;
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
services.ipp-usb.enable = true;
hardware.sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan ];
disabledDefaultBackends = [ "escl" ];
};
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
@ -239,6 +251,7 @@ in
# Extra Module Options
drivers.amdgpu.enable = true;
drivers.nvidia.enable = false;
vm.guest-services.enable = false;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];

View File

@ -19,6 +19,8 @@ in
"networkmanager"
"wheel"
"libvirtd"
"scanner"
"lp"
];
shell = pkgs.bash;
ignoreShellProgramCheck = true;

View File

@ -0,0 +1,21 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.vm.guest-services;
in
{
options.vm.guest-services = {
enable = mkEnableOption "Enable Virtual Machine Guest Services";
};
config = mkIf cfg.enable {
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true;
services.spice-webdavd.enable = true;
};
}