From 2da9eec55a1179d32895212ce858d6311487c04c Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Mon, 29 Jul 2024 18:43:16 +0200 Subject: refactor!(ayase): deconflict system definition location --- systems/ayase.scm | 104 +++++++++++++++++++++++++++++++++ systems/ayase/system-configuration.scm | 104 --------------------------------- systems/mcdowell.scm | 4 +- 3 files changed, 106 insertions(+), 106 deletions(-) create mode 100644 systems/ayase.scm delete mode 100644 systems/ayase/system-configuration.scm diff --git a/systems/ayase.scm b/systems/ayase.scm new file mode 100644 index 0000000..838a88c --- /dev/null +++ b/systems/ayase.scm @@ -0,0 +1,104 @@ +(define-module (systems ayase) + ;; uuid + #:use-module (gnu) + + ;; 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) + + ;;#:use-module (gnu services xorg) + + ;; uid1000-account + ;; uid1000-home-environment + ;; uid1000-name + #:use-module (users id1000) + + ;; 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)) + +;; string +(define host-name* + "ayase") + +;; (record user-account) +(define users* + (let* ((system-groups (list "wheel")) + + (supplementary-groups* (append system-groups))) + (list (uid1000-account supplementary-groups*)))) + +;; record operating-system +(define-public ayase + (let* ((bootloader-targets (list "/boot/efi")) + (efi-filesystem-id (uuid "B4FB-CBD9" 'fat32)) + (home-environments `((,uid1000-name ,(uid1000-home-environment host-name*)))) + (root-filesystem-id (uuid "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c")) + + (efi-partition (file-system (mount-point "/boot/efi") + (device efi-filesystem-id) + (type "vfat"))) + (home-services (service guix-home-service-type + home-environments)) + (root-partition (file-system (mount-point "/") + (device root-filesystem-id) + (type "ext4"))) + (swap-space-id (uuid "f1c1b2ab-5c11-4708-80c2-d5ac99ff35cf")) + + (ayase-file-systems (list root-partition + efi-partition)) + (home-services (list home-services)) + (keyboard-layout (keyboard-layout "pl")) + (main-swap (swap-space (target swap-space-id))) + (system-services (list (service openssh-service-type) + (service tor-service-type))) + + (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) + (targets bootloader-targets) + (keyboard-layout keyboard-layout))) + (file-systems (append %base-file-systems + ;; %distribution-file-systems + ayase-file-systems)) + (firmware (list linux-firmware)) + (packages (append %base-packages + ;; %distribution-packages + ;; system-packages + )) + (services (append %distribution-services + home-services + system-services)) + (swap-devices (list main-swap)) + (users (append %base-user-accounts + users*))) + (operating-system (kernel linux) + (bootloader bootloader) + (keyboard-layout keyboard-layout) + (initrd microcode-initrd) + (firmware firmware) + (host-name host-name*) + (file-systems file-systems) + (swap-devices swap-devices) + (users users) + (timezone "Europe/Warsaw") + (locale "pl_PL.utf8") + (services services) + (sudoers-file %sudoers-specification*)))) + +ayase diff --git a/systems/ayase/system-configuration.scm b/systems/ayase/system-configuration.scm deleted file mode 100644 index b31d5f0..0000000 --- a/systems/ayase/system-configuration.scm +++ /dev/null @@ -1,104 +0,0 @@ -(define-module (systems ayase system-configuration) - ;; uuid - #:use-module (gnu) - - ;; 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) - - ;;#:use-module (gnu services xorg) - - ;; uid1000-account - ;; uid1000-home-environment - ;; uid1000-name - #:use-module (users id1000) - - ;; 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)) - -;; string -(define host-name* - "ayase") - -;; (record user-account) -(define users* - (let* ((system-groups (list "wheel")) - - (supplementary-groups* (append system-groups))) - (list (uid1000-account supplementary-groups*)))) - -;; record operating-system -(define-public ayase - (let* ((bootloader-targets (list "/boot/efi")) - (efi-filesystem-id (uuid "B4FB-CBD9" 'fat32)) - (home-environments `((,uid1000-name ,(uid1000-home-environment host-name*)))) - (root-filesystem-id (uuid "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c")) - - (efi-partition (file-system (mount-point "/boot/efi") - (device efi-filesystem-id) - (type "vfat"))) - (home-services (service guix-home-service-type - home-environments)) - (root-partition (file-system (mount-point "/") - (device root-filesystem-id) - (type "ext4"))) - (swap-space-id (uuid "f1c1b2ab-5c11-4708-80c2-d5ac99ff35cf")) - - (ayase-file-systems (list root-partition - efi-partition)) - (home-services (list home-services)) - (keyboard-layout (keyboard-layout "pl")) - (main-swap (swap-space (target swap-space-id))) - (system-services (list (service openssh-service-type) - (service tor-service-type))) - - (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) - (targets bootloader-targets) - (keyboard-layout keyboard-layout))) - (file-systems (append %base-file-systems - ;; %distribution-file-systems - ayase-file-systems)) - (firmware (list linux-firmware)) - (packages (append %base-packages - ;; %distribution-packages - ;; system-packages - )) - (services (append %distribution-services - home-services - system-services)) - (swap-devices (list main-swap)) - (users (append %base-user-accounts - users*))) - (operating-system (kernel linux) - (bootloader bootloader) - (keyboard-layout keyboard-layout) - (initrd microcode-initrd) - (firmware firmware) - (host-name host-name*) - (file-systems file-systems) - (swap-devices swap-devices) - (users users) - (timezone "Europe/Warsaw") - (locale "pl_PL.utf8") - (services services) - (sudoers-file %sudoers-specification*)))) - -ayase diff --git a/systems/mcdowell.scm b/systems/mcdowell.scm index 26cc474..d919fa2 100644 --- a/systems/mcdowell.scm +++ b/systems/mcdowell.scm @@ -27,7 +27,7 @@ (list (uid1000-account supplementary-groups*)))) ;; record operating-system -(define operating-system* +(define mcdowell (let* ((home-environments `((,uid1000-name ,(uid1000-home-environment host-name*)))) (guix-home (service guix-home-service-type @@ -49,4 +49,4 @@ locale* services*))) -operating-system* +mcdowell -- cgit v1.2.3