config avec home intégré
This commit is contained in:
parent
fdb121e0a2
commit
71c5fc9152
96
config.scm
96
config.scm
|
@ -19,10 +19,29 @@
|
|||
|
||||
;; Indique quels modules importer pour accéder aux variables
|
||||
;; utilisées dans cette configuration.
|
||||
(use-modules (gnu))
|
||||
(use-modules (gnu packages freedesktop) (gnu packages cups))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-service-modules cups desktop networking ssh xorg virtualization vpn security-token)
|
||||
(use-modules
|
||||
(gnu)
|
||||
(gnu home)
|
||||
(gnu home services shells)
|
||||
(gnu home services gnupg)
|
||||
(gnu packages)
|
||||
(gnu packages gnupg)
|
||||
(gnu packages freedesktop)
|
||||
(gnu packages cups)
|
||||
(gnu services)
|
||||
(srfi srfi-1)
|
||||
(guix gexp))
|
||||
|
||||
(use-service-modules
|
||||
cups
|
||||
desktop
|
||||
guix
|
||||
networking
|
||||
ssh
|
||||
xorg
|
||||
virtualization
|
||||
vpn
|
||||
security-token)
|
||||
|
||||
;; Configuration sudoer personnalisée
|
||||
(define %sudoers-specification
|
||||
|
@ -60,6 +79,65 @@ LABEL=\"gnupg_rules_end\"
|
|||
KERNEL==\"sd?1\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"4109\", SYMLINK+=\"nitrospace\"
|
||||
")))
|
||||
|
||||
(define %bashrc_content
|
||||
(plain-file "bashrc" "\
|
||||
if [ -n \"$GUIX_ENVIRONMENT\" ]
|
||||
then
|
||||
PS1='\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\] [env] \\$ '
|
||||
else
|
||||
PS1='\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ '
|
||||
fi
|
||||
|
||||
if [[ ! -n \"$SSH_CLIENT\" ]]; then
|
||||
unset SSH_AGENT_PID
|
||||
if [ \"${gnupg_SSH_AUTH_SOCK_by:-0}\" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK=\"$(gpgconf --list-dirs agent-ssh-socket)\"
|
||||
fi
|
||||
fi"))
|
||||
|
||||
(define %profile_content
|
||||
(plain-file "profile" "\
|
||||
if [[ ! -n \"$SSH_CLIENT\" ]]; then
|
||||
unset SSH_AGENT_PID
|
||||
if [ \"${gnupg_SSH_AUTH_SOCK_by:-0}\" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK=\"$(gpgconf --list-dirs agent-ssh-socket)\"
|
||||
fi
|
||||
fi"))
|
||||
|
||||
(define %home_configuration
|
||||
(home-environment
|
||||
(services
|
||||
(list
|
||||
(service home-bash-service-type
|
||||
(home-bash-configuration
|
||||
(environment-variables
|
||||
'(
|
||||
("BSD_GAMES_DIR" . "~/.local/share/bsd-games")
|
||||
("GCC_COLORS" . "'error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'")
|
||||
("GUIX_PACKAGE_PATH" . "$HOME/.config/guix/packages/defs")
|
||||
("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share")
|
||||
("LV2_PATH" . "$HOME/.guix-profile/lib/lv2")))
|
||||
(aliases
|
||||
'(
|
||||
("clear" . "printf '\\033c'")
|
||||
("dir" . "dir --color=auto")
|
||||
("egrep" . "grep -E --color=auto")
|
||||
("fgrep" . "grep -F --color=auto")
|
||||
("grep" . "grep --color=auto")
|
||||
("la" . "ls -lthA -p --color=auto")
|
||||
("ll" . "ls -lth -p --color=auto")
|
||||
("ls" . "ls -p --color=auto")
|
||||
("vdir" . "vdir --color=auto")))
|
||||
(bashrc
|
||||
(list
|
||||
%bashrc_content))))
|
||||
|
||||
(service home-gpg-agent-service-type
|
||||
(home-gpg-agent-configuration
|
||||
(pinentry-program
|
||||
(file-append pinentry-gnome3 "/bin/pinentry-gnome3"))
|
||||
(ssh-support? #t)))))))
|
||||
|
||||
;; Configuration du système
|
||||
;; C'est le point d'entrée de la configuration
|
||||
(operating-system
|
||||
|
@ -260,7 +338,6 @@ KERNEL==\"sd?1\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"4109\", SYMLINK
|
|||
"xdot"
|
||||
"xdotool"
|
||||
"xeyes"
|
||||
"xmlcopyeditor"
|
||||
"xournalpp"
|
||||
"xrdp"
|
||||
"yt-dlp"
|
||||
|
@ -273,7 +350,11 @@ KERNEL==\"sd?1\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"4109\", SYMLINK
|
|||
(modify-services
|
||||
(append
|
||||
(list
|
||||
(service gnome-desktop-service-type)
|
||||
;; Service guix home (reconfiguration auto des profils)
|
||||
(service guix-home-service-type
|
||||
`(("neox" ,%home_configuration)))
|
||||
|
||||
;; Service bluetooth
|
||||
(service bluetooth-service-type)
|
||||
|
||||
;; Service de gestion des clés de chiffrement physique
|
||||
|
@ -307,6 +388,9 @@ KERNEL==\"sd?1\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"4109\", SYMLINK
|
|||
(pam-limits-entry "@audio" 'both 'rtprio 99)
|
||||
(pam-limits-entry "@audio" 'both 'memlock 'unlimited)))
|
||||
|
||||
;; Service Gnome/GDM
|
||||
(service gnome-desktop-service-type)
|
||||
|
||||
;; Configuration de l'environnement graphique (notamment clavier)
|
||||
(set-xorg-configuration
|
||||
(xorg-configuration (keyboard-layout keyboard-layout))))
|
||||
|
|
Loading…
Reference in New Issue