summaryrefslogtreecommitdiff
path: root/systems/ayase-old.scm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/ayase-old.scm')
-rw-r--r--systems/ayase-old.scm174
1 files changed, 174 insertions, 0 deletions
diff --git a/systems/ayase-old.scm b/systems/ayase-old.scm
new file mode 100644
index 0000000..5534f90
--- /dev/null
+++ b/systems/ayase-old.scm
@@ -0,0 +1,174 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; SPDX-FileCopyrightText: 2024 Marek Paśnikowski <marek@marekpasnikowski.pl>
+
+(define-module (systems ayase-old)
+ #:use-module ((gnu system)
+ #:prefix gnu:system:)
+ #:use-module ((gnu system file-systems)
+ #:prefix gnu:system:file-systems:)
+ #:use-module ((gnu system uuid)
+ #:prefix gnu:system:uuid:)
+ #:use-module ((nongnu packages linux)
+ #:prefix nongnu:packages:linux:)
+ #:use-module ((nongnu system linux-initrd)
+ #:prefix nongnu:system:linux-initrd:)
+ #:use-module ((suweren commons sudoers)
+ #:prefix suweren:commons:sudoers:)
+ #:use-module ((suweren services)
+ #:prefix suweren:services:)
+ #:use-module ((suweren system)
+ #:prefix suweren:system:)
+ #:use-module ((users id1000)
+ #:prefix users:id1000:))
+
+(define efi-filesystem-uuid
+ (gnu:system:uuid:uuid
+ "B4FB-CBD9"
+ 'fat32))
+
+(define host-name
+ "ayase")
+
+(define (label number)
+ (gnu:system:file-systems:file-system-label
+ (string-append host-name
+ "-swap"
+ number)))
+
+(define root-filesystem-uuid
+ (gnu:system:uuid:uuid
+ "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define efi-partition
+ (gnu:system:file-systems:file-system
+ (mount-point "/boot/efi")
+ (device efi-filesystem-uuid)
+ (type "vfat")))
+
+(define (gc-workaround-service)
+ (use-modules (gnu packages)
+ (gnu packages bootloaders)
+ (gnu packages ibus)
+ (gnu packages python-build)
+ (gnu packages ruby)
+ (gnu services))
+ (let ((ibus-doc (specification->package+output "ibus" "doc")))
+ (simple-service 'gc-workaround
+ profile-service-type
+ (list grub
+ ibus
+ ;; ibus-doc
+ python-pip
+ ruby))))
+
+(define (home-services)
+ (use-modules (gnu services guix))
+ (let ((uid1000-home-environment* (users:id1000:uid1000-home-environment host-name)))
+ ((@ (gnu services) service)
+ guix-home-service-type
+ `((,users:id1000:uid1000-name ,uid1000-home-environment*)))))
+
+(define keyboard-layout
+ ((@ (gnu system keyboard) keyboard-layout)
+ "pl"))
+
+(define (libvirt-service)
+ (use-modules (gnu services virtualization))
+ ((@ (gnu services) service)
+ libvirt-service-type))
+
+(define (virtlog-service)
+ (use-modules (gnu services virtualization))
+ ((@ (gnu services) service)
+ virtlog-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
+ (mount-point "/")
+ (device root-filesystem-uuid)
+ (type "ext4")))
+
+(define (swap-label number)
+ (let ((target-label (label number)))
+ (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
+ kgpg
+ pinentry-qt
+ pinentry-tty)))
+
+(define (tor-service)
+ (use-modules (gnu services)
+ (gnu services networking))
+ ((@ (gnu services) service)
+ tor-service-type))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(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)
+ (append gnu:system:file-systems:%base-file-systems
+ (list root-partition
+ efi-partition)))
+
+(define services
+ (append suweren:services:%distribution-services
+ (list (gc-workaround-service)
+ (home-services)
+ (libvirt-service)
+ (openssh-service)
+ (system-packages-service)
+ (tor-service)
+ (virtlog-service))))
+
+(define swap-device-1
+ (swap-label "-1"))
+
+(define swap-device-2
+ (swap-label "-2"))
+
+(define (users)
+ (use-modules (gnu system accounts))
+ (append (@ (gnu system shadow) %base-user-accounts)
+ (list users:id1000:uid1000-account)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-public operating-system*
+ (gnu:system:operating-system
+ (kernel nongnu:packages:linux:linux)
+ (bootloader (bootloader))
+ (keyboard-layout keyboard-layout)
+ (initrd nongnu:system:linux-initrd:microcode-initrd)
+ (firmware (list nongnu:packages:linux: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 suweren:system:polish-locale-string)
+ (locale-definitions suweren:system:%suweren-locale-definitions)
+ (services services)
+ (sudoers-file suweren:commons:sudoers:%sudoers-specification*)))