From 69920bf89d9a978f91cc1a3406df548671230130 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Tue, 27 Aug 2024 23:08:19 +0200 Subject: refactor user-account --- machines/portable-bios.scm | 6 ------ machines/thinkpad-x200.scm | 6 ------ systems/aisaka.scm | 9 ++------- systems/akashi.scm | 7 +------ systems/ayase.scm | 7 ++----- systems/mcdowell.scm | 6 +----- users/id1000.scm | 14 ++++++++++---- users/id1001.scm | 3 +-- 8 files changed, 17 insertions(+), 41 deletions(-) diff --git a/machines/portable-bios.scm b/machines/portable-bios.scm index 6cee14a..5364300 100644 --- a/machines/portable-bios.scm +++ b/machines/portable-bios.scm @@ -41,12 +41,6 @@ (define-public firmware* (list linux-firmware)) -;; (list string) -(define-public hardware-groups - (list "audio" - "netdev" - "video")) - ;; record* package (define-public initrd* microcode-initrd) diff --git a/machines/thinkpad-x200.scm b/machines/thinkpad-x200.scm index 4e86398..faca5b0 100644 --- a/machines/thinkpad-x200.scm +++ b/machines/thinkpad-x200.scm @@ -41,12 +41,6 @@ (define-public firmware* (list linux-firmware)) -;; (list string) -(define-public hardware-groups - (list "audio" - "netdev" - "video")) - ;; record* package (define-public initrd* microcode-initrd) diff --git a/systems/aisaka.scm b/systems/aisaka.scm index be3b4cf..b5db185 100644 --- a/systems/aisaka.scm +++ b/systems/aisaka.scm @@ -36,13 +36,8 @@ ;; (record user-account) (define users* - (let* ((system-groups (list "wheel")) - - (supplementary-groups hardware-groups) - (supplementary-groups* (append hardware-groups - system-groups))) - (list (uid1000-account supplementary-groups*) - (uid1001-account supplementary-groups)))) + (list uid1000-account + uid1001-account)) ;; record operating-system (define-public operating-system* diff --git a/systems/akashi.scm b/systems/akashi.scm index cacbe5a..57debb5 100644 --- a/systems/akashi.scm +++ b/systems/akashi.scm @@ -11,7 +11,6 @@ ;; bootloader-configuration* ;; file-systems* ;; firmware* - ;; hardware-groups ;; initrd* ;; kernel* ;; swap-devices* @@ -31,11 +30,7 @@ ;; (record* user-account) (define users* - (let* ((system-groups (list "wheel")) - - (supplementary-groups* (append hardware-groups - system-groups))) - (list (uid1000-account supplementary-groups*)))) + (list uid1000-account)) ;; record* operating-system (define-public operating-system* diff --git a/systems/ayase.scm b/systems/ayase.scm index acb822b..58b39f7 100644 --- a/systems/ayase.scm +++ b/systems/ayase.scm @@ -45,12 +45,9 @@ (define host-name* "ayase") -;; (record user-account) +;; (list record* user-account) (define users* - (let* ((system-groups (list "wheel")) - - (supplementary-groups* (append system-groups))) - (list (uid1000-account supplementary-groups*)))) + (list uid1000-account)) ;; record operating-system (define-public operating-system* diff --git a/systems/mcdowell.scm b/systems/mcdowell.scm index a51d627..ecf4407 100644 --- a/systems/mcdowell.scm +++ b/systems/mcdowell.scm @@ -21,11 +21,7 @@ ;; (record user-account) (define users* - (let* ((system-groups (list "wheel")) - - (supplementary-groups* (append hardware-groups - system-groups))) - (list (uid1000-account supplementary-groups*)))) + (list uid1000-account)) ;; record operating-system (define-public operating-system* diff --git a/users/id1000.scm b/users/id1000.scm index ba414b5..d92b05e 100644 --- a/users/id1000.scm +++ b/users/id1000.scm @@ -31,16 +31,22 @@ ;; %suweren-home-services #:use-module (suweren home)) +;; (list string) +(define groups + (list ;; "audio" + ;; "netdev" + ;; "video" + "wheel")) + ;; string (define-public uid1000-name "marek") -;; (string) -> -;; record user-account -(define-public (uid1000-account supplementary-groups*) +;; record* user-account +(define-public uid1000-account (user-account (name uid1000-name) (group "users") - (supplementary-groups supplementary-groups*) + (supplementary-groups groups) (uid 1000) (comment "Marek Paśnikowski") (home-directory "/home/marek"))) diff --git a/users/id1001.scm b/users/id1001.scm index 2c065c4..26a76f6 100644 --- a/users/id1001.scm +++ b/users/id1001.scm @@ -21,10 +21,9 @@ ;; (string) -> ;; record user-account -(define-public (uid1001-account supplementary-groups*) +(define-public uid1001-account (user-account (name uid1001-name) (group "users") - (supplementary-groups supplementary-groups*) (uid 1001) (comment "Liliana Ruszuk") (home-directory "/home/lilia"))) -- cgit v1.2.3