Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Add initial support fo guix #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions builders/guix/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DISTNAME=guix
RELVER=stable
43 changes: 43 additions & 0 deletions builders/guix/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cat <<EOF > /etc/config.scm
;; Module imports
(use-modules (gnu) (guix))
(use-service-modules networking ssh)
(use-package-modules bootloaders)

;; Operating system description
(define os
(operating-system
(locale "en_US.utf8")
(timezone "America/New_York")
(keyboard-layout (keyboard-layout "us" "altgr-intl"))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")
(keyboard-layout keyboard-layout)))
(file-systems (cons* (file-system
(mount-point "/")
(device "/dev/sda1")
(type "ext4"))
%base-file-systems))
(host-name "alyssas-home-server")
(users (cons* (user-account
(name "alyssa")
(comment "Alyssa")
(group "users")
(home-directory "/home/alyssa")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
(sudoers-file (plain-file "sudoers" "\
root ALL=(ALL) ALL
%wheel ALL=NOPASSWD: ALL\n"))
(services (append
(list (service openssh-service-type
(openssh-configuration
(permit-root-login #t)))
(service dhcp-client-service-type))
%base-services))))
EOF

# Configure the system
guix system reconfigure /etc/config.scm
17 changes: 17 additions & 0 deletions images/guix/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cd /tmp
wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh

wget 'https://sv.gnu.org/people/viewgpg.php?user_id=127547' \
-qO - | gpg --import -

wget https://ftp.gnu.org/gnu/guix/guix-binary-1.3.0.x86_64-linux.tar.xz.sig
$ gpg --verify guix-binary-1.3.0.x86_64-linux.tar.xz.sig

chmod +x guix-install.sh
./guix-install.sh

mkdir -p ~root/.config/guix
ln -sf /var/guix/profiles/per-user/root/current-guix ~root/.config/guix/current

GUIX_PROFILE="`echo ~root`/.config/guix/current" ; \
source $GUIX_PROFILE/etc/profile
2 changes: 2 additions & 0 deletions images/guix/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUILDER=guix
RELVER=unstable-$(date +%Y%m%d)