diff options
| author | cashmere <cashmere@autistici.org> | 2026-06-24 12:55:07 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-06-24 12:55:07 +0200 |
| commit | b5d1b8b9d27d4106946e94d3068c3d96196ca0b4 (patch) | |
| tree | b17c8afa6773cd5de925d9d945ee67ed8912dec7 | |
| download | guix-master.tar.gz | |
| -rw-r--r-- | config.scm | 92 | ||||
| -rw-r--r-- | guix-home-config.scm | 33 |
2 files changed, 125 insertions, 0 deletions
diff --git a/config.scm b/config.scm new file mode 100644 index 0000000..efda31c --- /dev/null +++ b/config.scm @@ -0,0 +1,92 @@ +;; -*- mode: scheme; -*- +;; This is an operating system configuration template +;; for a "desktop" setup without full-blown desktop +;; environments. + +(use-modules (gnu) (gnu system nss) + (gnu services) + (gnu services guix) + (gnu system shadow)) +(use-service-modules ssh desktop xorg networking) +(use-package-modules bootloaders wm text-editors fonts python-xyz terminals version-control + xorg + xdisorg + vim + emacs emacs-xyz + gnuzilla) + +;; Pull in the home-environment definition from the sibling file. We extend +;; Guile's load path so use-modules can resolve (guix-home-config) as a real +;; module that exports the `home-config' binding. +(eval-when (load eval expand) + (set! %load-path (cons "/home/cashmere/guix" %load-path))) +(use-modules (guix-home-config)) + +(operating-system + (host-name "antelope") + (timezone "Europe/Berlin") + (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")))) + + ;; 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 "/dev/vda3") + (mount-point "/") + (type "ext4")) + (file-system + (device "/dev/vda1") + (mount-point "/boot/efi") + (type "vfat"))) + %base-file-systems)) + + (users (cons (user-account + (name "cashmere") + (comment "Bob's sister") + (group "users") + (supplementary-groups '("wheel" "netdev" + "audio" "video"))) + %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 + qtile rofi + xorg-server xinit xwallpaper xset + vim + emacs emacs-exwm emacs-desktop-environment + ;; terminal emulator + xterm kitty font-jetbrains-mono + git) + %base-packages)) + + ;; Use the "desktop" services, which include the X11 + ;; log-in service, networking with NetworkManager, and more. + (services + (append (list (service guix-home-service-type + `(("cashmere" ,home-config))) + (service xorg-server-service-type) + (service openssh-service-type) + (service dhcpcd-service-type) + (service slim-service-type + (slim-configuration (display ":0")))) + (modify-services %base-services + (guix-service-type config => + (guix-configuration + (inherit config) + (substitute-urls + (list + ;; Only fast, independent mirrors. bordeaux is excluded + ;; because it throttles EU users to ~300 KiB/s. + "https://ci.guix.gnu.org" + "https://bordeaux-us-east-mirror.cbaines.net" + "https://bordeaux-singapore-mirror.cbaines.net" + "https://hydra-guix-129.guix.gnu.org"))))))) + (name-service-switch %mdns-host-lookup-nss)) diff --git a/guix-home-config.scm b/guix-home-config.scm new file mode 100644 index 0000000..be9a235 --- /dev/null +++ b/guix-home-config.scm @@ -0,0 +1,33 @@ +;; Home environment definition for cashmere@antelope. +;; Loaded by ~/guix/config.scm via (use-modules (guix-home-config)). +;; The exported binding `home-config' is wrapped by guix-home-service-type +;; in config.scm, so a single `guix system reconfigure' deploys both system +;; and home. + +(define-module (guix-home-config) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services shells) + #:use-module (gnu services) + #:use-module (gnu system shadow) + #:export (home-config)) + +(define home-config + (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)))) |
