diff --git a/flake.nix b/flake.nix index 302f66f..7e7745f 100644 --- a/flake.nix +++ b/flake.nix @@ -66,11 +66,10 @@ mkHost = hostName: let hostVars = import ./hosts/${hostName}/variables.nix; - hostPrinterVars = import ./hosts/${hostName}/printers.nix; in nixpkgs.lib.nixosSystem { inherit (hostVars) system; - specialArgs = hostVars // hostPrinterVars // {inherit inputs;}; + specialArgs = hostVars // {inherit inputs;}; modules = [ ./profiles/${hostVars.profile} nix-flatpak.nixosModules.nix-flatpak diff --git a/hosts/Garand-Desktop/printers.nix b/hosts/Garand-Desktop/printers.nix deleted file mode 100644 index 52aae7f..0000000 --- a/hosts/Garand-Desktop/printers.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - printEnable = false; - - ensureDefaultPrinter = "Brother-T525W"; - - ensurePrinters = [ - { - deviceUri = "ipp://192.168.1.110/ipp"; - location = "home"; - name = "Brother-T525W"; - model = "everywhere"; - } - ]; -} diff --git a/hosts/Garand-Desktop/system-modules.nix b/hosts/Garand-Desktop/system-modules.nix index c7400fa..3acb64e 100644 --- a/hosts/Garand-Desktop/system-modules.nix +++ b/hosts/Garand-Desktop/system-modules.nix @@ -113,5 +113,6 @@ _: { gedit.enable = true; # Gedit: GNOME text editor winboat.enable = false; # Winboat: Windows remote desktop via RDP adb.enable = false; # ADB: Android SDK platform tools + simpleScan.enable = true; # simple-scan: Simple scanning utility }; } diff --git a/hosts/Garand-Desktop/variables.nix b/hosts/Garand-Desktop/variables.nix index 60bc67c..ce78965 100644 --- a/hosts/Garand-Desktop/variables.nix +++ b/hosts/Garand-Desktop/variables.nix @@ -62,4 +62,24 @@ # Set network hostId if required (needed for zfs) # Otherwise leave as-is hostId = "5ab03f50"; + + # Whether printing services should be enabled. + printEnable = true; + # Name of the default printer. + ensureDefaultPrinter = "Brother_DCP-T510W"; + # List of printers to ensure are configured. + ensurePrinters = [ + { + deviceUri = "ipp://192.168.1.106/ipp"; + location = "home"; + name = "Brother_DCP-T525W"; + model = "everywhere"; + } + { + deviceUri = "ipp://192.168.1.159/ipp"; + location = "home"; + name = "Brother_DCP-T510W"; + model = "everywhere"; + } + ]; } diff --git a/hosts/Garand-Laptop/printers.nix b/hosts/Garand-Laptop/printers.nix deleted file mode 100644 index 905dffb..0000000 --- a/hosts/Garand-Laptop/printers.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - printEnable = true; - - ensureDefaultPrinter = "Brother-T525W"; - - ensurePrinters = [ - { - deviceUri = "ipp://192.168.1.110/ipp"; - location = "home"; - name = "Brother-T525W"; - model = "everywhere"; - } - ]; -} diff --git a/hosts/Garand-Laptop/system-modules.nix b/hosts/Garand-Laptop/system-modules.nix index 3acf814..7ef4be2 100644 --- a/hosts/Garand-Laptop/system-modules.nix +++ b/hosts/Garand-Laptop/system-modules.nix @@ -113,5 +113,6 @@ _: { gedit.enable = true; # Gedit: GNOME text editor winboat.enable = false; # Winboat: Windows remote desktop via RDP adb.enable = false; # ADB: Android SDK platform tools + simpleScan.enable = true; # simple-scan: Simple scanning utility }; } diff --git a/hosts/Garand-Laptop/variables.nix b/hosts/Garand-Laptop/variables.nix index c2ed50f..ce2ebb9 100644 --- a/hosts/Garand-Laptop/variables.nix +++ b/hosts/Garand-Laptop/variables.nix @@ -62,4 +62,21 @@ # Set network hostId if required (needed for zfs) # Otherwise leave as-is hostId = "7bc04e61"; + + printEnable = true; + ensureDefaultPrinter = "Brother_DCP-T510W"; + ensurePrinters = [ + { + deviceUri = "ipp://192.168.1.106/ipp"; + location = "home"; + name = "Brother_DCP-T525W"; + model = "everywhere"; + } + { + deviceUri = "ipp://192.168.1.159/ipp"; + location = "home"; + name = "Brother_DCP-T510W"; + model = "everywhere"; + } + ]; } diff --git a/hosts/default/printers.nix b/hosts/default/printers.nix deleted file mode 100644 index 24c2787..0000000 --- a/hosts/default/printers.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - # Whether printing services should be enabled. - printEnable = false; - - # Name of the default printer. - ensureDefaultPrinter = "[name]"; - - # List of printers to ensure are configured. - ensurePrinters = [ - { - # URI of the printer device. - deviceUri = "ipp://[IPv4]/ipp"; - # Physical location description of the printer. - location = "[location]"; - # Human‑readable printer name. - name = "[name]"; - # Printer model; "everywhere" uses generic driver. - model = "everywhere"; - } - ]; -} diff --git a/hosts/default/system-modules.nix b/hosts/default/system-modules.nix index 0643942..64a2223 100644 --- a/hosts/default/system-modules.nix +++ b/hosts/default/system-modules.nix @@ -113,5 +113,6 @@ _: { gedit.enable = false; # Gedit: GNOME text editor winboat.enable = false; # Winboat: Windows remote desktop via RDP adb.enable = false; # ADB: Android SDK platform tools + simpleScan.enable = false; # simple-scan: Simple scanning utility }; } diff --git a/hosts/default/variables.nix b/hosts/default/variables.nix index 62e6139..a98f232 100644 --- a/hosts/default/variables.nix +++ b/hosts/default/variables.nix @@ -68,4 +68,22 @@ # Set network hostId if required (needed for zfs) # Otherwise leave as-is hostId = "5ab03f50"; + + # Whether printing services should be enabled. + printEnable = false; + # Name of the default printer. + ensureDefaultPrinter = "[name]"; + # List of printers to ensure are configured. + ensurePrinters = [ + { + # URI of the printer device. + deviceUri = "ipp://[IPv4]/ipp"; + # Physical location description of the printer. + location = "[location]"; + # Human‑readable printer name. + name = "[name]"; + # Printer model; "everywhere" uses generic driver. + model = "everywhere"; + } + ]; } diff --git a/modules/core/network.nix b/modules/core/network.nix index 2957b51..3755bf0 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -34,6 +34,8 @@ } ]; allowedUDPPorts = [ + 5353 + 54925 59010 59011 ]; diff --git a/modules/core/packages/packages.nix b/modules/core/packages/packages.nix index a3453ac..4642704 100644 --- a/modules/core/packages/packages.nix +++ b/modules/core/packages/packages.nix @@ -76,6 +76,7 @@ notify = notify-client; boxes = gnome-boxes; switcheroo = switcheroo; + simpleScan = simple-scan; }; in { imports = builtins.attrValues (builtins.mapAttrs mkPackage packages); diff --git a/modules/core/printing.nix b/modules/core/printing.nix index 41ac10b..fcc9088 100644 --- a/modules/core/printing.nix +++ b/modules/core/printing.nix @@ -31,8 +31,12 @@ ipp-usb.enable = true; }; - hardware.printers = lib.mkIf printEnable { - ensureDefaultPrinter = ensureDefaultPrinter; - ensurePrinters = ensurePrinters; + hardware = lib.mkIf printEnable { + printers = { + ensureDefaultPrinter = ensureDefaultPrinter; + ensurePrinters = ensurePrinters; + }; + + sane.enable = true; }; } diff --git a/modules/home/fish/default.nix b/modules/home/fish/default.nix index f5d6ef6..940a869 100644 --- a/modules/home/fish/default.nix +++ b/modules/home/fish/default.nix @@ -15,6 +15,9 @@ set fish_greeting # fastfetch ''; + shellInit = '' + set -gx LD_LIBRARY_PATH /etc/sane-libs $LD_LIBRARY_PATH + ''; }; nix-your-shell = {