mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
Added printer setup
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
#https://wiki.nixos.org/wiki/Printing
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
#cups-browsed
|
||||
#gutenprint
|
||||
#gutenprintBin
|
||||
hplipWithPlugin
|
||||
hplip
|
||||
];
|
||||
};
|
||||
services.ipp-usb.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.print-manager
|
||||
ghostscript
|
||||
hplipWithPlugin
|
||||
];
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "HP_OfficeJet_Pro_7740";
|
||||
location = "Home";
|
||||
deviceUri = "hp:/usb/OfficeJet_Pro_7740_series";
|
||||
model = "drv:///hp/hpcups.drv/hp-officejet_pro_7740_series.ppd";
|
||||
}
|
||||
];
|
||||
|
||||
ensureDefaultPrinter = "HP_OfficeJet_Pro_7740";
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
# add a desktop entry here if you have an error like
|
||||
# Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")
|
||||
|
||||
# see ../../docs/printing.md
|
||||
{
|
||||
home.file.".local/share/applications/org.quickshell.desktop" = {
|
||||
enable = true;
|
||||
@@ -19,4 +17,16 @@
|
||||
X-DBUS-ServiceName=org.quickshell
|
||||
'';
|
||||
};
|
||||
home.file.".local/share/applications/org.kde.PrintQueue.desktop" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Print Queue
|
||||
Exec=print-queue
|
||||
Icon=printer
|
||||
Categories=Utility;
|
||||
StartupNotify=true
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user