summaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2024-05-23 09:10:58 +0200
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2024-05-23 09:10:58 +0200
commit3fff56e90ffbdffb238c68aeb944efcbce7ad5b2 (patch)
tree93101adfa10e6986054ec9cc559dabb70bf311bf /systems
parent7aa734c486e5b749c43c1ba7f4e5c22a02464a9a (diff)
ayase: initialize system-configuration: new installation
Diffstat (limited to 'systems')
-rw-r--r--systems/ayase/guix-ayase.org92
-rw-r--r--systems/ayase/system-configuration.scm81
2 files changed, 173 insertions, 0 deletions
diff --git a/systems/ayase/guix-ayase.org b/systems/ayase/guix-ayase.org
new file mode 100644
index 0000000..856b91b
--- /dev/null
+++ b/systems/ayase/guix-ayase.org
@@ -0,0 +1,92 @@
+* System Configuration
+
+[[https://guix.gnu.org/manual/devel/en/html_node/System-Configuration.html]]
+
+** operating-system Reference
+
+[[https://guix.gnu.org/manual/devel/en/html_node/operating_002dsystem-Reference.html]]
+
+#+NAME: OPERATING-SYSTEM
+#+BEGIN_SRC scheme :tangle system-configuration.scm
+ (define-module (systems ayase system-configuration)
+ #:use-module (gnu)
+ #:use-module (gnu services cups)
+ #:use-module (gnu services desktop)
+ #:use-module (gnu services networking)
+ #:use-module (gnu services ssh)
+ #:use-module (gnu services xorg))
+
+ ;; DATA
+
+ ;; ABSTRACTION 2
+
+ (define efi-partition
+ (file-system (mount-point "/boot/efi")
+ (device (uuid "B4FB-CBD9" 'fat32))
+ (type "vfat")))
+
+ (define keyboard-layout
+ (keyboard-layout "pl"))
+
+ (define marek-account
+ (user-account (name "marek")
+ (comment "Marek Paśnikowski")
+ (group "users")
+ (home-directory "/home/marek")
+ (supplementary-groups (list "wheel"
+ "netdev"
+ "audio"
+ "video"))))
+
+ (define root-partition
+ (file-system (mount-point "/")
+ (device (uuid "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c" 'ext4))
+ (type "ext4")))
+
+ ;; ABSTRACTION 1
+
+ (define ayase-file-systems
+ (list root-partition
+ efi-partition))
+
+ (define ayase-user-accounts
+ (list marek-account))
+
+ (define bootloader
+ (bootloader-configuration (bootloader grub-efi-bootloader)
+ (targets (list "/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+
+ (define main-swap
+ (swap-space (target (uuid "cc6bbf7c-e42a-4ac3-a9ae-3b14d3b4b841"))))
+
+ (define system-packages
+ (list (specification->package "emacs")
+ (specification->package "emacs-exwm")
+ (specification->package "emacs-desktop-environment")))
+
+ (define system-services
+ (list (service openssh-service-type)
+ (service tor-service-type)
+ (service cups-service-type)))
+
+ ;; PUBLIC
+
+ (operating-system (bootloader bootloader)
+ (keyboard-layout keyboard-layout)
+ (host-name "ayase")
+ (file-systems (append %base-file-systems
+ ;; %distribution-file-systems
+ ayase-file-systems))
+ (swap-devices (list main-swap))
+ (users (append %base-user-accounts
+ ayase-user-accounts))
+ (packages (append %base-packages
+ ;; %distribution-packages
+ system-packages))
+ (timezone "Europe/Warsaw")
+ (locale "pl_PL.utf8")
+ (services (append %desktop-services
+ ;; %distribution-services
+ system-services)))
+#+END_SRC
diff --git a/systems/ayase/system-configuration.scm b/systems/ayase/system-configuration.scm
new file mode 100644
index 0000000..7e050bf
--- /dev/null
+++ b/systems/ayase/system-configuration.scm
@@ -0,0 +1,81 @@
+(define-module (systems ayase system-configuration)
+ #:use-module (gnu)
+ #:use-module (gnu services cups)
+ #:use-module (gnu services desktop)
+ #:use-module (gnu services networking)
+ #:use-module (gnu services ssh)
+ #:use-module (gnu services xorg))
+
+;; DATA
+
+;; ABSTRACTION 2
+
+(define efi-partition
+ (file-system (mount-point "/boot/efi")
+ (device (uuid "B4FB-CBD9" 'fat32))
+ (type "vfat")))
+
+(define keyboard-layout
+ (keyboard-layout "pl"))
+
+(define marek-account
+ (user-account (name "marek")
+ (comment "Marek Paśnikowski")
+ (group "users")
+ (home-directory "/home/marek")
+ (supplementary-groups (list "wheel"
+ "netdev"
+ "audio"
+ "video"))))
+
+(define root-partition
+ (file-system (mount-point "/")
+ (device (uuid "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c" 'ext4))
+ (type "ext4")))
+
+;; ABSTRACTION 1
+
+(define ayase-file-systems
+ (list root-partition
+ efi-partition))
+
+(define ayase-user-accounts
+ (list marek-account))
+
+(define bootloader
+ (bootloader-configuration (bootloader grub-efi-bootloader)
+ (targets (list "/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+
+(define main-swap
+ (swap-space (target (uuid "cc6bbf7c-e42a-4ac3-a9ae-3b14d3b4b841"))))
+
+(define system-packages
+ (list (specification->package "emacs")
+ (specification->package "emacs-exwm")
+ (specification->package "emacs-desktop-environment")))
+
+(define system-services
+ (list (service openssh-service-type)
+ (service tor-service-type)
+ (service cups-service-type)))
+
+;; PUBLIC
+
+(operating-system (bootloader bootloader)
+ (keyboard-layout keyboard-layout)
+ (host-name "ayase")
+ (file-systems (append %base-file-systems
+ ;; %distribution-file-systems
+ ayase-file-systems))
+ (swap-devices (list main-swap))
+ (users (append %base-user-accounts
+ ayase-user-accounts))
+ (packages (append %base-packages
+ ;; %distribution-packages
+ system-packages))
+ (timezone "Europe/Warsaw")
+ (locale "pl_PL.utf8")
+ (services (append %desktop-services
+ ;; %distribution-services
+ system-services)))