Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
463b5ae
migrate printhost to nix
BNH440 Apr 6, 2026
a54e16a
fix various cups errors/warnings
BNH440 Apr 6, 2026
7ba303e
fix formatting
BNH440 Apr 6, 2026
d5d9656
fix cert path
BNH440 Apr 6, 2026
c8eb6be
fix missing config var
BNH440 Apr 6, 2026
04a0d43
temporarily disable cups encryption
BNH440 Apr 6, 2026
0165ed8
add firefox config for color-double
BNH440 Apr 6, 2026
54160ee
fix bash path for scripts
BNH440 Apr 6, 2026
5f09619
fix more bin paths
BNH440 Apr 6, 2026
429a86e
fix postfix settings
BNH440 Apr 6, 2026
535be0d
force ocfps to generate copies
BNH440 Apr 6, 2026
1594da1
temporarily enable debug logging
BNH440 Apr 6, 2026
455b7e5
fix copies
BNH440 Apr 7, 2026
af1582f
test new ppd changes (copies still broken)
BNH440 Apr 8, 2026
0823888
fix copies v2
BNH440 Apr 8, 2026
ecff090
fix commands
BNH440 Apr 8, 2026
d423592
Revert "fix copies v2"
BNH440 Apr 8, 2026
e77e0a2
print env for test
BNH440 Apr 8, 2026
15ec5f7
fix collate?
BNH440 Apr 8, 2026
6bf78d9
override supported features: remove ipp everywhere
BNH440 Apr 8, 2026
59a08e3
rollback cups to whiteout version to verify
BNH440 Apr 8, 2026
304ed78
Revert "rollback cups to whiteout version to verify"
BNH440 Apr 8, 2026
261472c
set class ppd
BNH440 Apr 8, 2026
96ce43f
switch to client-side cups-browsed cluster
BNH440 Apr 8, 2026
7e99760
fix duplicate copies, color routing, default opts
BNH440 Apr 8, 2026
7c8e4e8
set default double sided for b&w
BNH440 Apr 8, 2026
26d18f3
rename B&W queue to OCF-BW, fix duplicate copies
BNH440 Apr 8, 2026
1321612
allow double sided color & set OCF-BW as default
BNH440 Apr 8, 2026
97236b3
disable discovery of network printers
BNH440 Apr 8, 2026
7d4cebf
fix duplicated copies on HPs
BNH440 Apr 8, 2026
bdd4e7d
actually disable discovery and set default printer
BNH440 Apr 8, 2026
c18b219
disable avahi
BNH440 Apr 8, 2026
65c3eea
fix skel
BNH440 Apr 8, 2026
b847004
re-enable avahi
BNH440 Apr 8, 2026
ba3de00
test bypassing ocfps on HP to fix duplicated copies
BNH440 Apr 8, 2026
746d16a
use hplip driver
BNH440 Apr 8, 2026
1af7825
drop ocfps and use native epson ppd
BNH440 Apr 8, 2026
480d2d6
add baby-epson
BNH440 Apr 8, 2026
7a34c7c
fix local cups error policy
BNH440 Apr 8, 2026
3eb14a5
set epson page size to letter
BNH440 Apr 8, 2026
9427a37
set local cups to stateless
BNH440 Apr 8, 2026
ec96bd0
remove baby epson
BNH440 Apr 9, 2026
b4f1515
use different calculation for pages on epson
BNH440 Apr 9, 2026
9fd26d0
bypass size check on epson
BNH440 Apr 9, 2026
38593ca
update ocflib and utils
BNH440 Apr 9, 2026
15ca24c
switch to QueueOnClient
BNH440 Apr 9, 2026
6b62578
Revert "switch to QueueOnClient"
BNH440 Apr 9, 2026
a5a369d
add filters to clients so they can pre filter
BNH440 Apr 9, 2026
32dac30
allow jobs endpoint access for load balancing
BNH440 Apr 9, 2026
989c6c4
use client queue for parallel jobs
BNH440 Apr 9, 2026
7a7109d
test new client queue approach
BNH440 Apr 9, 2026
f1d7a2f
fix page size checking
BNH440 Apr 9, 2026
a9ad749
remove all custom ps scripts
BNH440 Apr 9, 2026
09eb486
switch to ipps
BNH440 Apr 9, 2026
5dabbaf
add kerberos support for cups
BNH440 Apr 9, 2026
9c22f16
rekey
BNH440 Apr 9, 2026
561447f
fix firefox kerberos config
BNH440 Apr 10, 2026
758a15f
add correct kerberos keytab to tule
BNH440 Apr 10, 2026
86f71b9
rekey
BNH440 Apr 10, 2026
54c384e
fix cups auth config
BNH440 Apr 10, 2026
0213dd4
add tule to SPNEGO domains
BNH440 Apr 10, 2026
ac064b4
fix hostname and format
BNH440 Apr 10, 2026
6753b12
try remote cups again
BNH440 Apr 10, 2026
1f2ee3d
disregard lpoptions for printhost
BNH440 Apr 10, 2026
11cc775
encryption IfRequested to fix loading time
BNH440 Apr 10, 2026
3a02e5b
make printer config consistent
BNH440 Apr 10, 2026
2254131
update ocflib
BNH440 Apr 10, 2026
3f6ada0
fix kerberos
BNH440 Apr 10, 2026
eaf7449
remove username processing script
BNH440 Apr 10, 2026
7441ec6
add kerberos auth for cups cli
BNH440 Apr 10, 2026
b07934f
add cups to lp group
BNH440 Apr 10, 2026
26885ad
remove kerberos
BNH440 Apr 10, 2026
1b6b754
remove old scripts
BNH440 Apr 10, 2026
d2fcc63
Revert "update ocflib"
BNH440 Apr 10, 2026
1527f90
Revert "update ocflib and utils"
BNH440 Apr 10, 2026
a587f5b
update ocflib
BNH440 Apr 10, 2026
08acb43
test removing firefox prefs
BNH440 Apr 10, 2026
e814aa3
fix class shadowing
BNH440 Apr 10, 2026
e5d0ff2
Revert "test removing firefox prefs"
BNH440 Apr 10, 2026
d1607ac
firefox open 'more settings' printing dialog
BNH440 Apr 10, 2026
c1af781
move backend to virtual public facing printers
BNH440 Apr 10, 2026
843da5c
use raw ppd for third stage
BNH440 Apr 10, 2026
e2b3465
use everywhere ppd for third stage
BNH440 Apr 10, 2026
cfdbed0
Revert "use everywhere ppd for third stage"
BNH440 Apr 10, 2026
fca8c38
Revert "use raw ppd for third stage"
BNH440 Apr 10, 2026
5b55c1b
use everywhere filters on 1st stage and ppd on 3rd
BNH440 Apr 10, 2026
d768e10
Revert "use everywhere filters on 1st stage and ppd on 3rd"
BNH440 Apr 10, 2026
a66570f
go back to double ppd but only single for epson
BNH440 Apr 10, 2026
58a7d62
fix duplicated copies
BNH440 Apr 10, 2026
32a847a
Revert "fix duplicated copies"
BNH440 Apr 10, 2026
1c6a109
use raw ppd for 3rd stage
BNH440 Apr 10, 2026
633bbd6
Revert "use raw ppd for 3rd stage"
BNH440 Apr 10, 2026
f37d679
try 'everywhere' 1st stage and ppd 3rd stage
BNH440 Apr 10, 2026
0064d21
remove ocfbackend temporarily and use raw as 3rd stage
BNH440 Apr 10, 2026
45c387d
add back enforcer
BNH440 Apr 10, 2026
ac96e59
move ocfbackend to 1st stage
BNH440 Apr 10, 2026
eba3dab
set ocfbackend copies to 1
BNH440 Apr 10, 2026
05ab698
update page counting logic
BNH440 Apr 10, 2026
fa2db7b
update page counting
BNH440 Apr 10, 2026
1e70715
add enforcer debug logging
BNH440 Apr 10, 2026
d4dede5
correct sheet count parsing
BNH440 Apr 10, 2026
a7f081a
new page count method
BNH440 Apr 10, 2026
b20c09c
more robust page counting
BNH440 Apr 10, 2026
2dbc288
simplify page count and infra
BNH440 Apr 10, 2026
76be005
fix hp overreporting pages
BNH440 Apr 10, 2026
6153b15
update job accepted message to be job queued
BNH440 Apr 10, 2026
75c7d35
fix user.js
BNH440 Apr 10, 2026
b0c2454
move enforcer pipeline (again)
BNH440 Apr 10, 2026
86bccf6
Merge branch 'main' into printhost-migration-v2
BNH440 Apr 10, 2026
5359d5f
fix driver
BNH440 Apr 10, 2026
054f79e
fix naming
BNH440 Apr 10, 2026
97388c9
fix type cast
BNH440 Apr 10, 2026
57ebe06
print TEADATAFILE
BNH440 Apr 10, 2026
e9f6ddf
Revert "print TEADATAFILE"
BNH440 Apr 10, 2026
c94a80e
add copy parsing
BNH440 Apr 10, 2026
d5e13c2
expand PS options search window
BNH440 Apr 10, 2026
ca77ce6
add pdf parsing to pagecount
BNH440 Apr 10, 2026
cfde74b
log env
BNH440 Apr 10, 2026
5477ca5
Revert "log env"
BNH440 Apr 10, 2026
e009c24
change epson to 2 stage pipeline
BNH440 Apr 10, 2026
fef3e2f
Reapply "log env"
BNH440 Apr 10, 2026
df94c12
correctly parse epson EJL pages
BNH440 Apr 10, 2026
bfe1393
fix color queue
BNH440 Apr 10, 2026
b54fcd2
update wayout messages
BNH440 Apr 10, 2026
4ecb20a
rearrange printers
BNH440 Apr 10, 2026
c6dab0a
disable cups debug logging and spool preservation
BNH440 Apr 10, 2026
22ae3fe
Merge branch 'main' into printhost-migration-v2
BNH440 Apr 11, 2026
e19f3a2
fix undefined default color quota for email
BNH440 Apr 11, 2026
c4feb4d
error if 0 page document (undetected failure)
BNH440 Apr 11, 2026
c264c85
add comment for the copies=1 override
BNH440 Apr 11, 2026
cad6518
refactor preStart (ssl)
BNH440 Apr 11, 2026
6e2c106
add more int conversion error handling to enforcer
BNH440 Apr 11, 2026
d35b41a
set color duplex to none to match firefox
BNH440 Apr 11, 2026
018deba
set retry policy so printers don't pause on failure
BNH440 Apr 11, 2026
d0d9b32
remove unnecessary cups socket check
BNH440 Apr 11, 2026
7326f49
make printer setup service match the default one
BNH440 Apr 11, 2026
f1ed183
remove reset unnecessary cups options to defaults
BNH440 Apr 12, 2026
49ed591
require client-server encryption
BNH440 Apr 12, 2026
e07be65
change printhost url to point to 'tule' for easy dns migration
BNH440 Apr 12, 2026
6426069
Revert "require client-server encryption"
BNH440 Apr 12, 2026
9b4fab0
fix overriden commit
BNH440 Apr 12, 2026
e18040b
new wallpapers for new printing workflow
BNH440 Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions hosts/servers/tule.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ config, ... }:

