guix-config

guix system configuration/declaration
git clone git://git.eonn.xyz/guix-config.git
Log | Files | Refs | LICENSE

commit 11b91100805e7cf810b8cebe84bd7ee044da58d5
parent 2e7ab5576c839776915d45ea177de5e9020c0d8f
Author: Ian Ressa <ian@eonn.xyz>
Date:   Wed, 19 Oct 2022 21:08:45 -0400

change 'shmage guix dotfiles' to 'shmage guix home'

Diffstat:
Mhome/cocles.scm | 2+-
Dmodules/shmage/guix/dotfiles.scm | 82-------------------------------------------------------------------------------
Amodules/shmage/guix/home.scm | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/home/cocles.scm b/home/cocles.scm @@ -9,7 +9,7 @@ (gnu services) (guix gexp) (gnu home services shells) - (shmage guix dotfiles)) + (shmage guix home)) (home-environment ;; Below is the list of packages that will show up in your diff --git a/modules/shmage/guix/dotfiles.scm b/modules/shmage/guix/dotfiles.scm @@ -1,82 +0,0 @@ -(define-module (shmage guix dotfiles) - #:use-module (gnu home) - #:use-module (gnu home services) - #:use-module (gnu home services symlink-manager) - #:use-module (gnu packages) - #:use-module (gnu services) - #:use-module (guix gexp) - #:use-module (gnu home services shells) - #:export (home-services) - #:export (dotfile->dotfile-pair) - #:export (dotfiles)) - -(define (undotify-dotfile file) -;; Guix Home is kind of silly and doesn't like it when your dotfiles repository -;; has actual dotfiles in it. -(let ((l (string->list file))) (if (char=? #\. (car l)) (list->string (cdr l)) file))) - -(define-syntax-rule (dotfile->dotfilepair dotfile) - (list dotfile (local-file (string-append "/home/ian/guix-config/dotfiles/" (undotify-dotfile dotfile)) #:recursive? #t))) - -(define-syntax-rule (dotfiles->dotfilepairs file ...) - (map (lambda (n) (dotfile->dotfilepair n)) (list file ...))) - -(define home-services - (list (service home-bash-service-type - (home-bash-configuration - (bashrc (list (local-file "dotfiles/bashrc" - (undotify-dotfile ".bashrc")))) - (bash-profile (list (local-file - "dotfiles/bash_profile" - (undotify-dotfile ".bash_profile")))))) - - (simple-service 'dotfiles-init - home-files-service-type - (dotfiles->dotfilepairs - ;; Emacs - ".emacs.d/init.el" - ".emacs.d/init/irc.el" - ".emacs.d/init/org.el" - ".emacs.d/init/packages.el" - ".emacs.d/init/visual.el" - ;;;; YASnippet - ".emacs.d/snippets/latex-mode/generic-section" - ".emacs.d/snippets/latex-mode/generic-subsection" - ".emacs.d/snippets/latex-mode/inlinemath" - ".emacs.d/snippets/latex-mode/math" - ".emacs.d/snippets/latex-mode/proof" - ;;;; Themes - ".emacs.d/themes/wizard-theme.el" - - ;;misc HOME/.files - ".Xresources" - ".tmux.conf" - ".xinitrc" - ".gtkrc-2.0" - ".icons/default/index.theme" - )) - - (simple-service 'scripts-init - home-files-service-type - (dotfiles->dotfilepairs - "bin/guix-reconfigure.sh" - "bin/guix-update-profiles.sh" - "bin/lockscreen.sh" - "bin/session-reboot" - "bin/session-shutdown" - "bin/session-suspend" - )) - - (simple-service 'alternate-channels-init - home-xdg-configuration-files-service-type - (dotfiles->dotfilepairs - "guix/channels.scm" - )) - - (simple-service 'xdg-config-init - home-xdg-configuration-files-service-type - (dotfiles->dotfilepairs - "alacritty/alacritty.yml" - "dunst/dunstrc" - "gtk-3.0/settings.ini" - )))) diff --git a/modules/shmage/guix/home.scm b/modules/shmage/guix/home.scm @@ -0,0 +1,82 @@ +(define-module (shmage guix home) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services symlink-manager) + #:use-module (gnu packages) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (gnu home services shells) + #:export (home-services) + #:export (dotfile->dotfile-pair) + #:export (dotfiles)) + +(define (undotify-dotfile file) +;; Guix Home is kind of silly and doesn't like it when your dotfiles repository +;; has actual dotfiles in it. +(let ((l (string->list file))) (if (char=? #\. (car l)) (list->string (cdr l)) file))) + +(define-syntax-rule (dotfile->dotfilepair dotfile) + (list dotfile (local-file (string-append "/home/ian/guix-config/dotfiles/" (undotify-dotfile dotfile)) #:recursive? #t))) + +(define-syntax-rule (dotfiles->dotfilepairs file ...) + (map (lambda (n) (dotfile->dotfilepair n)) (list file ...))) + +(define home-services + (list (service home-bash-service-type + (home-bash-configuration + (bashrc (list (local-file "dotfiles/bashrc" + (undotify-dotfile ".bashrc")))) + (bash-profile (list (local-file + "dotfiles/bash_profile" + (undotify-dotfile ".bash_profile")))))) + + (simple-service 'dotfiles-init + home-files-service-type + (dotfiles->dotfilepairs + ;; Emacs + ".emacs.d/init.el" + ".emacs.d/init/irc.el" + ".emacs.d/init/org.el" + ".emacs.d/init/packages.el" + ".emacs.d/init/visual.el" + ;;;; YASnippet + ".emacs.d/snippets/latex-mode/generic-section" + ".emacs.d/snippets/latex-mode/generic-subsection" + ".emacs.d/snippets/latex-mode/inlinemath" + ".emacs.d/snippets/latex-mode/math" + ".emacs.d/snippets/latex-mode/proof" + ;;;; Themes + ".emacs.d/themes/wizard-theme.el" + + ;;misc HOME/.files + ".Xresources" + ".tmux.conf" + ".xinitrc" + ".gtkrc-2.0" + ".icons/default/index.theme" + )) + + (simple-service 'scripts-init + home-files-service-type + (dotfiles->dotfilepairs + "bin/guix-reconfigure.sh" + "bin/guix-update-profiles.sh" + "bin/lockscreen.sh" + "bin/session-reboot" + "bin/session-shutdown" + "bin/session-suspend" + )) + + (simple-service 'alternate-channels-init + home-xdg-configuration-files-service-type + (dotfiles->dotfilepairs + "guix/channels.scm" + )) + + (simple-service 'xdg-config-init + home-xdg-configuration-files-service-type + (dotfiles->dotfilepairs + "alacritty/alacritty.yml" + "dunst/dunstrc" + "gtk-3.0/settings.ini" + ))))