-
Notifications
You must be signed in to change notification settings - Fork 13
migrate printhost to nix #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 a54e16a
fix various cups errors/warnings
BNH440 7ba303e
fix formatting
BNH440 d5d9656
fix cert path
BNH440 c8eb6be
fix missing config var
BNH440 04a0d43
temporarily disable cups encryption
BNH440 0165ed8
add firefox config for color-double
BNH440 54160ee
fix bash path for scripts
BNH440 5f09619
fix more bin paths
BNH440 429a86e
fix postfix settings
BNH440 535be0d
force ocfps to generate copies
BNH440 1594da1
temporarily enable debug logging
BNH440 455b7e5
fix copies
BNH440 af1582f
test new ppd changes (copies still broken)
BNH440 0823888
fix copies v2
BNH440 ecff090
fix commands
BNH440 d423592
Revert "fix copies v2"
BNH440 e77e0a2
print env for test
BNH440 15ec5f7
fix collate?
BNH440 6bf78d9
override supported features: remove ipp everywhere
BNH440 59a08e3
rollback cups to whiteout version to verify
BNH440 304ed78
Revert "rollback cups to whiteout version to verify"
BNH440 261472c
set class ppd
BNH440 96ce43f
switch to client-side cups-browsed cluster
BNH440 7e99760
fix duplicate copies, color routing, default opts
BNH440 7c8e4e8
set default double sided for b&w
BNH440 26d18f3
rename B&W queue to OCF-BW, fix duplicate copies
BNH440 1321612
allow double sided color & set OCF-BW as default
BNH440 97236b3
disable discovery of network printers
BNH440 7d4cebf
fix duplicated copies on HPs
BNH440 bdd4e7d
actually disable discovery and set default printer
BNH440 c18b219
disable avahi
BNH440 65c3eea
fix skel
BNH440 b847004
re-enable avahi
BNH440 ba3de00
test bypassing ocfps on HP to fix duplicated copies
BNH440 746d16a
use hplip driver
BNH440 1af7825
drop ocfps and use native epson ppd
BNH440 480d2d6
add baby-epson
BNH440 7a34c7c
fix local cups error policy
BNH440 3eb14a5
set epson page size to letter
BNH440 9427a37
set local cups to stateless
BNH440 ec96bd0
remove baby epson
BNH440 b4f1515
use different calculation for pages on epson
BNH440 9fd26d0
bypass size check on epson
BNH440 38593ca
update ocflib and utils
BNH440 15ca24c
switch to QueueOnClient
BNH440 6b62578
Revert "switch to QueueOnClient"
BNH440 a5a369d
add filters to clients so they can pre filter
BNH440 32dac30
allow jobs endpoint access for load balancing
BNH440 989c6c4
use client queue for parallel jobs
BNH440 7a7109d
test new client queue approach
BNH440 f1d7a2f
fix page size checking
BNH440 a9ad749
remove all custom ps scripts
BNH440 09eb486
switch to ipps
BNH440 5dabbaf
add kerberos support for cups
BNH440 9c22f16
rekey
BNH440 561447f
fix firefox kerberos config
BNH440 758a15f
add correct kerberos keytab to tule
BNH440 86f71b9
rekey
BNH440 54c384e
fix cups auth config
BNH440 0213dd4
add tule to SPNEGO domains
BNH440 ac064b4
fix hostname and format
BNH440 6753b12
try remote cups again
BNH440 1f2ee3d
disregard lpoptions for printhost
BNH440 11cc775
encryption IfRequested to fix loading time
BNH440 3a02e5b
make printer config consistent
BNH440 2254131
update ocflib
BNH440 3f6ada0
fix kerberos
BNH440 eaf7449
remove username processing script
BNH440 7441ec6
add kerberos auth for cups cli
BNH440 b07934f
add cups to lp group
BNH440 26885ad
remove kerberos
BNH440 1b6b754
remove old scripts
BNH440 d2fcc63
Revert "update ocflib"
BNH440 1527f90
Revert "update ocflib and utils"
BNH440 a587f5b
update ocflib
BNH440 08acb43
test removing firefox prefs
BNH440 e814aa3
fix class shadowing
BNH440 e5d0ff2
Revert "test removing firefox prefs"
BNH440 d1607ac
firefox open 'more settings' printing dialog
BNH440 c1af781
move backend to virtual public facing printers
BNH440 843da5c
use raw ppd for third stage
BNH440 e2b3465
use everywhere ppd for third stage
BNH440 cfdbed0
Revert "use everywhere ppd for third stage"
BNH440 fca8c38
Revert "use raw ppd for third stage"
BNH440 5b55c1b
use everywhere filters on 1st stage and ppd on 3rd
BNH440 d768e10
Revert "use everywhere filters on 1st stage and ppd on 3rd"
BNH440 a66570f
go back to double ppd but only single for epson
BNH440 58a7d62
fix duplicated copies
BNH440 32a847a
Revert "fix duplicated copies"
BNH440 1c6a109
use raw ppd for 3rd stage
BNH440 633bbd6
Revert "use raw ppd for 3rd stage"
BNH440 f37d679
try 'everywhere' 1st stage and ppd 3rd stage
BNH440 0064d21
remove ocfbackend temporarily and use raw as 3rd stage
BNH440 45c387d
add back enforcer
BNH440 ac96e59
move ocfbackend to 1st stage
BNH440 eba3dab
set ocfbackend copies to 1
BNH440 05ab698
update page counting logic
BNH440 fa2db7b
update page counting
BNH440 1e70715
add enforcer debug logging
BNH440 d4dede5
correct sheet count parsing
BNH440 a7f081a
new page count method
BNH440 b20c09c
more robust page counting
BNH440 2dbc288
simplify page count and infra
BNH440 76be005
fix hp overreporting pages
BNH440 6153b15
update job accepted message to be job queued
BNH440 75c7d35
fix user.js
BNH440 b0c2454
move enforcer pipeline (again)
BNH440 86bccf6
Merge branch 'main' into printhost-migration-v2
BNH440 5359d5f
fix driver
BNH440 054f79e
fix naming
BNH440 97388c9
fix type cast
BNH440 57ebe06
print TEADATAFILE
BNH440 e9f6ddf
Revert "print TEADATAFILE"
BNH440 c94a80e
add copy parsing
BNH440 d5e13c2
expand PS options search window
BNH440 ca77ce6
add pdf parsing to pagecount
BNH440 cfde74b
log env
BNH440 5477ca5
Revert "log env"
BNH440 e009c24
change epson to 2 stage pipeline
BNH440 fef3e2f
Reapply "log env"
BNH440 df94c12
correctly parse epson EJL pages
BNH440 bfe1393
fix color queue
BNH440 b54fcd2
update wayout messages
BNH440 4ecb20a
rearrange printers
BNH440 c6dab0a
disable cups debug logging and spool preservation
BNH440 22ae3fe
Merge branch 'main' into printhost-migration-v2
BNH440 e19f3a2
fix undefined default color quota for email
BNH440 c4feb4d
error if 0 page document (undetected failure)
BNH440 c264c85
add comment for the copies=1 override
BNH440 cad6518
refactor preStart (ssl)
BNH440 6e2c106
add more int conversion error handling to enforcer
BNH440 d35b41a
set color duplex to none to match firefox
BNH440 018deba
set retry policy so printers don't pause on failure
BNH440 d0d9b32
remove unnecessary cups socket check
BNH440 7326f49
make printer setup service match the default one
BNH440 f1ed183
remove reset unnecessary cups options to defaults
BNH440 49ed591
require client-server encryption
BNH440 e07be65
change printhost url to point to 'tule' for easy dns migration
BNH440 6426069
Revert "require client-server encryption"
BNH440 9b4fab0
fix overriden commit
BNH440 e18040b
new wallpapers for new printing workflow
BNH440 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| 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"; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| user_pref("print.more-settings.open", true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| SystemGroup ocfstaff opstaff | ||
|
|
||
| ConfigFilePerm 0644 | ||
| LogFilePerm 0644 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.