From 867e4bef89692def9e84e332fd1789ee333b5399 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 6 May 2024 18:33:04 +0100 Subject: [PATCH] Add initial channels, system and home configs Add "current" symlink to gitignore --- .bash_profile | 15 ++++++++ .bashrc | 31 +++++++++++++++ .gitignore | 1 + channels.scm | 23 +++++++++++ home-configuration.scm | 28 ++++++++++++++ system-configuration.scm | 82 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 180 insertions(+) create mode 100644 .bash_profile create mode 100644 .bashrc create mode 100644 channels.scm create mode 100644 home-configuration.scm create mode 100644 system-configuration.scm diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..9eb3ae0 --- /dev/null +++ b/.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/.bashrc b/.bashrc new file mode 100644 index 0000000..7eb63ff --- /dev/null +++ b/.bashrc @@ -0,0 +1,31 @@ +# 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 eza='eza '\''--icons'\'' '\''--git'\'' '\''--octal-permissions'\''' +alias gsa='git-sync-all' +alias la='eza -a' +alias ll='eza -l' +alias lla='eza -la' +alias ls='eza' +alias lt='eza --tree' + +alias grep='grep --color=auto' +alias ip='ip -color=auto' diff --git a/.gitignore b/.gitignore index c8cc5b7..8e29fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ flycheck_*.el *.scm#* .#*.scm +current diff --git a/channels.scm b/channels.scm new file mode 100644 index 0000000..db36fca --- /dev/null +++ b/channels.scm @@ -0,0 +1,23 @@ +(list (channel + (name 'guix) + (url "https://git.savannah.gnu.org/git/guix.git") + (branch "master") + (commit + "da9f509b0300f1b6b979c68a52d8669f9bcb89a7") + (introduction + (make-channel-introduction + "9edb3f66fd807b096b48283debdcddccfea34bad" + (openpgp-fingerprint + "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) + (channel + (name 'nonguix) + (url "https://gitlab.com/nonguix/nonguix") + (branch "master") + (commit + "7081518be7d2dbb58f3fbfeb1785254a6f0059c8") + (introduction + (make-channel-introduction + "897c1a470da759236cc11798f4e0a5f7d4d59fbc" + (openpgp-fingerprint + "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) + ) diff --git a/home-configuration.scm b/home-configuration.scm new file mode 100644 index 0000000..4f749f7 --- /dev/null +++ b/home-configuration.scm @@ -0,0 +1,28 @@ +;; 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 gexp) + (gnu home services shells)) + +(home-environment + ;; Below is the list of packages that will show up in your + ;; Home profile, under ~/.guix-home/profile. + (packages (specifications->packages (list "make" "emacs" "git"))) + + ;; 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 + (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")))))))) diff --git a/system-configuration.scm b/system-configuration.scm new file mode 100644 index 0000000..97b996c --- /dev/null +++ b/system-configuration.scm @@ -0,0 +1,82 @@ +;; This is an operating system configuration generated +;; by the graphical installer. +;; +;; Once installation is complete, you can learn and modify +;; this file to tweak the system configuration, and pass it +;; to the 'guix system reconfigure' command to effect your +;; changes. + + +;; Indicate which modules to import to access the variables +;; used in this configuration. +(use-modules (gnu) + (nongnu packages linux)) +(use-service-modules cups desktop networking ssh xorg) + +(operating-system + (kernel linux) + (firmware (list linux-firmware)) + (locale "en_GB.utf8") + (timezone "Europe/London") + (keyboard-layout (keyboard-layout "gb")) + (host-name "Northstar") + + ;; The list of user accounts ('root' is implicit). + (users (cons* (user-account + (name "pixelifytica") + (comment "Evie Litherland-Smith") + (group "users") + (home-directory "/home/pixelifytica") + (supplementary-groups '("wheel" "netdev" "audio" "video"))) + %base-user-accounts)) + + ;; Packages installed system-wide. Users can also install packages + ;; under their own account: use 'guix search KEYWORD' to search + ;; for packages and 'guix install PACKAGE' to install a package. + (packages (append (list (specification->package "sway") + (specification->package "swaylock-effects") + (specification->package "swaynotificationcenter") + (specification->package "waybar") + (specification->package "rofi") + (specification->package "alacritty") + (specification->package "zsh") + ;; (specification->package "nss-certs") + ) + %base-packages)) + + ;; Below is the list of system services. To search for available + ;; services, run 'guix system search KEYWORD' in a terminal. + (services + (modify-services %desktop-services + (guix-service-type config => + (guix-configuration + (inherit config) + (substitute-urls + (append (list "https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (append (list (local-file "/etc/signing-key.pub") + %default-authorized-guix-keys))))))) + (bootloader (bootloader-configuration + (bootloader grub-efi-bootloader) + (targets (list "/boot/efi")) + (keyboard-layout keyboard-layout))) + (mapped-devices (list (mapped-device + (source (uuid + "da927001-dae7-4d96-ad02-d8b3dc5657bd")) + (target "cryptroot") + (type luks-device-mapping)))) + + ;; The list of file systems that get "mounted". The unique + ;; file system identifiers there ("UUIDs") can be obtained + ;; by running 'blkid' in a terminal. + (file-systems (cons* (file-system + (mount-point "/boot/efi") + (device (uuid "9936-B235" + 'fat32)) + (type "vfat")) + (file-system + (mount-point "/") + (device "/dev/mapper/cryptroot") + (type "ext4") + (dependencies mapped-devices)) %base-file-systems)))