-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CUPS web page into chromium bookmarks
CUPS web page is added into default chromium bookmarks. Printer settings moved into the printer service. Signed-off-by: Berk Arslan <[email protected]>
- Loading branch information
Showing
5 changed files
with
60 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -10,5 +10,6 @@ | |
./pdfopen.nix | ||
./namespaces.nix | ||
./yubikey.nix | ||
./printer.nix | ||
]; | ||
} |
This file contains 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 @@ | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ config, lib, ... }: | ||
let | ||
cfg = config.ghaf.services.printer; | ||
inherit (lib) mkIf mkEnableOption; | ||
in | ||
{ | ||
options.ghaf.services.printer = { | ||
enable = mkEnableOption "Printer configuration for app-vms"; | ||
}; | ||
config = mkIf cfg.enable { | ||
|
||
services.printing.enable = true; | ||
services.avahi = { | ||
enable = true; | ||
nssmdns4 = true; | ||
reflector = true; | ||
}; | ||
environment.etc."chromium/bookmarks.html".text = | ||
'' | ||
<!DOCTYPE NETSCAPE-Bookmark-file-1> | ||
<!-- This is an automatically generated file. | ||
It will be read and overwritten. | ||
DO NOT EDIT! --> | ||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | ||
<TITLE>Bookmarks</TITLE> | ||
<H1>Bookmarks</H1> | ||
<DL><p> | ||
<DT><H3 ADD_DATE="1726234624" LAST_MODIFIED="1726234726" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3> | ||
<DL><p> | ||
'' | ||
+ "<DT><A HREF=\"http://localhost:631/\" ADD_DATE=\"1726234644\" ICON=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkW" | ||
+ "g2AAABj0lEQVQ4jZWST8tBQRTG589x76SmW8qNlZuNkrg2VpQUFr6HjU/lS4gs2NmxslBSysaGy2TkGjPvYuqm3pVZnZ7nd86p5wwej8folwdRFP3WcLvdft5gjMEYI4S+C2v" | ||
+ "/1+F6vWKMjTHGGEqp1joZZjlKqVIKIUQIMcbA5XKJ4xgAAEAIwRhL+hljSikhhOd51nVdl2az2UwmMxwOW63W6/Vqt9vr9XowGARB0Ov1giBIpVLdbrdSqZzP5+PxCEKI0Wi0" | ||
+ "2Wwmk0mj0SgWi1JK3/cB4H6/c87DMHQcRwjx+XwwxoQQIoTwfb9Wq+VyOa11uVzmnEspC4XCfD5fLBb7/T6fzzebTSklLZVKu90uDMNqtTqdTk+nU7/fX61Wh8Nhu93OZjPOe" | ||
+ "b1ej6JouVw+Hg/c6XSUUs/nEyHkOI7WWmttw8EYp9NpKWUcx5RSQojrumCMAQDP8xBCFrUp2WTf77fjOIwxm7LWGqyhtbapWzU5hb1X4mKMwULfgy2U3M4qiQvfxDf6X7E1+e" | ||
+ "nnIYT+ABKG4uJL4UAgAAAAAElFTkSuQmCC\">CUPS</A>" | ||
+ '' | ||
</DL><p> | ||
</DL><p> | ||
''; | ||
programs.chromium.initialPrefs = { | ||
"import_bookmarks" = false; | ||
"distribution" = { | ||
"import_bookmarks" = false; | ||
"import_bookmarks_from_file" = "/etc/chromium/bookmarks.html"; | ||
"bookmark_bar" = { | ||
"show_on_all_tabs" = true; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains 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
This file contains 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
This file contains 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