Add configuration for icecat
This commit is contained in:
parent
33bceec314
commit
08c336290e
2 changed files with 106 additions and 1 deletions
|
@ -102,6 +102,9 @@
|
||||||
#:select (home-environment-service))
|
#:select (home-environment-service))
|
||||||
#:use-module ((oni home services flameshot)
|
#:use-module ((oni home services flameshot)
|
||||||
#:select (home-flameshot-service-type))
|
#:select (home-flameshot-service-type))
|
||||||
|
#:use-module ((oni home services gnuzilla)
|
||||||
|
#:select (home-icecat-service-type
|
||||||
|
home-icecat-configuration))
|
||||||
#:use-module ((oni home services kdeconnect)
|
#:use-module ((oni home services kdeconnect)
|
||||||
#:select (home-kdeconnect-service-type))
|
#:select (home-kdeconnect-service-type))
|
||||||
#:use-module ((oni home services mpd)
|
#:use-module ((oni home services mpd)
|
||||||
|
@ -538,4 +541,21 @@
|
||||||
(ssh-support? #f)
|
(ssh-support? #f)
|
||||||
(extra-content
|
(extra-content
|
||||||
"allow-emacs-pinentry\n")))
|
"allow-emacs-pinentry\n")))
|
||||||
(service home-ssh-agent-service-type))))
|
(service home-ssh-agent-service-type)
|
||||||
|
|
||||||
|
(service home-icecat-service-type
|
||||||
|
(home-icecat-configuration
|
||||||
|
(settings
|
||||||
|
'(("extensions.pocket.enabled" #f)
|
||||||
|
("view_source.editor.args" "--no-wait")
|
||||||
|
("view_source.editor.external" #t)
|
||||||
|
("view_source.editor.path" "/home/chelys/.guix-home/profile/bin/emacsclient")
|
||||||
|
("browser.display.background_color" "#222424")
|
||||||
|
("browser.display.foreground_color" "#bfbfbf")
|
||||||
|
("browser.display.document_color_use" 2)
|
||||||
|
("browser.anchor_color" "#ff9800")
|
||||||
|
("browser.visited_color" "#0babab")
|
||||||
|
("browser.display.use_document_fonts" 0)
|
||||||
|
;; Change the accelerator key (modifier key for most keyboard
|
||||||
|
;; shortcuts) to the super key (from control).
|
||||||
|
("ui.key.accelKey" 91))))))))
|
||||||
|
|
85
oni/home/services/gnuzilla.scm
Normal file
85
oni/home/services/gnuzilla.scm
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
(define-module (oni home services gnuzilla)
|
||||||
|
#:use-module ((ice-9 match)
|
||||||
|
#:select (match))
|
||||||
|
#:use-module ((gnu services configuration)
|
||||||
|
#:select (serialize-package
|
||||||
|
define-configuration))
|
||||||
|
#:use-module ((gnu packages gnuzilla)
|
||||||
|
#:select (icecat))
|
||||||
|
#:use-module ((gnu home services)
|
||||||
|
#:select (service-type
|
||||||
|
service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
home-files-service-type))
|
||||||
|
#:use-module ((guix packages)
|
||||||
|
#:select (package?))
|
||||||
|
#:use-module ((guix gexp)
|
||||||
|
#:select (gexp
|
||||||
|
mixed-text-file))
|
||||||
|
|
||||||
|
#:export (home-icecat-service-type
|
||||||
|
home-icecat-configuration))
|
||||||
|
|
||||||
|
(define (serialize-setting pair)
|
||||||
|
(match pair
|
||||||
|
((key (? boolean? value))
|
||||||
|
(format #f "user_pref(~s, ~a);" key (if value "true" "false")))
|
||||||
|
((key (? number? value))
|
||||||
|
(format #f "user_pref(~s, ~a);" key value))
|
||||||
|
((key (? string? value))
|
||||||
|
(format #f "user_pref(~s, ~s);" key value))))
|
||||||
|
|
||||||
|
(define (serialize-alist field value)
|
||||||
|
(string-join (map serialize-setting value) "\n"))
|
||||||
|
|
||||||
|
(define (alist? value)
|
||||||
|
(or (null? value)
|
||||||
|
(and (list? value)
|
||||||
|
(list? (car value)))))
|
||||||
|
|
||||||
|
(define-configuration home-icecat-configuration
|
||||||
|
(package
|
||||||
|
(package icecat)
|
||||||
|
"Package to use for setting up icecat.")
|
||||||
|
(settings
|
||||||
|
(alist '())
|
||||||
|
"Settings to specify for the generated profile."))
|
||||||
|
|
||||||
|
(define (add-icecat-packages config)
|
||||||
|
(list (home-icecat-configuration-package config)))
|
||||||
|
|
||||||
|
(define (home-icecat-configuration-files config)
|
||||||
|
`((".mozilla/icecat/profiles.ini"
|
||||||
|
,(mixed-text-file
|
||||||
|
"profiles.ini"
|
||||||
|
"[Install4F96D1932A9F858E]\n"
|
||||||
|
"Default=default\n"
|
||||||
|
"Locked=1\n"
|
||||||
|
"\n"
|
||||||
|
"[Profile0]\n"
|
||||||
|
"Name=default\n"
|
||||||
|
"IsRelative=1\n"
|
||||||
|
"Path=default\n"
|
||||||
|
"Default=1\n"
|
||||||
|
"\n"
|
||||||
|
"[General]\n"
|
||||||
|
"StartWithLastProfile=1\n"
|
||||||
|
"Version=2\n"))
|
||||||
|
(".mozilla/icecat/default/user.js"
|
||||||
|
,(mixed-text-file
|
||||||
|
"user.js"
|
||||||
|
(serialize-alist config (home-icecat-configuration-settings config))))))
|
||||||
|
|
||||||
|
(define home-icecat-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-icecat)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-icecat-packages)
|
||||||
|
(service-extension
|
||||||
|
home-files-service-type
|
||||||
|
home-icecat-configuration-files)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-icecat-configuration))
|
||||||
|
(description "Install and configure icecat.")))
|
Loading…
Reference in a new issue