From b58557e864485a77db85dce27746e808e1953785 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Mon, 7 Oct 2024 12:42:53 +0200 Subject: refactor(izumi): consolidate SHELLS --- systems/izumi/home-configuration.scm | 88 ++++++++++++++++---------------- systems/izumi/izumi.org | 97 +++++++++++++++++------------------- 2 files changed, 90 insertions(+), 95 deletions(-) (limited to 'systems/izumi') diff --git a/systems/izumi/home-configuration.scm b/systems/izumi/home-configuration.scm index f84632d..7fc60c2 100644 --- a/systems/izumi/home-configuration.scm +++ b/systems/izumi/home-configuration.scm @@ -140,47 +140,47 @@ `(("EDITOR" . "emacsclient -nw")))) (list (let* - ((and "&& ") - (collect-garbage "sudo guix gc -d 7d ") - (configuration-prefix - "/home/marek/Publiczny/src/deployment/systems/izumi/") - (pull-guix "guix pull ") - (reconfigure-home - (string-append - "guix home delete-generations 7d ; " - "guix home reconfigure " - configuration-prefix - "home-configuration.scm ")) - (reconfigure-system - (string-append - "sudo guix system delete-generations 7d ; " - "sudo guix system reconfigure " - configuration-prefix - "system-configuration.scm ")) - (update-system - (string-append - pull-guix - and - reconfigure-system - and - reconfigure-home - and - collect-garbage))) - (simple-service - 'bash-extension - home-bash-service-type - (home-bash-extension - (aliases - `(("collect-garbage" . ,collect-garbage) - ("edit" . "$EDITOR") - ("pull-guix" . ,pull-guix) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-system" . ,reconfigure-system) - ("update-system" . ,update-system))) - (bash-profile - (list - (mixed-text-file - "newline-prompt" - "PS1=${PS1%?}\n" - "PS1=${PS1%?}\\n'$ '\n" - "PS1=\"\\n$PS1\"")))))))))) + ((and "&& ") + (collect-garbage "sudo guix gc -d 7d ") + (configuration-prefix + "/home/marek/Publiczny/src/deployment/systems/izumi/") + (pull-guix "guix pull ") + (reconfigure-home + (string-append + "guix home delete-generations 7d ; " + "guix home reconfigure " + configuration-prefix + "home-configuration.scm ")) + (reconfigure-system + (string-append + "sudo guix system delete-generations 7d ; " + "sudo guix system reconfigure " + configuration-prefix + "system-configuration.scm ")) + (update-system + (string-append + pull-guix + and + reconfigure-system + and + reconfigure-home + and + collect-garbage))) + (simple-service + 'bash-extension + home-bash-service-type + (home-bash-extension + (aliases + `(("collect-garbage" . ,collect-garbage) + ("edit" . "$EDITOR") + ("pull-guix" . ,pull-guix) + ("reconfigure-home" . ,reconfigure-home) + ("reconfigure-system" . ,reconfigure-system) + ("update-system" . ,update-system))) + (bash-profile + (list + (mixed-text-file + "newline-prompt" + "PS1=${PS1%?}\n" + "PS1=${PS1%?}\\n'$ '\n" + "PS1=\"\\n$PS1\"")))))))))) diff --git a/systems/izumi/izumi.org b/systems/izumi/izumi.org index 90ea1f0..630654c 100644 --- a/systems/izumi/izumi.org +++ b/systems/izumi/izumi.org @@ -368,7 +368,52 @@ "zip"))) (services (append (list izumi-channels-service-type) <> - <>))) + (list + (let* + ((and "&& ") + (collect-garbage "sudo guix gc -d 7d ") + (configuration-prefix + "/home/marek/Publiczny/src/deployment/systems/izumi/") + (pull-guix "guix pull ") + (reconfigure-home + (string-append + "guix home delete-generations 7d ; " + "guix home reconfigure " + configuration-prefix + "home-configuration.scm ")) + (reconfigure-system + (string-append + "sudo guix system delete-generations 7d ; " + "sudo guix system reconfigure " + configuration-prefix + "system-configuration.scm ")) + (update-system + (string-append + pull-guix + and + reconfigure-system + and + reconfigure-home + and + collect-garbage))) + (simple-service + 'bash-extension + home-bash-service-type + (home-bash-extension + (aliases + `(("collect-garbage" . ,collect-garbage) + ("edit" . "$EDITOR") + ("pull-guix" . ,pull-guix) + ("reconfigure-home" . ,reconfigure-home) + ("reconfigure-system" . ,reconfigure-system) + ("update-system" . ,update-system))) + (bash-profile + (list + (mixed-text-file + "newline-prompt" + "PS1=${PS1%?}\n" + "PS1=${PS1%?}\\n'$ '\n" + "PS1=\"\\n$PS1\"")))))))))) #+END_SRC ** [[https://guix.gnu.org/manual/en/html_node/Home-Services.html][13.3 Home Services]] @@ -469,53 +514,3 @@ `(("EDITOR" . "emacsclient -nw")))) #+END_SRC -#+NAME: SHELLS -#+BEGIN_SRC scheme - (list - (let* - ((and "&& ") - (collect-garbage "sudo guix gc -d 7d ") - (configuration-prefix - "/home/marek/Publiczny/src/deployment/systems/izumi/") - (pull-guix "guix pull ") - (reconfigure-home - (string-append - "guix home delete-generations 7d ; " - "guix home reconfigure " - configuration-prefix - "home-configuration.scm ")) - (reconfigure-system - (string-append - "sudo guix system delete-generations 7d ; " - "sudo guix system reconfigure " - configuration-prefix - "system-configuration.scm ")) - (update-system - (string-append - pull-guix - and - reconfigure-system - and - reconfigure-home - and - collect-garbage))) - (simple-service - 'bash-extension - home-bash-service-type - (home-bash-extension - (aliases - `(("collect-garbage" . ,collect-garbage) - ("edit" . "$EDITOR") - ("pull-guix" . ,pull-guix) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-system" . ,reconfigure-system) - ("update-system" . ,update-system))) - (bash-profile - (list - (mixed-text-file - "newline-prompt" - "PS1=${PS1%?}\n" - "PS1=${PS1%?}\\n'$ '\n" - "PS1=\"\\n$PS1\""))))))) -#+END_SRC - -- cgit v1.2.3