[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guix home, guix system, channels, some noob questions
From: |
Sébastien Rey-Coyrehourcq |
Subject: |
Re: Guix home, guix system, channels, some noob questions |
Date: |
Tue, 17 May 2022 18:02:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
Le 17/05/2022 à 12:15, Daniel Meißner a écrit :
Sébastien Rey-Coyrehourcq writes:
If you have some example of guix home profile that use dotfile manager
i'm interested :)
I'm planned to use chezmoi with pass (https://www.chezmoi.io/) in go
that use git to version file.
IIUC you can use Guix home directly and dispense with chezmoi. However,
I did not know chezmoi before so there might be a use-case that is not
covered by Guix home, in principle though, Guix home is itself a dotfile
manager.
Thanks, in fact when i see *guix home* that was my first intention
(like home-manager in nix).
The only things holding me back at the moment is two things :
a) doom emacs flavour, how to manage the fact that doom use straigt.el
to maintain packages
I suppose i only save the .doom.d and ignore the .emacs.d that contain
all packages downloaded by .doom.d/init.el and config.el
b) "password / secrets" management ?
There are two things, file to directly encrypt (like ssh key) and
password to hide into configuration file (templating)
b.1) So, that need to encrypt/decrypt more or less "on-the-fly" the
files using gpg/yubikey or age like yadm (
https://yadm.io/docs/encryption ) or chezmoi
(https://www.chezmoi.io/user-guide/encryption/gpg/) do ?
b.2) And for templating, like replacing ${mypassword} into some
configuration file by getting info stored into password manager like
"pass", i also don't know how to do that.
Actually I have no idea how to do that with guile / guix home for b.1 / b.2
c) synchronization of my .dotfiles between two different OS/System :
Ubuntu (home) / Guix (work & home)
Lot of people use Ubuntu in my work environment, so i need to maintain
some sort of compatibility between both systems for my dotfile (before
everyone use guix in 2030 ? :D).
I suppose guix home work well with guix on top of ubuntu ?
Best.
I use it for example to manage my Git config, Emacs config and
others. The manual has a chapter about it:
https://guix.gnu.org/de/manual/devel/en/html_node/Home-Configuration.html#Home-Configuration
A simple example would be the following:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu home)
(gnu home services)
(gnu home services shells)
(gnu services)
(gnu packages admin)
(guix gexp))
(home-environment
(packages (list htop))
(services
(list
(service home-bash-service-type
(home-bash-configuration
(environment-variables
'(("HISTFILE" . "$XDG_STATE_HOME/bash_history")))))
(simple-service 'git-config
home-files-service-type
(list `(".gitconfig"
,(plain-file "gitconfig"
"[user]
email = daniel.meissner-i4k@ruhr-uni-bochum.de
name = Daniel Meißner
")))))))
--8<---------------cut here---------------end--------------->8---
This would create a home-environment with the package ‘htop’, a bash
configuration that sets the HISTFILE env var as well as the .gitconfig
file with the above contents. You can test this environment using:
guix home container test-home.scm
This spawns a shell where your home environment is set up as specified
but using a container. So your actual home directory is not modified.
You don’t have to embed all your config files inside the Scheme file
directly. You can also load from other files, for example, you could
replace the ,(plain-file ...) call with a ,(local-file "gitconfig.txt")
which would use the contents of the file gitconfig.txt which lives next
to your Scheme file for the generation of the .gitconfig file.
Best
--
Daniel
OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
- Re: Guix home, guix system, channels, some noob questions, (continued)
- Re: Guix home, guix system, channels, some noob questions, Sébastien Rey-Coyrehourcq, 2022/05/11
- Re: Guix home, guix system, channels, some noob questions, Julien Lepiller, 2022/05/11
- Re: Guix home, guix system, channels, some noob questions, Sébastien Rey-Coyrehourcq, 2022/05/12
- Re: Guix home, guix system, channels, some noob questions, Julien Lepiller, 2022/05/12
- Re: Guix home, guix system, channels, some noob questions, Sébastien Rey-Coyrehourcq, 2022/05/12
- Re: Guix home, guix system, channels, some noob questions, Daniel Meißner, 2022/05/17
- Re: Guix home, guix system, channels, some noob questions, Sébastien Rey-Coyrehourcq, 2022/05/17
- Re: Guix home, guix system, channels, some noob questions, Daniel Meißner, 2022/05/17
- Re: Guix home, guix system, channels, some noob questions, Sébastien Rey-Coyrehourcq, 2022/05/17
- Re: Guix home, guix system, channels, some noob questions, Daniel Meißner, 2022/05/17
- Re: Guix home, guix system, channels, some noob questions,
Sébastien Rey-Coyrehourcq <=
- Re: Guix home, guix system, channels, some noob questions, Daniel Meißner, 2022/05/25
- Re: Guix home, guix system, channels, some noob questions, Efraim Flashner, 2022/05/25
- Re: Guix home, guix system, channels, some noob questions, Dominic Martinez, 2022/05/25
- Re: Guix home, guix system, channels, some noob questions, Mekeor Melire, 2022/05/11