summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-06-02 08:07:57 +0300
committerThanos Apollo <[email protected]>2024-06-02 08:08:43 +0300
commit260a1c692b9c89b3c39854cb5d3a8c0dfc9afa77 (patch)
tree6f8c204e507eff9fc72956280797da913e6857e6 /guix
parentb60819b208b966eaebe156aee2e77217f8cdc056 (diff)
guix:(system) Use system-create
Diffstat (limited to 'guix')
-rw-r--r--guix/hermes.scm30
-rw-r--r--guix/system-base.scm148
-rw-r--r--guix/zeus.scm41
3 files changed, 37 insertions, 182 deletions
diff --git a/guix/hermes.scm b/guix/hermes.scm
index 0731cc2..e2f1a17 100644
--- a/guix/hermes.scm
+++ b/guix/hermes.scm
@@ -1,20 +1,22 @@
(define-module (hermes)
#:use-module (gnu)
- #:use-module (system-base))
+ #:use-module (system-create))
(use-package-modules file-systems)
-(system-base "hermes"
- (cons* (file-system
- (mount-point "/boot/efi")
- (device (uuid "1F4A-0DF0"
- 'fat32))
- (type "vfat"))
- (file-system
- (mount-point "/")
- (device (uuid
- "b4664996-7c96-4b8c-9fe7-26cda3021c9d"
- 'ext4))
- (type "ext4")) %base-file-systems)
- "1b620436-7874-40d3-b580-7d2358a9f28e")
+(system-create #:hostname "hermes"
+ #:filesystem (cons* (file-system
+ (mount-point "/boot/efi")
+ (device (uuid "1F4A-0DF0"
+ 'fat32))
+ (type "vfat"))
+ (file-system
+ (mount-point "/")
+ (device (uuid
+ "b4664996-7c96-4b8c-9fe7-26cda3021c9d"
+ 'ext4))
+ (type "ext4"))
+ %base-file-systems)
+ #:swap-uuid "1b620436-7874-40d3-b580-7d2358a9f28e")
+
diff --git a/guix/system-base.scm b/guix/system-base.scm
deleted file mode 100644
index 93a7cf4..0000000
--- a/guix/system-base.scm
+++ /dev/null
@@ -1,148 +0,0 @@
-
-(define-module (system-base)
- #:use-module (gnu)
- #:use-module (gnu services)
- #:use-module (gnu services dbus)
- #:use-module (gnu system)
- #:use-module (gnu system setuid)
- #:use-module (gnu system nss)
- #:use-module (nongnu packages linux)
- #:use-module (nongnu system linux-initrd)
- #:use-module (rosenthal services networking)
- #:export (system-base))
-
-(use-service-modules cups desktop networking ssh xorg docker guix
- admin pm docker)
-
-(use-package-modules nfs certs shells ssh linux bash emacs networking
- wm fonts libusb cups freedesktop file-systems version-control
- package-management)
-
-(define system-packages
- '("sway" "swaylock" "swaylock-effects" "swaybg"
- "waybar" "gnupg" "pinentry" "font-jetbrains-mono"
- "docker" "docker-cli"))
-
-(define (system-base hostname filesystem swap-uuid)
- (operating-system
- (locale "en_US.utf8")
- (timezone "Europe/Athens")
- (host-name hostname)
- (keyboard-layout (if (string= hostname "zeus")
- (keyboard-layout "us")
- (keyboard-layout "us" #:options '("ctrl:swapcaps"))))
-
- ;; TODO: Use the full linux kernel only on the desktop
- (kernel linux-lts)
- (initrd microcode-initrd)
- (firmware (list linux-firmware))
-
- ;; The list of user accounts ('root' is implicit).
- (users (cons* (user-account
- (name "thanos")
- (comment "Thanos Apollo")
- (group "users")
- (home-directory "/home/thanos")
- (supplementary-groups '("wheel" "netdev" "audio" "video" "docker")))
- %base-user-accounts))
-
- ;; Packages installed system-wide.
- (packages
- (append (map specification->package system-packages)
- %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 docker-service-type)
- ;; tty login
- (service elogind-service-type)
-
- (service console-font-service-type
- (map (lambda (tty)
- ;; Use a larger font for HIDPI screens
- (cons tty (file-append
- font-terminus
- "/share/consolefonts/ter-132n")))
- '("tty1" "tty2" "tty3")))
-
- (service greetd-service-type
- (greetd-configuration
- (greeter-supplementary-groups
- (list "video" "input"))
- (terminals
- (list
- (greetd-terminal-configuration
- (terminal-vt "1")
- (terminal-switch #t))
- (greetd-terminal-configuration
- (terminal-vt "2"))
- (greetd-terminal-configuration
- (terminal-vt "3"))
- (greetd-terminal-configuration
- (terminal-vt "4"))
- (greetd-terminal-configuration
- (terminal-vt "5"))))))
-
-
- (service gnome-desktop-service-type)
-
- (service openssh-service-type
- (openssh-configuration
- (permit-root-login 'prohibit-password)))
-
- ;; TODO: Fix swaylock
- (service screen-locker-service-type
- (screen-locker-configuration
- (name "swaylock")
- (program (file-append swaylock "/bin/swaylock"))
- (using-pam? #t)
- (using-setuid? #f)))
-
- ;; Networking services
- (service network-manager-service-type)
- (service wpa-supplicant-service-type) ;; Needed by NetworkManager
- (service modem-manager-service-type) ;; For cellular modems
-
- polkit-wheel-service
-
- (service tor-service-type)
- (service cups-service-type)
-
- ;; (service avahi-service-type)
- (service udisks-service-type)
- (service upower-service-type)
- (service cups-pk-helper-service-type)
- (service geoclue-service-type)
- ;; (service polkit-service-type)
- ;; (service dbus-root-service-type)
- fontconfig-file-system-service ;; Manage the fontconfig cache
-
- ;; Power and thermal management services
- (service thermald-service-type)
- (service tlp-service-type
- (tlp-configuration
- (cpu-boost-on-ac? #t)
- (wifi-pwr-on-bat? #t)))
- (service tailscale-service-type))
-
- (modify-services %base-services
- (delete login-service-type)
- (delete mingetty-service-type)
- (delete console-font-service-type))))
-
-
- (bootloader (bootloader-configuration
- (bootloader grub-efi-bootloader)
- (targets (list "/boot/efi"))
- (keyboard-layout keyboard-layout)))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (swap-devices (list (swap-space
- (target (uuid swap-uuid)))))
-
- ;; run 'lsblk -f' to get UUIDs.
- (file-systems filesystem)))
-
-
diff --git a/guix/zeus.scm b/guix/zeus.scm
index d436c54..4b248f6 100644
--- a/guix/zeus.scm
+++ b/guix/zeus.scm
@@ -1,26 +1,27 @@
(define-module (zeus)
#:use-module (gnu)
- #:use-module (system-base))
+ #:use-module (system-create))
(use-package-modules file-systems)
-(system-base "zeus"
- (cons* (file-system
- (mount-point "/hdd")
- (device (uuid "b0fddf60-47ff-469f-b135-8f6b58812c99"
- 'xfs))
- (type "xfs"))
- (file-system
- (mount-point "/boot/efi")
- (device (uuid "D0B4-4407"
- 'fat32))
- (type "vfat"))
- (file-system
- (mount-point "/")
- (device (uuid
- "ebc6d6e0-eecb-4ff6-8e1e-059a860dd30f"
- 'ext4))
- (type "ext4"))
- %base-file-systems)
- "49859dc4-84ea-425e-9b83-12d1ca1bf65e")
+(system-create #:hostname "zeus"
+ #:filesystem (cons* (file-system
+ (mount-point "/hdd")
+ (device (uuid "b0fddf60-47ff-469f-b135-8f6b58812c99"
+ 'xfs))
+ (type "xfs"))
+ (file-system
+ (mount-point "/boot/efi")
+ (device (uuid "D0B4-4407"
+ 'fat32))
+ (type "vfat"))
+ (file-system
+ (mount-point "/")
+ (device (uuid
+ "ebc6d6e0-eecb-4ff6-8e1e-059a860dd30f"
+ 'ext4))
+ (type "ext4"))
+ %base-file-systems)
+ #:swap-uuid "49859dc4-84ea-425e-9b83-12d1ca1bf65e"
+ #:swapcaps? #f)