{
imports = [ ../../hardware/virtualized.nix ];

networking.hostName = "tule";

ocf.network = {
enable = true;
lastOctet = 127;
};

ocf.acme.enable = true;

ocf.printhost = {
enable = true;
mysqlPasswordFile = config.age.secrets.printhost-mysql-password.path;
Comment thread
BNH440 marked this conversation as resolved.
wayoutPasswordFile = config.age.secrets.printhost-wayout-password.path;
redisPasswordFile = config.age.secrets.printhost-redis-password.path;
# TODO: change to "printhost.ocf.berkeley.edu" once tule replaces whiteout
printhostUrl = "printhost-dev.ocf.berkeley.edu";
};

age.secrets.printhost-mysql-password = {
rekeyFile = ../../secrets/master-keyed/printhost/mysql-password.age;
mode = "0440";
group = "lp";
};
age.secrets.printhost-wayout-password = {
rekeyFile = ../../secrets/master-keyed/printhost/wayout-password.age;
mode = "0440";
group = "lp";
};
age.secrets.printhost-redis-password = {
rekeyFile = ../../secrets/master-keyed/printhost/redis-password.age;
mode = "0440";
group = "lp";
};

# Postfix relay so ocflib can send mail via sendmail.
services.postfix = {
enable = true;
settings.main = {
mydomain = "ocf.berkeley.edu";
myorigin = "ocf.berkeley.edu";
mydestination = "";
inet_interfaces = "loopback-only";
relayhost = [ "smtp.ocf.berkeley.edu" ];
sender_canonical_maps = "static:root@ocf.berkeley.edu";
};
};

system.stateVersion = "25.05";
}
38 changes: 12 additions & 26 deletions modules/graphical/apps/browsers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,62 +94,48 @@ in
};

