diff --git a/builders/guix/config.sh b/builders/guix/config.sh new file mode 100644 index 0000000..8d3e90a --- /dev/null +++ b/builders/guix/config.sh @@ -0,0 +1,2 @@ +DISTNAME=guix +RELVER=stable diff --git a/builders/guix/setup.sh b/builders/guix/setup.sh new file mode 100644 index 0000000..1dc3d1c --- /dev/null +++ b/builders/guix/setup.sh @@ -0,0 +1,43 @@ +cat < /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 diff --git a/images/guix/build.sh b/images/guix/build.sh new file mode 100644 index 0000000..e53ec48 --- /dev/null +++ b/images/guix/build.sh @@ -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 diff --git a/images/guix/config.sh b/images/guix/config.sh new file mode 100644 index 0000000..6ea723b --- /dev/null +++ b/images/guix/config.sh @@ -0,0 +1,2 @@ +BUILDER=guix +RELVER=unstable-$(date +%Y%m%d)