From e62c198a10226fc51c6fc605ca46502b664d871d Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 5 Jan 2024 20:26:57 +0800 Subject: [PATCH] chore: formatting --- README.md | 8 +-- config.scm | 144 ++++++++++++++++++++++++++--------------------------- 2 files changed, 73 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index d764ae2..2f88687 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ My dotfiles for GNU Guix - ## Tutorials Tutorials for Guile Scheme Language: @@ -31,11 +30,10 @@ Tutorials for Guix itself: 1. `'a`: a syntax sugar of `(quote a)`, a symbol `a` is not evaluated. 1. `#t` and `#f`: true and false 1. `'()` or `nil`: empty list -1. `(list arg1 arg2 …)` or `'(arg1 arg2 …)`: a linked list, +1. `(list arg1 arg2 …)` or `'(arg1 arg2 …)`: a linked list, 1. `cons* arg1 arg2 …`: similar to `(list arg1 arg2 …)`, but its last cons cell is a dotted list, which does not have `nil` for its cdr. 1. This function is called `list*` in some other Schemes and in Common LISP. - ```bash scheme@(guile-user)> (cons* 1 2 3 4 5) $4 = (1 2 3 4 . 5) @@ -112,9 +110,6 @@ To speed up the first reconfigure, see nonuix's official README for details. Same as above, you can add nonguix's substitutes to speed up the `guix system reconfigure` process. - - - ## References Other dotfiles that inspired me: @@ -124,4 +119,3 @@ Other dotfiles that inspired me: - - - - diff --git a/config.scm b/config.scm index 895e88b..b5a1bb6 100644 --- a/config.scm +++ b/config.scm @@ -17,91 +17,91 @@ (nongnu system linux-initrd)) (operating-system - (locale "en_US.utf8") - (timezone "Asia/Shanghai") - (keyboard-layout (keyboard-layout "us")) - (host-name "guix-test") + (locale "en_US.utf8") + (timezone "Asia/Shanghai") + (keyboard-layout (keyboard-layout "us")) + (host-name "guix-test") - ;; Using the standard Linux kernel and nonfree firmware - (kernel linux) - (initrd microcode-initrd) - (firmware (list linux-firmware)) + ;; Using the standard Linux kernel and nonfree firmware + (kernel linux) + (initrd microcode-initrd) + (firmware (list linux-firmware)) - ;; The list of user accounts ('root' is implicit). - (users (cons* (user-account - (name "ryan") - (comment "Ryan") - (group "users") - (home-directory "/home/ryan") - (supplementary-groups '("wheel" "netdev" "audio" "video"))) - %base-user-accounts)) + ;; The list of user accounts ('root' is implicit). + (users (cons* (user-account + (name "ryan") + (comment "Ryan") + (group "users") + (home-directory "/home/ryan") + (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. - ;; Add a bunch of window managers; we can choose one at - ;; the log-in screen with F1. - (packages (append (map specification->package '( - "tcpdump" - ;; window managers - "ratpoison" "i3-wm" "i3status" "dmenu" - "emacs" "emacs-exwm" "emacs-desktop-environment" - "make" "neovim" "git" "kitty" "ncurses-with-tinfo" - ;; terminal emulator - "xterm" - ;; for HTTPS access - "nss-certs")) - %base-packages)) + ;; 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. + ;; Add a bunch of window managers; we can choose one at + ;; the log-in screen with F1. + (packages (append (map specification->package '( + "tcpdump" + ;; window managers + "ratpoison" "i3-wm" "i3status" "dmenu" + "emacs" "emacs-exwm" "emacs-desktop-environment" + "make" "neovim" "git" "kitty" "ncurses-with-tinfo" + ;; terminal emulator + "xterm" + ;; for HTTPS access + "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 - (append - (list - ;; To configure OpenSSH, pass an 'openssh-configuration' - ;; record as a second argument to 'service' below. - (service openssh-service-type) + ;; Below is the list of system services. To search for available + ;; services, run 'guix system search KEYWORD' in a terminal. + (services + (append + (list + ;; To configure OpenSSH, pass an 'openssh-configuration' + ;; record as a second argument to 'service' below. + (service openssh-service-type) - (set-xorg-configuration - (xorg-configuration (keyboard-layout keyboard-layout)))) + (set-xorg-configuration + (xorg-configuration (keyboard-layout keyboard-layout)))) - ;; This is the default list of services we - ;; Using the substitute server of SJTU to speed up the download. - (modify-services %desktop-services - (guix-service-type - config => (guix-configuration - (inherit config) - (substitute-urls '( - ;; official substitute's mirror in China - "https://mirror.sjtu.edu.cn/guix/" - ;; nonguix's official substitute - "https://substitutes.nonguix.org" - ;; official substitute - "https://ci.guix.gnu.org") - (authorized-keys - (append (list (local-file "./signing-key.pub")) - %default-authorized-guix-keys))))))) + ;; This is the default list of services we + ;; Using the substitute server of SJTU to speed up the download. + (modify-services %desktop-services + (guix-service-type + config => (guix-configuration + (inherit config) + (substitute-urls '( + ;; official substitute's mirror in China + "https://mirror.sjtu.edu.cn/guix/" + ;; nonguix's official substitute + "https://substitutes.nonguix.org" + ;; official substitute + "https://ci.guix.gnu.org") + (authorized-keys + (append (list (local-file "./signing-key.pub")) + %default-authorized-guix-keys))))))) (bootloader (bootloader-configuration - (bootloader grub-bootloader) - (targets (list "/dev/sda")) - (keyboard-layout keyboard-layout))) + (bootloader grub-bootloader) + (targets (list "/dev/sda")) + (keyboard-layout keyboard-layout))) (initrd-modules (append '("virtio_scsi") %base-initrd-modules)) (swap-devices (list (swap-space - (target (uuid - "c1345797-6772-4d43-81a4-e7a710fec820"))))) + (target (uuid + "c1345797-6772-4d43-81a4-e7a710fec820"))))) ;; 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 "3F67-100B" - 'fat16)) - (type "vfat")) + (mount-point "/boot/efi") + (device (uuid "3F67-100B" + 'fat16)) + (type "vfat")) (file-system - (mount-point "/") - (device (uuid - "7e92e417-62ef-49fe-878d-dabf7da3a68e" - 'ext4)) - (type "ext4")) %base-file-systems))) + (mount-point "/") + (device (uuid + "7e92e417-62ef-49fe-878d-dabf7da3a68e" + 'ext4)) + (type "ext4")) %base-file-systems))))