From b68e6afd3906a84012d158000f329854252f97d9 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sat, 27 Jul 2024 23:10:47 +0200 Subject: feat!(ayase): merge the new user account style with ayase system --- systems/ayase/system-configuration.scm | 64 ++++++++++++++++++++++++++-------- users/marekpasnikowski.scm | 22 +++++------- 2 files changed, 59 insertions(+), 27 deletions(-) diff --git a/systems/ayase/system-configuration.scm b/systems/ayase/system-configuration.scm index a9b1dfd..3f4506a 100644 --- a/systems/ayase/system-configuration.scm +++ b/systems/ayase/system-configuration.scm @@ -1,30 +1,64 @@ (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) + + ;;#:use-module (gnu services xorg) + + ;; marekpasnikowski-account + ;; marekpasnikowski-home-environment + ;; marekpasnikowski-username + #:use-module (users marekpasnikowski) + + ;; 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)) + + (marekpasnikowski (marekpasnikowski-account supplementary-groups*))) + (list marekpasnikowski))) + +;; record operating-system (define-public ayase (let* ((bootloader-targets (list "/boot/efi")) (efi-filesystem-id (uuid "B4FB-CBD9" 'fat32)) - (marekpasnikowski-groups (list "wheel" - "netdev" - "audio" - "video")) + (home-environments `((,marekpasnikowski-username ,(marekpasnikowski-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"))) - (marekpasnikowski-account (user-account (name "marekpasnikowski") - (comment "Marek Paśnikowski") - (group "users") - (home-directory "/home/marek") - (supplementary-groups marekpasnikowski-groups))) + (home-services (service guix-home-service-type + home-environments)) (root-partition (file-system (mount-point "/") (device root-filesystem-id) (type "ext4"))) @@ -32,7 +66,7 @@ (ayase-file-systems (list root-partition efi-partition)) - (ayase-user-accounts (list marekpasnikowski-account)) + (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) @@ -50,17 +84,17 @@ ;; system-packages )) (services (append %distribution-services - ;; marekpasnikowski-services + home-services system-services)) (swap-devices (list main-swap)) (users (append %base-user-accounts - ayase-user-accounts))) + users*))) (operating-system (kernel linux) (bootloader bootloader) (keyboard-layout keyboard-layout) (initrd microcode-initrd) (firmware firmware) - (host-name "ayase") + (host-name host-name*) (file-systems file-systems) (swap-devices swap-devices) (users users) @@ -68,3 +102,5 @@ (locale "pl_PL.utf8") (services services) (sudoers-file %sudoers-specification*)))) + +ayase diff --git a/users/marekpasnikowski.scm b/users/marekpasnikowski.scm index 54e01d5..e259d55 100644 --- a/users/marekpasnikowski.scm +++ b/users/marekpasnikowski.scm @@ -2,12 +2,10 @@ #:use-module (gnu home) ; home-environment #:use-module (gnu home services) ; home-profile-service-type ; home-xdg-configuration-files-service-type - #:use-module (gnu home services shells) ; home-fish-service-type #:use-module (gnu packages emacs) ; emacs #:use-module (gnu packages emacs-xyz) ; emacs-org-roam ; emacs-paredit #:use-module (gnu packages librewolf) ; librewolf - #:use-module (gnu packages shells) ; fish #:use-module (gnu packages version-control) ; git #:use-module (gnu services) ; service ; simple-service @@ -23,19 +21,20 @@ ;; (string) -> ;; record user-account (define-public (marekpasnikowski-account supplementary-groups*) - (let ((fish (file-append fish "/bin/fish"))) - (user-account (name marekpasnikowski-username) - (group "users") - (supplementary-groups supplementary-groups*) - (shell fish)))) + (user-account (name marekpasnikowski-username) + (group "users") + (supplementary-groups supplementary-groups*) + (uid 1000) + (comment "Marek Paśnikowski") + (home-directory "/home/marek"))) ;; string (define-public user - "marekpasnikowski") + "marek") ;; record home-environment (define-public marekpasnikowski-home-environment - (lambda (system) + (lambda (host-name*) (let* ((gitconfig-file (local-file "marekpasnikowski-gitconfig")) ; TODO modularize (gitignore-file (local-file "marekpasnikowski-gitignore")) ; TODO review the contents @@ -54,7 +53,6 @@ (emacs-software (simple-service 'emacs-packages home-profile-service-type emacs-packages)) - (fish (service home-fish-service-type)) (git-configuration (simple-service 'git-configuration home-xdg-configuration-files-service-type git-configuration-files)) @@ -62,11 +60,9 @@ home-profile-service-type git-packages)) - (%suweren-home-services* (%suweren-home-services system - user)) + (%suweren-home-services* (%suweren-home-services host-name*)) (user-services (list ;; emacs-configuration emacs-software - fish git-configuration git-software)) -- cgit v1.2.3