diff --git a/machines/levitation/configuration.nix b/machines/levitation/configuration.nix index b28ad9f..a99cdfc 100644 --- a/machines/levitation/configuration.nix +++ b/machines/levitation/configuration.nix @@ -31,7 +31,10 @@ sshKey = config.sops.secrets."borg-ssh-key".path; }; }; - hardware = { amdPassthrough = true; }; + hardware = { + amdPassthrough = true; + printing = true; + }; config = { isDesktop = true; setupGrub = true; diff --git a/modules/linux/default.nix b/modules/linux/default.nix index bba2824..2be8493 100644 --- a/modules/linux/default.nix +++ b/modules/linux/default.nix @@ -110,6 +110,8 @@ in { logitech = mkDefaultOption "logitech" config.nathan.config.isDesktop; # AMD Single gpu passthrough amdPassthrough = mkEnableOption "logitech"; + # Printing setup + printing = mkEnableOption "printing"; }; # Linux specific configuration config = { diff --git a/modules/linux/hardware.nix b/modules/linux/hardware.nix index bf8114e..3e79ec4 100644 --- a/modules/linux/hardware.nix +++ b/modules/linux/hardware.nix @@ -25,7 +25,18 @@ in with lib; { swtpm.enable = true; }; }; + }) + (mkIf nw.printing { + services.printing = { + enable = true; + drivers = with pkgs; [ canon-cups-ufr2 ]; + }; + # Enable avahi for printer discovery + services.avahi = { + enable = true; + nssmdns = true; + }; }) ]; }