Preferences = {
"print.printer_color-single.print_paper_height" = {
Value = "279.4";
Status = "default";
};
"print.printer_color-single.print_paper_id" = {
Value = "na_letter";
Status = "default";
};
"print.printer_color-single.print_paper_size_unit" = {
# OCF (HP B&W): default to double-sided, black & white, letter
"print.printer_OCF-BW.print_duplex" = {
Value = 1;
Status = "default";
Type = "number";
};
"print.printer_color-single.print_paper_width" = {
Value = "215.9";
Status = "default";
};
"print.printer_double.print_in_color" = {
"print.printer_OCF-BW.print_in_color" = {
Value = false;
Status = "default";
};
"print.printer_double.print_paper_height" = {
"print.printer_OCF-BW.print_paper_height" = {
Value = "279.4";
Status = "default";
};
"print.printer_double.print_paper_id" = {
"print.printer_OCF-BW.print_paper_id" = {
Value = "na_letter";
Status = "default";
};
"print.printer_double.print_paper_size_unit" = {
"print.printer_OCF-BW.print_paper_size_unit" = {
Value = 1;
Status = "default";
Type = "number";
};
"print.printer_double.print_paper_width" = {
"print.printer_OCF-BW.print_paper_width" = {
Value = "215.9";
Status = "default";
};
"print.printer_single.print_in_color" = {
Value = false;
Status = "default";
};
"print.printer_single.print_paper_height" = {
# OCF-Color (Epson): letter paper size
"print.printer_OCF-Color.print_paper_height" = {
Value = "279.4";
Status = "default";
};
"print.printer_single.print_paper_id" = {
"print.printer_OCF-Color.print_paper_id" = {
Value = "na_letter";
Status = "default";
};
"print.printer_single.print_paper_size_unit" = {
"print.printer_OCF-Color.print_paper_size_unit" = {
Value = 1;
Status = "default";
Type = "number";
};
"print.printer_single.print_paper_width" = {
"print.printer_OCF-Color.print_paper_width" = {
Value = "215.9";
Status = "default";
};
Expand Down
Binary file modified modules/graphical/assets/images/cosmic-bg-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/graphical/assets/images/cosmic-bg-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions modules/graphical/skel/.mozilla/firefox/default/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user_pref("print.more-settings.open", true);
4 changes: 4 additions & 0 deletions modules/printhost/conf/cups-files.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SystemGroup ocfstaff opstaff

ConfigFilePerm 0644
LogFilePerm 0644
105 changes: 105 additions & 0 deletions modules/printhost/conf/cupsd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
ServerName @cups-url@
ServerAlias *

SSLPort 443

LogLevel warn

LimitRequestBody 256m

PreserveJobFiles No

Browsing Off
BrowseLocalProtocols none
HostNameLookups Off
DefaultAuthType Basic

ErrorPolicy retry-job

<Location />
Order allow,deny
Allow from 169.229.226.0/24
Allow from [2607:f140:8801::]/48
Allow from 127.0.0.0/8
Allow from [::1]
</Location>
<Location /jobs>
Order allow,deny
Allow from 169.229.226.0/24
Allow from [2607:f140:8801::]/48
Allow from 127.0.0.0/8
Allow from [::1]
</Location>
<Location /admin>
Encryption Required
Order allow,deny
Allow from 169.229.226.0/24
Allow from [2607:f140:8801::]/48
Allow from 127.0.0.0/8
Allow from [::1]
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow from 169.229.226.0/24
Allow from [2607:f140:8801::]/48
Allow from 127.0.0.0/8
Allow from [::1]
</Location>

<Policy default>
JobPrivateAccess all
JobPrivateValues none
<Limit Cancel-Job Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>

<Policy authenticated>
<Limit Create-Job Print-Job Print-URI>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
Loading
Loading