Skip to content

Commit

Permalink
feat: channels & substitute-url
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Sep 19, 2023
1 parent 90135a2 commit 153e3e8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
16 changes: 16 additions & 0 deletions channels.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(cons*
;; packages some non-free software which cannot be included in the official distribution
(channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
;; default guix channel(Mirror in China)
(channel
(inherit (car %default-channels))
(url "https://mirror.guix.org.cn/git/guix.git")))

34 changes: 25 additions & 9 deletions config.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
;; used in this configuration.
(use-modules (gnu))
(use-service-modules cups desktop networking ssh xorg)
;; Import nonfree linux module.
(use-modules (nongnu packages linux)
(nongnu system linux-initrd))

(operating-system
(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))

;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
(name "ryan")
Expand All @@ -40,17 +48,25 @@
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list
(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))))

;; 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))))
;; 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 '("https://mirror.sjtu.edu.cn/guix/" "https://ci.guix.gnu.org")))))

;; This is the default list of services we
;; are appending to.
%desktop-services))
;; This is the default list of services we
;; are appending to.
%desktop-services))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets (list "/dev/sda"))
Expand Down

0 comments on commit 153e3e8

Please sign in to comment.