system-libre:
sudo GUIX_PACKAGE_PATH=`pwd` PROFILE=libre guix system reconfigure system.scm
+vps-home:
+ GUIX_PACKAGE_PATH=`pwd` guix home reconfigure vps-home.scm
+ . $(guix-profile)/etc/profile
+
+vps-system:
+ sudo GUIX_PACKAGE_PATH=`pwd` guix system reconfigure vps-system.scm
+
+
# Build-only targets — validate configuration without activating.
# These build derivations and cache them in the store so a
# subsequent reconfigure is near-instant. The build queue runs
GUIX_PACKAGE_PATH=`pwd` PROFILE=libre \
guix system build system.scm
+build-vps-system:
+ GUIX_PACKAGE_PATH=`pwd` guix system build vps-system.scm
+
+build-vps-home:
+ GUIX_PACKAGE_PATH=`pwd` guix home build vps-home.scm
+
+build-vps: build-vps-system build-vps-home
+
tags:
find $(guix-store) -wholename "*guix-$(guix-version)*.scm" -or \
-wholename "*guix-module-union*.scm" -or \
--- /dev/null
+;;; Copyright (c) 2026 Jakub Czajka <jakub@ekhem.eu.org>
+;;; License: GPL-3.0 or later.
+;;;
+;;; VPS home directory configuration.
+
+(use-modules (gnu home)
+ (gnu home services)
+ (gnu services)
+ (gnu system shadow))
+
+(home-environment
+ (services
+ (append (list
+ ;; Uncomment the shell you wish to use for your user:
+ ;; (service home-bash-service-type)
+ ;; (service home-fish-service-type)
+ ;; (service home-zsh-service-type)
+
+ (service home-files-service-type
+ `((".guile" ,%default-dotguile)
+ (".Xdefaults" ,%default-xdefaults)))
+
+ (service home-xdg-configuration-files-service-type
+ `(("gdb/gdbinit" ,%default-gdbinit)
+ ("nano/nanorc" ,%default-nanorc))))
+
+ %base-home-services)))
--- /dev/null
+;;; Copyright (c) 2026 Jakub Czajka <jakub@ekhem.eu.org>
+;;; License: GPL-3.0 or later.
+;;;
+;;; Guix System operating-system definition for an OVH VPS.
+;;;
+;;; Usage:
+;;; guix system image --image-type=mbr-raw vps-system.scm
+
+(use-modules (gnu)
+ (nongnu packages linux))
+
+(use-service-modules networking ssh)
+(use-package-modules ssh)
+
+(define %vps-openssh-config
+ (openssh-configuration (openssh openssh-sans-x)
+ (port-number 22)
+ (password-authentication? #f)
+ (permit-root-login 'prohibit-password)))
+
+(operating-system
+ (host-name "vps")
+ (kernel linux)
+ (timezone "Etc/UTC")
+ (locale "en_US.utf8")
+
+ ;; ── OVH-specific (permanent -- the hardware requires these) ──
+
+ (bootloader (bootloader-configuration
+ (bootloader grub-bootloader)
+ (targets '("/dev/sda"))))
+
+ (kernel-arguments (list "console=ttyS0 console=tty0"))
+
+ ;; ── Filesystems ──
+
+ (file-systems (cons (file-system
+ (device (uuid "38af4c98-d0f5-96b6-2fa6-251038af4c98"))
+ (mount-point "/")
+ (type "ext4")) %base-file-systems))
+
+ ;; ── Users ──
+
+ (users (cons (user-account
+ (name "dak")
+ (group "users")
+ (supplementary-groups '("wheel"))
+ (home-directory "/home/dak")) %base-user-accounts))
+
+ ;; ── Services ──
+
+ (services
+ (append (list
+ ;; DHCP -- OVH delivers the static IP via DHCP
+ (service dhcpcd-service-type)
+
+ ;; SSH -- key-only authentication
+ (service openssh-service-type %vps-openssh-config)
+
+ ;; NTP -- correct time is required for Guix substitutes
+ (service ntp-service-type))
+
+ %base-services))
+
+ ;; ── Sudoers: dak can reconfigure without a password ──
+
+ (sudoers-file (plain-file "sudoers"
+ (string-append (plain-file-content
+ %sudoers-specification)
+ "dak ALL = NOPASSWD: ALL\n"))))