Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Jan 11, 2024
1 parent c92f317 commit e62c198
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 79 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

My dotfiles for GNU Guix


## Tutorials

Tutorials for Guile Scheme Language:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -124,4 +119,3 @@ Other dotfiles that inspired me:
- <https://github.com/Tass0sm/dotfiles>
- <https://github.com/yveszoundi/guix-config>
- <https://github.com/hiecaq/guix-config>
144 changes: 72 additions & 72 deletions config.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

0 comments on commit e62c198

Please sign in to comment.