commit 8ee7c8f53d39e0c8e3c2f8204e1c9bd8bc2fbcfb
parent 44d8de729a76d805e9e3eebd5c16959e30f210eb
Author: vin <git@vineetk.net>
Date: Wed, 23 Jul 2025 00:21:27 -0400
start using guix again for realsies this time
Diffstat:
7 files changed, 199 insertions(+), 111 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1 +1,3 @@
-current
+*~
+.*.swp
+#*
diff --git a/channels.scm b/channels.scm
@@ -1,16 +0,0 @@
-(list (channel
- (name 'guix)
- (url "https://git.savannah.gnu.org/git/guix.git")
- (introduction
- (make-channel-introduction
- "9edb3f66fd807b096b48283debdcddccfea34bad"
- (openpgp-fingerprint
- "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
- (channel
- (name 'nonguix)
- (url "https://gitlab.com/nonguix/nonguix")
- (introduction
- (make-channel-introduction
- "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
- (openpgp-fingerprint
- "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
diff --git a/epistemia/channels.scm b/epistemia/channels.scm
@@ -0,0 +1,15 @@
+(list
+ (channel
+ (name (quote nonguix))
+ (url "https://gitlab.com/nonguix/nonguix")
+ (branch "master")
+ (introduction
+ (make-channel-introduction "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
+ (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
+ (channel
+ (name (quote guix))
+ (url "https://codeberg.org/guix/guix")
+ (branch "master")
+ (introduction
+ (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad"
+ (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
diff --git a/epistemia/home/home-configuration.scm b/epistemia/home/home-configuration.scm
@@ -0,0 +1,43 @@
+;; This "home-environment" file can be passed to 'guix home reconfigure'
+;; to reproduce the content of your profile. This is "symbolic": it only
+;; specifies package names. To reproduce the exact same profile, you also
+;; need to capture the channels being used, as returned by "guix describe".
+;; See the "Replicating Guix" section in the manual.
+
+(use-modules (gnu home)
+ (gnu packages)
+ (gnu services)
+ (guix gexp)
+ (gnu home services shells))
+
+(home-environment
+ ;; Below is the list of packages that will show up in your
+ ;; Home profile, under ~/.guix-home/profile.
+ (packages (specifications->packages (list "curl"
+ "htop"
+ "git"
+ "rsync"
+
+ "xorg-server"
+ "xf86-input-evdev"
+ "xf86-video-amdgpu"
+
+ "xwallpaper"
+ "picom"
+
+ "ungoogled-chromium")))
+
+ ;; Below is the list of Home services. To search for available
+ ;; services, run 'guix home search KEYWORD' in a terminal.
+ (services
+ (append (list (service home-bash-service-type
+ (home-bash-configuration
+ (aliases '(("ls" . "ls -F --color=auto")
+ ("ll" . "ls -l")))
+ (bashrc (list (local-file
+ "/home/vin/src/public/guix/.bashrc"
+ "bashrc")))
+ (bash-profile (list (local-file
+ "/home/vin/src/public/guix/.bash_profile"
+ "bash_profile"))))))
+ %base-home-services)))
diff --git a/epistemia/packages/suckless.scm b/epistemia/packages/suckless.scm
@@ -0,0 +1,10 @@
+(define-module (vin-dwm))
+(use-modules (gnu packages suckless) (gnu packages xorg) (guix gexp) (guix packages))
+
+(define-public vin-dwm
+ (package
+ (inherit dwm)
+ (name "vin-dwm")
+ (source (local-file "dwm" #:recursive? #t))))
+
+vin-dwm
diff --git a/epistemia/systems/config.scm b/epistemia/systems/config.scm
@@ -0,0 +1,128 @@
+;; -*- mode: scheme; -*-
+(use-modules (gnu) (gnu services) (guix packages) (guix gexp) (nongnu packages linux) (nongnu system linux-initrd))
+(use-service-modules desktop linux networking shepherd ssh)
+(use-package-modules admin bootloaders emacs emacs-xyz file file-systems rsync shells suckless version-control wm xorg)
+
+(define my-zfs
+ (package
+ (inherit zfs)
+ (arguments
+ (cons* #:linux linux-6.15
+ (package-arguments zfs)))))
+
+(define zfs-shepherd-services
+ (let ((zpool (file-append my-zfs "/sbin/zpool"))
+ (zfs (file-append my-zfs "/sbin/zfs"))
+ (scheme-modules `((srfi srfi-1)
+ (srfi srfi-34)
+ (srfi srfi-35)
+ (rnrs io ports)
+ ,@%default-modules)))
+ (define zfs-scan
+ (shepherd-service
+ (provision '(zfs-scan))
+ (documentation "Scans for ZFS pools.")
+ (requirement '(kernel-module-loader udev))
+ (modules scheme-modules)
+ (start #~(lambda _
+ (invoke/quiet #$zpool "import" "-a" "-N" "-d" "/dev/disk/by-id")))
+ (stop #~(const #f))))
+ (define zfs-automount
+ (shepherd-service
+ (provision '(zfs-automount))
+ (documentation "Automounts ZFS data sets.")
+ (requirement '(zfs-scan))
+ (modules scheme-modules)
+ (start #~(lambda _
+ (with-output-to-port
+ (current-error-port)
+ (lambda ()
+ (invoke #$zfs "mount" "-a" "-l")))))
+ (stop #~(lambda _
+ (chdir "/")
+ (invoke/quiet #$zfs "unmount" "-a" "-f")
+ #f))))
+ (list zfs-scan zfs-automount)))
+
+(operating-system
+ (host-name "demiurge.epistemia")
+ (timezone "Canada/Eastern")
+ (locale "en_US.utf8")
+
+ ;; Use the UEFI variant of GRUB with the EFI System
+ ;; Partition mounted on /boot/efi.
+ (bootloader (bootloader-configuration
+ (bootloader grub-efi-bootloader)
+ (targets '("/boot/efi"))))
+
+ (kernel linux)
+ (kernel-arguments (list "net.ifnames=0"))
+ (kernel-loadable-modules (list (list my-zfs "module")))
+
+ (initrd microcode-initrd)
+ (firmware (cons* amdgpu-firmware %base-firmware))
+
+ ;; Assume the target root file system is labelled "my-root",
+ ;; and the EFI System Partition has UUID 1234-ABCD.
+ (file-systems (append
+ (list (file-system
+ (device (uuid "e2a1956c-51d1-4263-b8be-1961b6d24a46" 'f2fs))
+ (mount-point "/")
+ (type "f2fs"))
+ (file-system
+ (device (uuid "EC1D-4A47" 'fat))
+ (mount-point "/boot/efi")
+ (type "vfat")))
+ %base-file-systems))
+
+ (users (cons (user-account
+ (name "vin")
+ (comment "Vineet")
+ (shell (file-append loksh "/bin/ksh"))
+ (group "users")
+ (supplementary-groups '("wheel" "audio" "video" "input" "seat" "tty")))
+ %base-user-accounts))
+
+ ;; Add a bunch of window managers; we can choose one at
+ ;; the log-in screen with F1.
+ (packages (append (list
+ ;; window managers
+ emacs emacs-exwm
+ ;; xorg
+ seatd
+ xorg-server
+ xf86-input-evdev
+ xf86-video-amdgpu
+ dwm st dmenu
+ ;; basic shell utils
+ loksh
+ rsync
+ file
+ git
+ ;; filesystems
+ my-zfs)
+ %base-packages))
+
+ (services (append (list (simple-service 'my-zfs-loader
+ kernel-module-loader-service-type
+ '("zfs"))
+ (simple-service 'zfs-shepherd-services
+ shepherd-root-service-type
+ zfs-shepherd-services)
+;; (simple-service 'zfs-shepherd-services-user-processes
+;; user-processes-service-type
+;; '(zfs-automount))
+ (service seatd-service-type)
+ (service static-networking-service-type
+ (list (static-networking
+ (addresses
+ (list (network-address
+ (device "eth0")
+ (value "192.168.1.2/24"))))
+ (routes
+ (list (network-route
+ (destination "default")
+ (gateway "192.168.1.1"))))
+ (name-servers '("192.168.1.1")))))
+ (service openssh-service-type))
+ %base-services)))
diff --git a/system.scm b/system.scm
@@ -1,94 +0,0 @@
-;; This is an operating system configuration generated
-;; by the graphical installer.
-;;
-;; Once installation is complete, you can learn and modify
-;; this file to tweak the system configuration, and pass it
-;; to the 'guix system reconfigure' command to effect your
-;; changes.
-
-
-;; Indicate which modules to import to access the variables
-;; used in this configuration.
-(use-modules (gnu) (gnu packages admin) (gnu system setuid) (gnu packages shells) (nongnu packages linux))
-(use-service-modules cups desktop linux networking pm ssh xorg)
-
-(operating-system
- (kernel linux)
- (firmware (list linux-firmware))
- (locale "en_US.utf8")
- (timezone "America/Toronto")
- (keyboard-layout (keyboard-layout "us" "workman"))
- (host-name "lappy")
-
- ;; The list of user accounts ('root' is implicit).
- (users (cons* (user-account
- (name "vin")
- (comment "Vineet")
- (group "users")
- (home-directory "/home/vin")
- (supplementary-groups '("wheel" "netdev" "audio" "video" "input" "tty"))
- (shell (file-append zsh "/bin/zsh")))
- %base-user-accounts))
-
- ;; Packages installed system-wide. Users can also install packages
- ;; under their own account: use 'guix search KEYWORD' to search
- ;; for packages and 'guix install PACKAGE' to install a package.
- (packages (append (map specification->package '("opendoas" "rsync" "tlp"))
- %base-packages))
-
- ;; Below is the list of system services. To search for available
- ;; services, run 'guix system search KEYWORD' in a terminal.
- (services
- (append (list
- (service kernel-module-loader-service-type '("msr"))
-
- ;; To configure OpenSSH, pass an 'openssh-configuration'
- ;; record as a second argument to 'service' below.
- (service openssh-service-type)
- (service elogind-service-type)
- ;(service tor-service-type)
- ;(service dhcp-client-service-type)
- (service wpa-supplicant-service-type)
- (service network-manager-service-type)
- (service tlp-service-type)
- ; (service slim-service-type (slim-configuration
- ; (display ":0")
- ; (vt "vt7")
- ; (xorg-configuration
- ; (xorg-configuration
- ; (keyboard-layout keyboard-layout)))))
- (service ntp-service-type))
- ;(service cups-service-type))
-
- ;; This is the default list of services we
- ;; are appending to.
- %base-services))
- (bootloader (bootloader-configuration
- (bootloader grub-efi-bootloader)
- (targets (list "/boot/efi"))
- (keyboard-layout keyboard-layout)))
- (mapped-devices (list (mapped-device
- (source (uuid
- "11e5f6fe-38ff-4874-9030-fdd535269f62"))
- (target "cryptroot")
- (type luks-device-mapping))))
-
- ;; setuid programs
- (setuid-programs
- (append (list (setuid-program
- (program (file-append opendoas "/bin/doas"))))
- %setuid-programs))
-
- ;; The list of file systems that get "mounted". The unique
- ;; file system identifiers there ("UUIDs") can be obtained
- ;; by running 'blkid' in a terminal.
- (file-systems (cons* (file-system
- (mount-point "/")
- (device "/dev/mapper/cryptroot")
- (type "btrfs")
- (dependencies mapped-devices))
- (file-system
- (mount-point "/boot/efi")
- (device (uuid "73C9-F112"
- 'fat32))
- (type "vfat")) %base-file-systems)))