Compare commits

..

5 commits

11 changed files with 224 additions and 18 deletions

View file

@ -12,6 +12,7 @@
(outline-heading-end-regexp . ":\n")
(outline-regexp . "##+"))
(scheme-mode
(geiser-guile-binary . ("guix" "repl"))
(projectile-project-compilation-cmd . "guix home build config.scm")
(eval . (put 'eval-when 'scheme-indent-function 1))
(eval . (put 'call-with-prompt 'scheme-indent-function 1))

View file

@ -163,6 +163,8 @@ endif
check:
$(SCHEME_IMPLEMENTATION) --no-auto-compile test.scm
new-dotfiles:
# Local Variables:
# outline-regexp: "##+"
# End:

View file

@ -1,3 +1,6 @@
(add-to-load-path (dirname (current-filename)))
(system* "make" "new-dotfiles")
(load-from-path "secrets.scm")
(load-from-path (string-append "oni/home/config/" (gethostname) ".scm"))

View file

@ -9,3 +9,4 @@
sendmailcmd = /usr/bin/msmtp
[init]
defaultBranchname = main
defaultBranch = main

View file

@ -89,7 +89,8 @@
(environment-variables
'(("HISTFILE" . "$HOME/.zsh/histfile")
("HISTSIZE" . "1000")
("SAVEHIST" . "1000")))
("SAVEHIST" . "1000")
("WORDCHARS" . "")))
(zshrc
(list
(mixed-text-file
@ -112,6 +113,10 @@
"bindkey -e '^[w' x-copy-region-as-kill\n"
"bindkey -e '^W' x-kill-region\n"
"bindkey -e '^Y' x-yank\n"
"bindkey -e '^[f' emacs-forward-word\n"
"bindkey -e '^[F' emacs-forward-word\n"
"bindkey -e '^[b' emacs-backward-word\n"
"bindkey -e '^[B' emacs-backward-word\n"
"autoload -Uz compinit\n"
"compinit\n"
"function horizontal-rule() {\n"
@ -150,7 +155,8 @@
(user "slash")
(port 4511)
(extra-content "LocalForward 8090 localhost:8090
LocalForward 2812 localhost:2812"))
LocalForward 2812 localhost:2812
LocalForward 19999 localhost:19999"))
(openssh-host
(name "rincewind")
(host-name "192.168.1.135")

View file

@ -6,8 +6,6 @@
home-msmtp-configuration
msmtp-configuration
msmtp-account))
#:use-module ((gnu home services guix)
#:select (home-channels-service-type))
#:use-module ((gnu home services gnupg)
#:select (home-gpg-agent-service-type
home-gpg-agent-configuration))
@ -33,6 +31,8 @@
#:select (gforth))
#:use-module ((gnu packages gnome)
#:select (hicolor-icon-theme))
#:use-module ((gnu packages librewolf)
#:select (librewolf))
#:use-module ((gnu packages linux)
#:select (fakeroot))
#:use-module ((gnu packages mail)
@ -48,7 +48,8 @@
tree-sitter-json
tree-sitter-css))
#:use-module ((gnu packages)
#:select (specification->package+output))
#:select (specification->package+output
specification->package))
#:use-module ((gnu services)
#:select (service
simple-service))
@ -73,7 +74,8 @@
home-guile-service
home-xmodmap-service
home-openssh-service
home-kitty-service))
home-kitty-service
home-channels-service))
#:use-module ((oni home services autokey)
#:select (home-autokey-service-type))
#:use-module ((oni home services copyq)
@ -97,7 +99,9 @@
home-emacs-pinentry-service-type
home-emacs-vterm-service-type
home-emacs-vterm-configuration
home-emacs-org-modern-service-type))
home-emacs-org-modern-service-type
home-wakatime-service-type
home-wakatime-configuration))
#:use-module ((oni home services environment)
#:select (home-environment-service))
#:use-module ((oni home services flameshot)
@ -200,7 +204,8 @@
emacs-oni-yaml
emacs-oni-python
emacs-oni-git-commit
emacs-oni-php))
emacs-oni-php
emacs-oni-web-mode))
#:use-module ((oni packages inbox-size)
#:select (inbox-size))
#:use-module ((oni packages mpd)
@ -213,6 +218,9 @@
#:select (pick-random-wallpaper))
#:use-module ((oni packages shutdown-rofi)
#:select (shutdown-rofi))
#:use-module ((oni packages snes-games)
#:select (snes-blackthorne
snes-blackthorne-icons))
#:use-module ((oni packages stumpwm)
#:select (stumpwm+swank))
#:use-module ((oni packages terminals)
@ -226,6 +234,11 @@
`((with-branch . ,(string-append (package-name package) "=master"))))
package))
(define (with-source package source)
((options->transformation
`((with-source . ,(format #f "~a=~a" (package-name package) source))))
package))
(define rincewind-picom-service
(service home-picom-service-type
(home-picom-configuration
@ -259,6 +272,10 @@
(specification->package+output "glibc-locales")
(specification->package+output "font-fantasque-sans")
(specification->package+output "font-comic-neue")
(specification->package+output "font-dosis")
(specification->package "zathura")
(specification->package "zathura-ps")
(specification->package "zathura-pdf-mupdf")
pick-random-wallpaper
notmuch-collect-tasks
notmuch-tag-mailinglists
@ -329,6 +346,7 @@
emacs-nginx-mode
emacs-oni-git-commit
emacs-oni-php
emacs-oni-web-mode
tree-sitter-bash
tree-sitter-scheme
@ -344,7 +362,12 @@
;; Might be needed for cetrificates
nss-certs
tym))
tym
(with-source snes-blackthorne-icons
(format #f "~a/pictures/icons/Blackthorne/blackthorne_icons.tar.gz" (getenv "HOME")))
(with-source snes-blackthorne
(format #f "~a/downloads/Blackthorne.7z" (getenv "HOME")))))
(services
(list
@ -372,7 +395,7 @@
;; (home-polybar-configuration
;; (bar "rincewind")))
;; (service home-kdeconnect-service-type)
(service home-kdeconnect-service-type)
(service home-syncthing-service-type)
(service home-emacs-service-type
@ -416,6 +439,11 @@
(home-emacs-vterm-configuration
(buffer-name-string "*vterm* %s")))
(service home-emacs-org-modern-service-type)
(service home-wakatime-service-type
(home-wakatime-configuration
(api-url "https://waka.ryuslash.org/api")
(exclude '("COMMIT_EDITMSG$"
"TAG_EDITMSG$"))))
(service home-flameshot-service-type)
@ -509,18 +537,30 @@
(service home-icecat-service-type
(home-icecat-configuration
(package librewolf)
(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")
;; Visual modifications. Don't let websites pick the colors or
;; the fonts, use mine instead.
("browser.display.document_color_use" 2)
("browser.display.use_document_fonts" 0)
("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)
("browser.newtabpage.activity-stream.showWeather" #f)
("font.default.x-western" "sans-serif")
("font.minimum-size.x-western" 18)
("font.name.monospace.x-western" "Fantasque Sans Mono")
("font.name.sans-serif.x-western" "Dosis")
;; Sadly, with this option on it won't accept my color
;; modifications, so I turn it off, even though I would prefer
;; being able to leave everything (except the forced light
;; theme) on.
("privacy.resistFingerprinting" #f)
;; Change the accelerator key (modifier key for most keyboard
;; shortcuts) to the super key (from control).
("ui.key.accelKey" 91))))))))

View file

@ -39,6 +39,12 @@
#:select (emacs-yasnippet-capf
emacs-golden-ratio
emacs-ace-link-notmuch))
#:use-module ((rosenthal packages binaries)
#:select (wakatime-cli-bin))
#:use-module ((rosenthal packages emacs-xyz)
#:select (emacs-wakatime-mode))
#:use-module ((srfi srfi-1)
#:select (every))
#:export (home-emacs-service-type
home-emacs-configuration
@ -71,10 +77,20 @@
home-emacs-vterm-configuration
home-emacs-org-modern-service-type
home-emacs-org-modern-configuration))
home-emacs-org-modern-configuration
home-wakatime-service-type
home-wakatime-configuration))
(define-maybe string)
(define (list-of-strings? obj)
(and (list? obj)
(every string? obj)))
(define (serialize-list-of-strings field value)
(string-append " " (string-join value "\n ")))
;;; Emacs
(define-configuration/no-serialization home-emacs-extension
@ -393,6 +409,7 @@
"(golden-ratio-mode)\n"
"(with-eval-after-load 'ace-window\n"
" (advice-add 'ace-window :after #'golden-ratio))\n"
"(add-to-list 'golden-ratio-exclude-modes 'calculator-mode)\n"
";;;;; golden-ratio-config ends here.\n"))
(home-emacs-golden-ratio-configuration-configurations config)))))
@ -581,3 +598,70 @@
(compose identity)
(default-value (home-emacs-org-modern-configuration))
(description "Install and configure emacs-org-modern.")))
;;; Wakatime
(define-configuration/no-serialization home-wakatime-configuration
(package
(package wakatime-cli-bin)
"Package to use for the wakatime-cli program")
(emacs-package
(package emacs-wakatime-mode)
"Package to use for setting emacs-wakatime-mode")
(api-url
maybe-string
"URL where the API lives")
;; (api-key
;; maybe-string
;; "API key for connecting to wakatime")
(debug
(boolean #f)
"Run in debug mode?")
(exclude
(list-of-strings '())
"Filename patterns to exclude"))
(define (add-wakatime-emacs-configuration config)
(home-emacs-extension
(configurations
(append
(list (mixed-text-file "wakatime-config"
";;;;; wakatime-config starts here.\n"
;; (if (maybe-value-set? (home-wakatime-configuration-api-key config))
;; (format #f "(setq wakatime-api-key ~s)~%" (home-wakatime-configuration-api-key config))
;; "")
"(setq wakatime-cli-path \"" (home-wakatime-configuration-package config) "/bin/wakatime-cli\")\n"
"(global-wakatime-mode)\n"
";;;;; wakatime-config ends here.\n"))))))
(define (add-wakatime-configuration-file config)
`((".wakatime.cfg"
,(mixed-text-file
"wakatime.cfg"
"[settings]\n"
"api_url = " (home-wakatime-configuration-api-url config) "\n"
"api_key_vault_cmd = secret-tool lookup service wakatime host " (home-wakatime-configuration-api-url config) "\n"
"debug = " (if (home-wakatime-configuration-debug config) "true" "false") "\n"
"exclude =\n"
(serialize-list-of-strings 'exclude (home-wakatime-configuration-exclude config))))))
(define (add-wakatime-packages config)
(list (home-wakatime-configuration-package config)
(home-wakatime-configuration-emacs-package config)))
(define home-wakatime-service-type
(service-type
(name 'home-wakatime)
(extensions
(list (service-extension
home-emacs-service-type
add-wakatime-emacs-configuration)
(service-extension
home-profile-service-type
add-wakatime-packages)
(service-extension
home-files-service-type
add-wakatime-configuration-file)))
(compose identity)
(default-value (home-wakatime-configuration))
(description "Install and configure wakatime.")))

View file

@ -12,7 +12,8 @@
home-profile-service-type
home-files-service-type))
#:use-module ((guix packages)
#:select (package?))
#:select (package?
package-name))
#:use-module ((guix gexp)
#:select (gexp
mixed-text-file))
@ -49,7 +50,8 @@
(list (home-icecat-configuration-package config)))
(define (home-icecat-configuration-files config)
`((".mozilla/icecat/profiles.ini"
`((;; ,(string-append ".mozilla/" (package-name (home-icecat-configuration-package config)) "/profiles.ini")
".librewolf/profiles.ini"
,(mixed-text-file
"profiles.ini"
"[Install4F96D1932A9F858E]\n"
@ -65,7 +67,8 @@
"[General]\n"
"StartWithLastProfile=1\n"
"Version=2\n"))
(".mozilla/icecat/default/user.js"
(;; ,(string-append ".mozilla/" (package-name (home-icecat-configuration-package config)) "/default/user.js")
".librewolf/default/user.js"
,(mixed-text-file
"user.js"
(serialize-alist config (home-icecat-configuration-settings config))))))

View file

@ -20,10 +20,20 @@
(define (home-kdeconnect-shepherd-service config)
(list
(shepherd-service
(documentation "Start kdeconnectd")
(provision '(kdeconnectd))
(auto-start? #t)
(start
#~(make-forkexec-constructor
(list #$(file-append (home-kdeconnect-configuration-package config) "/bin/kdeconnectd"))
#:log-file (format #f "~a/.local/var/log/kdeconnectd.log" (getenv "HOME"))))
(stop #~(make-kill-destructor)))
(shepherd-service
(documentation "Start kdeconnect")
(provision '(kdeconnect))
(requirement '(statusbar))
(requirement '(kdeconnectd))
;; (requirement '(statusbar))
(auto-start? #t)
(start
#~(make-forkexec-constructor

View file

@ -19,6 +19,9 @@
home-profile-service-type
home-xdg-configuration-files-service-type
home-run-on-change-service-type))
#:use-module ((gnu home services shepherd)
#:select (home-shepherd-service-type
shepherd-service))
#:use-module ((guix gexp)
#:select (local-file
gexp
@ -37,6 +40,9 @@
home-stumpwm-stumptray-service-type
home-stumpwm-stumptray-configuration))
(define (serialize-integer field value)
"")
(define-configuration/no-serialization home-stumpwm-extension
(configurations
(text-config '())
@ -49,6 +55,9 @@
(configurations
(text-config '())
"The configuration to apply.")
(startup-delay
(integer 10)
"The number of seconds to wait for stumpwm to start up.")
(stumpish-package
(package stumpish)
"Package to use for setting Stumpish"))
@ -75,6 +84,36 @@
`(("files/.config/stumpwm/config"
,#~(system* #$(file-append stumpish "/bin/stumpish") "reload"))))
;; (define (stumpwm-mode-line-service config)
;; (list (shepherd-service
;; (documentation "Try and find out if the stumpwm mode line is enabled.")
;; (provision '(stumpwm-mode-line statusbar))
;; (modules '((ice-9 textual-ports)
;; (srfi srfi-1)))
;; (start
;; #~(lambda ()
;; (let loop ((attempts #$(home-stumpwm-configuration-startup-delay config)))
;; (let* ((input+output (pipe))
;; ;; Use the timeout command here to stop it.
;; (pid (spawn "timeout" '("timeout" "1" "stumpish" "eval" "(print (let ((ml (stumpwm::head-mode-line (current-head)))) (and ml (not (eq (stumpwm::mode-line-mode ml) :hidden)))))")
;; #:output (cdr input+output))))
;; (let ((result (string= "T" (string-trim-right (get-string-all (car input+output))))))
;; (close-port (car input+output))
;; (close-port (cdr input+output))
;; (waitpid pid)
;; (if result
;; result
;; (if (zero? attempts)
;; (begin
;; (format (current-error-port)
;; "Stumpwm mode line did not show up; giving up.\n")
;; #f)
;; (begin
;; (sleep 1)
;; (loop (- attemps 1))))))))))
;; (stop #~(lambda (_) #f))
;; (respawn? #f))))
(define home-stumpwm-service-type
(service-type
(name 'home-stumpwm)
@ -87,7 +126,11 @@
home-stumpwm-config-files)
(service-extension
home-run-on-change-service-type
reload-stumpwm-config-gexp)))
reload-stumpwm-config-gexp)
;; (service-extension
;; home-shepherd-service-type
;; stumpwm-mode-line-service)
))
(compose identity)
(extend home-stumpwm-extensions)
(default-value (home-stumpwm-configuration))

View file

@ -932,3 +932,16 @@ Emacs")))
emacs-xcscope))
(synopsis "My configuration for php-mode.")
(description "This package provides my configuration for editing PHP files.")))
(define-public emacs-oni-web-mode
(package
(inherit emacs-oni-config)
(name "emacs-oni-web-mode")
(arguments
'(#:include '("oni-web\\.el$")))
(propagated-inputs
(list
emacs-web-mode
emacs-oni-flycheck))
(synopsis "My configuration for web-mode.")
(description "This package provides my configuration for editing Web template files.")))