From f5e1656303a84943e20cec579a6c2122dd4bcacc Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 15 Jan 2023 15:39:31 +0100 Subject: Optimize Flashrom declaration --- aisaka.org | 64 +++++++++++++++++++------------------------------- home-configuration.scm | 12 ++++++++-- 2 files changed, 34 insertions(+), 42 deletions(-) diff --git a/aisaka.org b/aisaka.org index fb1fc8e..e738e2d 100644 --- a/aisaka.org +++ b/aisaka.org @@ -3,6 +3,29 @@ #+property: header-args:scheme :noweb yes #+property: header-args:scheme+ :noweb-prefix no +* TODO LIBREBOOT + +The first layer of computing is the firmware. The Lenovo Thinkpad X200 has +a free Libreboot firmware installed. It is a good idea to keep it up to date. + +** TODO Flashrom + +Flashrom program is needed to write the computer firmware. The +program needs a relaxed kernel security feature. + +#+begin_src scheme :noweb-ref flashrom-package + (service + (service-type + (name 'flashrom-package) + (extensions + `(,(service-extension home-profile-service-type + (lambda (_) + (map specification->package + '("flashrom")))))) + (description "Flashrom installation.") + (default-value #f))) +#+end_src + * TODO File Systems This system has a very simple file system - a boot partition, main partition @@ -58,44 +81,6 @@ memory without overprovisioning, as well as to prolog the lifetime of SSD. (swap-space (target (uuid "73bed3f9-be07-40ad-a228-577cd24f2e1d"))) #+end_src -* TODO LIBREBOOT - -The first layer of computing is the firmware. The Lenovo Thinkpad X200 has -a free Libreboot firmware installed. It is a good idea to keep it up to date. - -** TODO Flashrom - -Flashrom program is needed to write the computer firmware. The program needs -a relaxed kernel security feature. - -#+begin_src scheme :noweb-ref flashrom-tangle :tangle services/flashrom.scm - (define-module (flashrom) - #:use-module (gnu) - #:use-module (gnu home) - #:use-module (gnu home services) - #:use-module (gnu home services shells)) - - <> -#+end_src - -*** TODO Flashrom Package - -This service installs flashrom. - -#+begin_src scheme :noweb-ref flashrom-package - (define-public flashrom-package - (service - (service-type - (name 'flashrom-package) - (extensions - `(,(service-extension home-profile-service-type - (lambda (_) - (map specification->package - '("flashrom")))))) - (description "Flashrom installation.") - (default-value #f)))) -#+end_src - * TODO System Servers ** TODO Secure Shell @@ -253,7 +238,6 @@ The Sway Window Manager consists of Sway packages and relevant configurations. (add-to-load-path "./services") (define-module (aisaka-home-configuration) - #:use-module (flashrom) #:use-module (gnu home) #:use-module (gnu home services) #:use-module (gnu home services shells) @@ -363,7 +347,7 @@ The Sway Window Manager consists of Sway packages and relevant configurations. "unzip" "zip"))) (services - `(,flashrom-package + `(,<> ,ssh-configuration ,sway-configuration ,sway-packages diff --git a/home-configuration.scm b/home-configuration.scm index 4c8752b..a7020ab 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -1,7 +1,6 @@ (add-to-load-path "./services") (define-module (aisaka-home-configuration) - #:use-module (flashrom) #:use-module (gnu home) #:use-module (gnu home services) #:use-module (gnu home services shells) @@ -111,7 +110,16 @@ "unzip" "zip"))) (services - `(,flashrom-package + `(,(service + (service-type + (name 'flashrom-package) + (extensions + `(,(service-extension home-profile-service-type + (lambda (_) + (map specification->package + '("flashrom")))))) + (description "Flashrom installation.") + (default-value #f))) ,ssh-configuration ,sway-configuration ,sway-packages -- cgit v1.2.3