Self-contain guix-home configuration in a channel
This commit is contained in:
parent
abce97d80a
commit
e72345feac
|
@ -0,0 +1,78 @@
|
|||
;; This "home-environment" file can be passed to 'guix home reconfigure'
|
||||
;; to reproduce the content of your profile. This is "symbolic": it only
|
||||
;; specifies package names. To reproduce the exact same profile, you also
|
||||
;; need to capture the channels being used, as returned by "guix describe".
|
||||
;; See the "Replicating Guix" section in the manual.
|
||||
|
||||
(define-module (rekahsoft guix-config home)
|
||||
#:use-module (gnu home)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix profiles)
|
||||
#:use-module (guix transformations)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (gnu home services shells)
|
||||
#:use-module (gnu home services desktop)
|
||||
#:export (%home))
|
||||
|
||||
(include "../../../home-manifest.scm")
|
||||
|
||||
(define %home
|
||||
(home-environment
|
||||
(packages
|
||||
(map manifest-entry-item (manifest-entries %home-manifest)))
|
||||
(services
|
||||
(list
|
||||
(service home-bash-service-type
|
||||
(home-bash-configuration
|
||||
(aliases
|
||||
(let ((aws-alias "aws-vault exec --no-session ${AWS_PROFILE:-default} -- aws")
|
||||
(aws-shell-alias "aws-vault exec --no-session ${AWS_PROFILE:-default} -- aws-shell"))
|
||||
`(("ls" . "ls --color=auto")
|
||||
("ll" . "ls -l")
|
||||
("la" . "ls -a")
|
||||
("lla" . "ls -al")
|
||||
|
||||
("grep" . "grep --color=auto")
|
||||
("fgrep" . "fgrep --color=auto")
|
||||
("egrep" . "egrep --color=auto")
|
||||
("f" . "find")
|
||||
|
||||
("b" . "bat")
|
||||
("x" . "exa")
|
||||
("xs" . "exa")
|
||||
("xl" . "exa -l")
|
||||
("xla" . "exa -la")
|
||||
("xx" . "x -alT --git")
|
||||
|
||||
("av" . "aws-vault")
|
||||
("avl" . "aws-vault login ${AWS_PROFILE:-default}")
|
||||
("ave" . "aws-vault exec ${AWS_PROFILE:-default} --")
|
||||
("aven" . "aws-vault exec --no-session ${AWS_PROFILE:-default} --")
|
||||
("aws" . ,aws-alias)
|
||||
("aws-shell" . ,aws-shell-alias)
|
||||
("unaws" . "unset AWS_{PROFILE,SECRET_ACCESS_KEY,ACCESS_KEY_ID,SDK_LOAD_CONFIG}")
|
||||
("alias-aws" . ,(string-append "alias aws=\"" aws-alias
|
||||
"\"; alias aws-shell=\"" aws-shell-alias "\""))
|
||||
("unalias-aws" . "unalias aws; unalias aws-shell")
|
||||
|
||||
("ff" . "firefox")
|
||||
("ffp" . "firefox --private-window")
|
||||
|
||||
("e" . "emacsclient -t")
|
||||
("kssh" . "kitty +kitten ssh")
|
||||
|
||||
("s" . "sudo")
|
||||
("si" . "sudo -i"))))
|
||||
(environment-variables '(("PS1" . "[\\u@\\h \\W]\\$ ")))))
|
||||
|
||||
(service home-redshift-service-type
|
||||
(home-redshift-configuration
|
||||
(location-provider 'geoclue2)))
|
||||
|
||||
|
||||
;; (service home-zsh-configuration
|
||||
;; (zshenv (list ...))
|
||||
;; (zprofile (list ...))
|
||||
;; (zshrc (list ...)))
|
||||
))))
|
59
README.org
59
README.org
|
@ -2,11 +2,60 @@
|
|||
#+AUTHOR: Collin J. Doering
|
||||
|
||||
#+begin_abstract
|
||||
These are the dotfiles of Collin Doering.
|
||||
These are the dotfiles of the author, managed using guix-home, in combination with gnu stow
|
||||
(until the gnu stow deployment mechanism has been deprecated in preference of guix-home).
|
||||
#+end_abstract
|
||||
|
||||
* Repository Structure
|
||||
|
||||
- ~channels.scm~ :: [[*Guix Channel File][Guix Channel File]]
|
||||
- ~.gitignore~ :: Files ignored by git
|
||||
- ~.guix/~ :: Guix channel directory
|
||||
- ~.guix-authorizations~ :: Guix authorizations file[fn:2]
|
||||
- ~.guix-channel~ :: Guix channel file[fn:3]
|
||||
- ~README.org~ :: Org-mode[fn:4] documentation
|
||||
- ~TODO.org~ :: Org-mode todo's, known issues and future aspirations
|
||||
- ~user-config~ :: Configuration for various programs managed using gnu stow, not
|
||||
guix-home (just yet)
|
||||
- ~user-config-unused :: Configuration for various programs (managed using gnu stow) that
|
||||
is no longer used
|
||||
|
||||
** Guix Channel File
|
||||
|
||||
Guix channels[fn:5] allow for Guix to be customized and extended. They are also critical for
|
||||
replicating a Guix system[fn:6]. To ensure reproducibility, a ~channels.scm~ file is provided
|
||||
in this repository that is expected to be used during deployment. It pins external guix
|
||||
channels to specific versions.
|
||||
|
||||
*** TODO Updating guix channels used for deployment
|
||||
|
||||
**This doesn't work right unless your channels match what is expected by this repository.**
|
||||
|
||||
#+begin_src shell
|
||||
guix time-machine -- describe -f channels > channels.scm
|
||||
#+end_src
|
||||
|
||||
** ~dotfiles~ the Guix Channel
|
||||
|
||||
This repository is itself a Guix channel, which allows home configurations to come directly
|
||||
from the channel, and the version of this configuration be managed just like any other guix
|
||||
channel. It also facilitates CI, allowing for changes this channel be evaluated by Cuirass at
|
||||
[[https://guix-ci.home.rekahsoft.ca]][fn:7]. This channel does not define any packages, only
|
||||
home configurations.
|
||||
|
||||
* Quickstart
|
||||
|
||||
Home configuration, including startup services (via userland shepherd), configuration files
|
||||
and installed packages are all managed using [[https://guix.gnu.org][guix]]/[[https://guix.gnu.org/en/manual/devel/en/html_node/Home-Configuration.html][guix-home]] and can be installed with the
|
||||
following.
|
||||
|
||||
#+begin_src shell
|
||||
guix pull -C ~/.dotfiles/channels.scm
|
||||
guix home reconfigure -e '(@ (rekahsoft guix-config home) %home)'
|
||||
#+end_src
|
||||
|
||||
** TODO Working with Local Sources
|
||||
|
||||
Clone this repository.
|
||||
|
||||
#+begin_src shell
|
||||
|
@ -14,13 +63,11 @@ Clone this repository.
|
|||
cd ~/.dotfiles
|
||||
#+end_src
|
||||
|
||||
Home configuration, including startup services (via userland shepherd), configuration files
|
||||
and installed packages are all managed using [[https://guix.gnu.org][guix]]/[[https://guix.gnu.org/en/manual/devel/en/html_node/Home-Configuration.html][guix-home]] and can be installed with the
|
||||
following.
|
||||
To deploy changes that have not yet been commit, the ~-L|--load-path~ option to guix can be
|
||||
used like so.
|
||||
|
||||
#+begin_src shell
|
||||
guix pull -C ~/.dotfiles/channels.scm
|
||||
guix home reconfigure ~/.dotfiles/home-configuration.scm
|
||||
guix home reconfigure -L .guix -e '(@ (rekahsoft guix-config home) %home)'
|
||||
#+end_src
|
||||
|
||||
** TODO Legacy Configuration
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
;; This "home-environment" file can be passed to 'guix home reconfigure'
|
||||
;; to reproduce the content of your profile. This is "symbolic": it only
|
||||
;; specifies package names. To reproduce the exact same profile, you also
|
||||
;; need to capture the channels being used, as returned by "guix describe".
|
||||
;; See the "Replicating Guix" section in the manual.
|
||||
|
||||
(use-modules
|
||||
(gnu home)
|
||||
(gnu packages)
|
||||
(gnu services)
|
||||
(guix profiles)
|
||||
(guix transformations)
|
||||
(guix gexp)
|
||||
(gnu home services shells)
|
||||
(gnu home services desktop))
|
||||
|
||||
(include "home-manifest.scm")
|
||||
|
||||
(home-environment
|
||||
(packages
|
||||
(map manifest-entry-item (manifest-entries %home-manifest)))
|
||||
(services
|
||||
(list
|
||||
(service home-bash-service-type
|
||||
(home-bash-configuration
|
||||
(aliases
|
||||
(let ((aws-alias "aws-vault exec --no-session ${AWS_PROFILE:-default} -- aws")
|
||||
(aws-shell-alias "aws-vault exec --no-session ${AWS_PROFILE:-default} -- aws-shell"))
|
||||
`(("ls" . "ls --color=auto")
|
||||
("ll" . "ls -l")
|
||||
("la" . "ls -a")
|
||||
("lla" . "ls -al")
|
||||
|
||||
("grep" . "grep --color=auto")
|
||||
("fgrep" . "fgrep --color=auto")
|
||||
("egrep" . "egrep --color=auto")
|
||||
("f" . "find")
|
||||
|
||||
("b" . "bat")
|
||||
("x" . "exa")
|
||||
("xs" . "exa")
|
||||
("xl" . "exa -l")
|
||||
("xla" . "exa -la")
|
||||
("xx" . "x -alT --git")
|
||||
|
||||
("av" . "aws-vault")
|
||||
("avl" . "aws-vault login ${AWS_PROFILE:-default}")
|
||||
("ave" . "aws-vault exec ${AWS_PROFILE:-default} --")
|
||||
("aven" . "aws-vault exec --no-session ${AWS_PROFILE:-default} --")
|
||||
("aws" . ,aws-alias)
|
||||
("aws-shell" . ,aws-shell-alias)
|
||||
("unaws" . "unset AWS_{PROFILE,SECRET_ACCESS_KEY,ACCESS_KEY_ID,SDK_LOAD_CONFIG}")
|
||||
("alias-aws" . ,(string-append "alias aws=\"" aws-alias
|
||||
"\"; alias aws-shell=\"" aws-shell-alias "\""))
|
||||
("unalias-aws" . "unalias aws; unalias aws-shell")
|
||||
|
||||
("ff" . "firefox")
|
||||
("ffp" . "firefox --private-window")
|
||||
|
||||
("e" . "emacsclient -t")
|
||||
("kssh" . "kitty +kitten ssh")
|
||||
|
||||
("s" . "sudo")
|
||||
("si" . "sudo -i"))))
|
||||
(environment-variables '(("PS1" . "[\\u@\\h \\W]\\$ ")))))
|
||||
|
||||
(service home-redshift-service-type
|
||||
(home-redshift-configuration
|
||||
(location-provider 'geoclue2)))
|
||||
|
||||
|
||||
;; (service home-zsh-configuration
|
||||
;; (zshenv (list ...))
|
||||
;; (zprofile (list ...))
|
||||
;; (zshrc (list ...)))
|
||||
)))
|
Loading…
Reference in New Issue