aboutsummaryrefslogtreecommitdiffstats
path: root/configuration.scm
diff options
context:
space:
mode:
authorbrian cully <bjc@spork.org>2026-03-10 11:25:19 -0400
committerbrian cully <bjc@spork.org>2026-03-10 12:07:27 -0400
commit55ff45523e7a8309bba9d14bc08e3f5af6528669 (patch)
treea6ce9f58e3040f48f8396a07cc26d2281c5187ac /configuration.scm
downloadguix-impermanence-init-55ff45523e7a8309bba9d14bc08e3f5af6528669.tar.gz
guix-impermanence-init-55ff45523e7a8309bba9d14bc08e3f5af6528669.zip
guix system config for tmpfs-mounted /
Diffstat (limited to 'configuration.scm')
-rw-r--r--configuration.scm144
1 files changed, 144 insertions, 0 deletions
diff --git a/configuration.scm b/configuration.scm
new file mode 100644
index 0000000..10c2023
--- /dev/null
+++ b/configuration.scm
@@ -0,0 +1,144 @@
+(use-modules (gnu))
+(use-service-modules virtualization cups desktop networking ssh xorg)
+
+(define rootfs
+ (file-system
+ (mount-point "/")
+ (needed-for-boot? #t)
+ (device "tmpfs")
+ (type "tmpfs")
+ (check? #f)))
+
+(define gnufs
+ (file-system
+ (mount-point "/gnu")
+ (needed-for-boot? #t)
+ (create-mount-point? #t)
+ (type "btrfs")
+ (device (file-system-label "root"))
+ (options "subvol=/gnu,compress=zstd,discard=async")))
+
+(define persistfs
+ (file-system
+ (mount-point "/persist")
+ (needed-for-boot? #t)
+ (create-mount-point? #t)
+ (type "btrfs")
+ (device (file-system-label "root"))
+ (options "subvol=/persist,compress=zstd,discard=async")))
+
+(define etcfs
+ (file-system
+ (mount-point "/etc")
+ (needed-for-boot? #t)
+ (create-mount-point? #t)
+ (type "btrfs")
+ (device (file-system-label "root"))
+ (options "subvol=/persist/etc,compress=zstd,discard=async")))
+
+(define varfs
+ (file-system
+ (mount-point "/var")
+ (needed-for-boot? #t)
+ (create-mount-point? #t)
+ (type "btrfs")
+ (device (file-system-label "root"))
+ (options "subvol=/persist/var,compress=zstd,discard=async")))
+
+(define bootfs
+ (file-system
+ (mount-point "/boot")
+ (create-mount-point? #t)
+ (type "btrfs")
+ (device (file-system-label "root"))
+ (options "subvol=/persist/boot,compress=zstd,discard=async")))
+
+(define homefs
+ (file-system
+ (mount-point "/home")
+ (create-mount-point? #t)
+ (type "btrfs")
+ (device (file-system-label "root"))
+ (options "subvol=/persist/home,compress=zstd,discard=async")))
+
+(define my-file-systems
+ (list
+
+ rootfs
+ gnufs
+ persistfs
+
+ etcfs
+ varfs
+
+ bootfs
+ homefs
+
+ (file-system
+ (mount-point "/boot/efi")
+ (create-mount-point? #t)
+ (dependencies (list bootfs))
+ (device (file-system-label "ESP"))
+ (type "vfat"))
+
+ (file-system
+ (mount-point "/root")
+ (create-mount-point? #t)
+ (dependencies (list homefs))
+ (type "none")
+ (device "/home/root")
+ (flags '(bind-mount)))
+
+ (file-system
+ (mount-point "/tmp")
+ (create-mount-point? "1777")
+ (device "tmpfs")
+ (type "tmpfs")
+ (flags '(no-suid no-dev))
+ (check? #f))
+
+ (file-system
+ (mount-point "/var/guix/temproots")
+ (create-mount-point? #t)
+ (device "tmpfs")
+ (type "tmpfs")
+ (flags '(no-suid no-dev))
+ (check? #f))))
+
+(operating-system
+ (locale "en_US.utf8")
+ (timezone "America/New_York")
+ (keyboard-layout (keyboard-layout "us" "altgr-intl"))
+ (host-name "guixinit")
+
+ (users
+ (cons*
+ (user-account
+ (name "bjc")
+ (comment "bjc")
+ (group "users")
+ (home-directory "/home/bjc")
+ (supplementary-groups '("wheel" "netdev" "audio" "video")))
+ %base-user-accounts))
+
+ (services
+ (append
+ (list
+ (service openssh-service-type)
+ (service gnome-desktop-service-type)
+ (set-xorg-configuration
+ (xorg-configuration (keyboard-layout keyboard-layout))))
+ %desktop-services))
+
+ (bootloader
+ (bootloader-configuration
+ (bootloader grub-efi-bootloader)
+ (targets (list "/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+
+ (swap-devices '())
+
+ (file-systems
+ (append
+ my-file-systems
+ %base-file-systems)))