ljasdjklasdjklas
This commit is contained in:
20
hardware/printer/discover.nix
Normal file
20
hardware/printer/discover.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
|
||||
# airprint
|
||||
# https://wiki.nixos.org/wiki/Printing#Printer_sharing
|
||||
|
||||
services.avahi = {
|
||||
enable = lib.mkDefault true;
|
||||
nssmdns = true;
|
||||
openFirewall = true; # opens UDP port 5353
|
||||
};
|
||||
services.printing = {
|
||||
enable = lib.mkDefault true;
|
||||
drivers = [
|
||||
pkgs.cups-filters
|
||||
pkgs.cups-browsed
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common-share.nix
|
||||
];
|
||||
# imports = [ ./share.nix ]; # up to the host to opt-in to
|
||||
|
||||
# https://wiki.nixos.org/wiki/Printing
|
||||
services.printing.enable = true;
|
||||
services.printing.enable = lib.mkDefault true;
|
||||
#services.printing.drivers = with pkgs; [ foo2zjs foomatic-filters cups-filters ];
|
||||
#services.printing.drivers = with pkgs; [ foo2zjs hplip foomatic-filters cups-filters ];
|
||||
services.printing.drivers = with pkgs; [ foo2zjs hplipWithPlugin foomatic-filters cups-filters ];
|
||||
#services.printing.drivers = with pkgs; [ hplipWithPlugin cups-filters ];
|
||||
|
||||
#hardware.printers.ensureDefaultPrinter = lib.mkDefault "HP_LaserJet_P1005";
|
||||
hardware.printers.ensurePrinters = lib.singleton {
|
||||
name = "HP_LaserJet_P1005";
|
||||
deviceUri = "hp:/usb/HP_LaserJet_P1005?serial=BC0CAEQ"; # `lpstat -s` # hplip
|
||||
#deviceUri = "usb://HP/LaserJet%20P1005?serial=BC0CAEQ"; # `lpstat -s` # foo2zjs
|
||||
model = "HP-LaserJet_P1005.ppd.gz"; # `lpinfo -m` # foo2zjs
|
||||
#location = "";
|
||||
description = "Laser printer";
|
||||
ppdOptions.PageSize = "A4";
|
||||
hardware.printers = {
|
||||
ensureDefaultPrinter = lib.mkDefault "HP_LaserJet_P1005";
|
||||
ensurePrinters = lib.singleton {
|
||||
name = "HP_LaserJet_P1005";
|
||||
deviceUri = "hp:/usb/HP_LaserJet_P1005?serial=BC0CAEQ"; # `lpstat -s` # hplip
|
||||
# deviceUri = "usb://HP/LaserJet%20P1005?serial=BC0CAEQ"; # `lpstat -s` # foo2zjs
|
||||
model = "HP-LaserJet_P1005.ppd.gz"; # `lpinfo -m` # foo2zjs
|
||||
#location = "";
|
||||
description = "Laser printer";
|
||||
ppdOptions.PageSize = "A4";
|
||||
};
|
||||
};
|
||||
|
||||
services.printing.logLevel = "debug";
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
|
||||
# airprint
|
||||
# https://wiki.archlinux.org/title/CUPS/Printer_sharing
|
||||
|
||||
# https://wiki.nixos.org/wiki/Printing#Printer_sharing
|
||||
|
||||
services.avahi = {
|
||||
enable = lib.mkDefault true;
|
||||
nssmdns = true;
|
||||
openFirewall = true; # opens port 5353
|
||||
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
};
|
||||
@@ -27,6 +27,7 @@
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-intel-sandy-bridge
|
||||
../../../hardware/gpu/rocm.nix
|
||||
../../../hardware/gpu/zluda.nix
|
||||
../../../hardware/printer/discover.nix
|
||||
../../../profiles/hidpi.nix
|
||||
|
||||
../../../profiles/nix-ld.nix
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
../../../hardware/gpu/intel.nix
|
||||
../../../hardware/gpu/cuda.nix
|
||||
../../../hardware/printer/hp-laserjet-p1005.nix
|
||||
|
||||
../../../hardware/printer/share.nix
|
||||
|
||||
../../../profiles/nix-ld.nix
|
||||
../../../profiles/sshd
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
./vm-variant.nix
|
||||
./ccache
|
||||
./../mounts/common-nfs.nix
|
||||
/* ./profiles/mounts/common-zfs.nix */
|
||||
# ./profiles/mounts/common-zfs.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
# https://wiki.nixos.org/wiki/PipeWire
|
||||
|
||||
{
|
||||
services.pulseaudio.enable = false; # gnome defaults it to true
|
||||
|
||||
#sound.enable = true # alsa? likely conflicts with pipewire
|
||||
#sound.mediaKeys.enable = true # alsa? only enable if headless
|
||||
services.pipewire.enable = true;
|
||||
services.pipewire.alsa.enable = true;
|
||||
services.pipewire.alsa.support32Bit = true;
|
||||
#services.pipewire.jack.enable = true;
|
||||
services.pipewire.pulse.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
|
||||
pulse.enable = true;
|
||||
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#services.pipewire.media-session.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol # volume and defaults
|
||||
easyeffects # eq
|
||||
helvum # patchbay
|
||||
# carla # VST (TODO: move into a DAW profile?) # TODO: build broken
|
||||
# carla # VST patchbay (TODO: move into a DAW profile? Can be used for midi) # TODO: build broken
|
||||
];
|
||||
|
||||
# optional, allows Pipewire to use the realtime scheduler for increased performance.
|
||||
security.rtkit.enable = true;
|
||||
security.rtkit.enable = config.services.pipewire.jack.enable;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
# https://github.com/NixOS/nixos-hardware/blob/master/common/hidpi.nix
|
||||
inputs.nixos-hardware.nixosModules.common-hidpi
|
||||
];
|
||||
|
||||
@@ -10,5 +11,14 @@
|
||||
# via
|
||||
# https://github.com/samemrecebi
|
||||
FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
|
||||
|
||||
# TODO: enable these?
|
||||
|
||||
# # https://wiki.archlinux.org/title/HiDPI#Qt_5
|
||||
# QT_AUTO_SCREEN_SCALE_FACTOR = 1;
|
||||
# QT_ENABLE_HIGHDPI_SCALING = 1;
|
||||
|
||||
# # https://wiki.archlinux.org/title/HiDPI#GDK_3_(GTK_3)
|
||||
# GDK_SCALE = 2;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user