From dbfce2e54e735779297116c5f415936b4cb00ef0 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Mon, 12 Aug 2024 20:22:28 +0200 Subject: [PATCH] feat: init home --- home/.bash_profile | 15 +++++++ home/.bashrc | 25 +++++++++++ home/fonts.scm | 30 +++++++++++++ home/home-configuration.scm | 88 +++++++++++++++++++++++++++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 home/.bash_profile create mode 100644 home/.bashrc create mode 100644 home/fonts.scm create mode 100644 home/home-configuration.scm diff --git a/home/.bash_profile b/home/.bash_profile new file mode 100644 index 0000000..9eb3ae0 --- /dev/null +++ b/home/.bash_profile @@ -0,0 +1,15 @@ +# Set up Guix Home profile +if [ -f ~/.profile ]; then . ~/.profile; fi + +# Honor per-interactive-shell startup file +if [ -f ~/.bashrc ]; then . ~/.bashrc; fi + +# Merge search-paths from multiple profiles, the order matters. +eval "$(guix package --search-paths \ +-p $HOME/.config/guix/current \ +-p $HOME/.guix-home/profile \ +-p $HOME/.guix-profile \ +-p /run/current-system/profile)" + +# Prepend setuid programs. +export PATH=/run/setuid-programs:$PATH diff --git a/home/.bashrc b/home/.bashrc new file mode 100644 index 0000000..56c94b8 --- /dev/null +++ b/home/.bashrc @@ -0,0 +1,25 @@ +# Bash initialization for interactive non-login shells and +# for remote shells (info "(bash) Bash Startup Files"). + +# Export 'SHELL' to child processes. Programs such as 'screen' +# honor it and otherwise use /bin/sh. +export SHELL + +if [[ $- != *i* ]] +then + # We are being invoked from a non-interactive shell. If this + # is an SSH session (as in "ssh host command"), source + # /etc/profile so we get PATH and other essential variables. + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + # Don't do anything else. + return +fi + +# Source the system-wide file. +[ -f /etc/bashrc ] && source /etc/bashrc + +alias ls='ls -p --color=auto' +alias ll='ls -l' +alias grep='grep --color=auto' +alias ip='ip -color=auto' diff --git a/home/fonts.scm b/home/fonts.scm new file mode 100644 index 0000000..0808177 --- /dev/null +++ b/home/fonts.scm @@ -0,0 +1,30 @@ +(define-module (home fonts) + #:use-module (gnu packages compression) + #:use-module (guix packages) + #:use-module (guix build-system copy) + #:use-module (guix download)) + +(define-public font-ubuntu + (package + (name "font-ubuntu") + (version "0.83") + (source + (origin + (method url-fetch) + (uri (string-append + "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-" + version ".zip")) + (sha256 + (base32 + "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5")))) + (inputs + (list unzip)) + (build-system copy-build-system) + (arguments + '(#:install-plan + '( + ("." "share/fonts/ubuntu/" #:include-regexp ("\\.ttf$"))))) + (home-page "http://font.ubuntu.com") + (synopsis "Ubuntu Font Family") + (description "Ubuntu Font Family") + (license #f))) diff --git a/home/home-configuration.scm b/home/home-configuration.scm new file mode 100644 index 0000000..5239c38 --- /dev/null +++ b/home/home-configuration.scm @@ -0,0 +1,88 @@ +;; 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 packages gnupg) + (gnu services) + (guix gexp) + (gnu home services fontutils) + (gnu home services desktop) + (gnu home services shells) + (gnu home services gnupg) + (gnu home services sound) + (home fonts)) + +(home-environment + ;; Below is the list of packages that will show up in your + ;; Home profile, under ~/.guix-home/profile. + (packages + (append + (list + font-ubuntu) + (specifications->packages + (list + ;; HW interactions + "blueman" "pavucontrol" + "network-manager-applet" + + ;; Terminals + "foot" + + ;; Shell utilities + "ripgrep-all" "ripgrep" + "fd" "fzf" + + ;; Fonts + "font-hack" "font-dejavu" + "font-ubuntu" + + ;; Browsing + "librewolf" + + ;; Development + "git" + + ;; Passwords + "gnupg" "password-store" "pass-otp" + + ;; Editing + "emacs" "emacs-vterm" + "neovim")))) + + ;; Below is the list of Home services. To search for available + ;; services, run 'guix home search KEYWORD' in a terminal. + (services + (list (service home-bash-service-type + (home-bash-configuration + (guix-defaults? #t) + (aliases '(("grep" . "grep --color=auto") + ("ip" . "ip -color=auto") + ("ll" . "ls -l") + ("ls" . "ls -p --color=auto"))) + (bashrc (list (local-file ".bashrc" "bashrc"))) + (bash-profile (list (local-file ".bash_profile" + "bash_profile"))))) + + (simple-service 'default-fonts + home-fontconfig-service-type + (list + '(alias + (family "monospace") + (prefer (family "Ubuntu Mono"))) + '(alias + (family "sansSerif") + (prefer (family "Ubuntu"))) + '(alias + (family "serif") + (prefer (family "Ubuntu"))))) + + (service home-gpg-agent-service-type + (home-gpg-agent-configuration + (pinentry-program + (file-append pinentry-gtk2 "/bin/pinentry-gtk")))) + (service home-pipewire-service-type) + (service home-dbus-service-type)))) -- 2.48.1