summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--systems/ayase.scm178
1 files changed, 79 insertions, 99 deletions
diff --git a/systems/ayase.scm b/systems/ayase.scm
index cfc747b..58a3e2e 100644
--- a/systems/ayase.scm
+++ b/systems/ayase.scm
@@ -1,69 +1,22 @@
-(define-module (systems ayase)
- ;; uuid
- #:use-module (gnu)
-
- ;; grub
- #:use-module (gnu packages bootloaders)
-
- ;; gnome-boxes
- #:use-module (gnu packages gnome)
-
- ;; pinentry-qt
- ;; pinentry-tty
- #:use-module (gnu packages gnupg)
-
- ;; kgpg
- #:use-module (gnu packages kde-pim)
-
- ;; python-pip
- #:use-module (gnu packages python-build)
-
- ;; ruby
- #:use-module (gnu packages ruby)
-
- ;; profile-service-type
- ;; service
- ;; simple-service
- #:use-module (gnu services)
-
- ;; guix-home-service-type
- #:use-module (gnu services guix)
-
- ;; tor-service-type
- #:use-module (gnu services networking)
-
- ;; openssh-service-type
- #:use-module (gnu services ssh)
-
- ;; libvirt-service-type
- #:use-module (gnu services virtualization)
-
- ;; linux
- ;; linux-firmware
- #:use-module (nongnu packages linux)
-
- ;; microcode-initrd
- #:use-module (nongnu system linux-initrd)
-
- ;; %sudoers-specification*
- #:use-module (suweren commons sudoers)
-
- ;; %distribution-services
- #:use-module (suweren services))
+(define-module (systems ayase))
(define host-name
"ayase")
(define efi-filesystem-uuid
- (uuid "B4FB-CBD9" 'fat32))
+ ((@ (gnu system uuid) uuid)
+ "B4FB-CBD9"
+ 'fat32))
(define (label number)
- (file-system-label (string-append host-name
- "-swap"
- number)))
+ ((@ (gnu system file-systems) file-system-label)
+ (string-append host-name
+ "-swap"
+ number)))
(define root-filesystem-uuid
- (uuid "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c"))
+ ((@ (gnu system file-systems) uuid)
+ "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -74,7 +27,11 @@
(type "vfat")))
(define (gc-workaround-service)
- (use-modules (gnu packages ibus))
+ (use-modules (gnu packages bootloaders)
+ (gnu packages ibus)
+ (gnu packages python-build)
+ (gnu packages ruby)
+ (gnu services))
(simple-service 'gc-workaround
profile-service-type
(list grub
@@ -83,19 +40,26 @@
ruby)))
(define (home-services)
- (use-modules (users id1000))
+ (use-modules (gnu services guix)
+ (users id1000))
(let ((uid1000-home-environment* (uid1000-home-environment host-name)))
- (service guix-home-service-type
- `((,uid1000-name ,uid1000-home-environment*)))))
+ ((@ (gnu services) service)
+ guix-home-service-type
+ `((,uid1000-name ,uid1000-home-environment*)))))
(define keyboard-layout
- (keyboard-layout "pl"))
+ ((@ (gnu system keyboard) keyboard-layout)
+ "pl"))
-(define libvirt-service
- (service libvirt-service-type))
+(define (libvirt-service)
+ (use-modules (gnu services virtualization))
+ ((@ (gnu services) service)
+ libvirt-service-type))
-(define openssh-service
- (service openssh-service-type))
+(define (openssh-service)
+ (use-modules (gnu services ssh))
+ ((@ (gnu services) service)
+ openssh-service-type))
(define root-partition
((@ (gnu system file-systems) file-system)
@@ -105,9 +69,14 @@
(define (swap-label number)
(let ((target-label (label number)))
- (swap-space (target target-label))))
-
-(define system-packages-service
+ ((@ (gnu system file-systems) swap-space)
+ (target target-label))))
+
+(define (system-packages-service)
+ (use-modules (gnu packages gnome)
+ (gnu packages gnupg)
+ (gnu packages kde-pim)
+ (gnu services))
(simple-service 'system-packages
profile-service-type
(list gnome-boxes
@@ -115,15 +84,20 @@
pinentry-qt
pinentry-tty)))
-(define tor-service
- (service tor-service-type))
+(define (tor-service)
+ (use-modules (gnu services)
+ (gnu services networking))
+ ((@ (gnu services) service)
+ tor-service-type))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define bootloader
- (bootloader-configuration (bootloader grub-efi-bootloader)
- (targets (list "/boot/efi"))
- (keyboard-layout keyboard-layout)))
+(define (bootloader)
+ (use-modules (gnu bootloader grub))
+ ((@ (gnu bootloader) bootloader-configuration)
+ (bootloader grub-efi-bootloader)
+ (targets (list "/boot/efi"))
+ (keyboard-layout keyboard-layout)))
(define (file-systems)
(use-modules (gnu system file-systems))
@@ -142,13 +116,13 @@
(source "pl_PL")))
(define services
- (append %distribution-services
+ (append (@ (suweren services) %distribution-services)
(list (gc-workaround-service)
(home-services)
- libvirt-service
- openssh-service
- system-packages-service
- tor-service)))
+ (libvirt-service)
+ (openssh-service)
+ (system-packages-service)
+ (tor-service))))
(define swap-device-1
(swap-label "-1"))
@@ -157,27 +131,33 @@
(swap-label "-2"))
(define (users)
- (use-modules (users id1000))
+ (use-modules (gnu system shadow)
+ (users id1000))
(append %base-user-accounts
(list uid1000-account)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define-public operating-system*
- (operating-system (kernel linux)
- (bootloader bootloader)
- (keyboard-layout keyboard-layout)
- (initrd microcode-initrd)
- (firmware (list linux-firmware))
- (host-name host-name)
- (file-systems (file-systems))
- (swap-devices (list swap-device-1
- swap-device-2))
- (users (users))
- (timezone "Europe/Warsaw")
- (locale "pl_PL.utf8")
- (locale-definitions (locale-definitions))
- (services services)
- (sudoers-file %sudoers-specification*)))
-
-operating-system*
+(define-public (operating-system*)
+ (use-modules (nongnu packages linux)
+ (nongnu system linux-initrd)
+ (gnu system keyboard)
+ (suweren commons sudoers))
+ ((@ (gnu system) operating-system)
+ (kernel linux)
+ (bootloader (bootloader))
+ (keyboard-layout keyboard-layout)
+ (initrd microcode-initrd)
+ (firmware (list linux-firmware))
+ (host-name host-name)
+ (file-systems (file-systems))
+ (swap-devices (list swap-device-1
+ swap-device-2))
+ (users (users))
+ (timezone "Europe/Warsaw")
+ (locale "pl_PL.utf8")
+ (locale-definitions (locale-definitions))
+ (services services)
+ (sudoers-file %sudoers-specification*)))
+
+(operating-system*)