From 4d4a42b57666d5aae7facd3327972236ad986cbb Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Kill history to remove past secrets --- home-configuration.scm | 176 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 home-configuration.scm (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm new file mode 100644 index 0000000..12b64ec --- /dev/null +++ b/home-configuration.scm @@ -0,0 +1,176 @@ +(use-modules + (gnu home services shells) + (gnu packages) + (gnu packages emacs) + (gnu packages fonts) + (gnu packages gnome) + (gnu packages gnupg) + (gnu packages noweb) + (gnu packages version-control) + (nongnu packages mozilla)) + +(use-modules + (gnu) + (gnu home services)) + +(use-package-modules emacs-xyz) + +(use-service-modules) +(use-modules + (gnu) + (gnu home services) + (guix build-system emacs) + (guix git-download) + ((guix licenses) + #:prefix license:) + (guix packages)) + +(use-package-modules base emacs-xyz gawk) +(use-modules + (gnu services) + (gnu home services) + (guix gexp)) +(use-modules + (gnu home services shells) + (gnu services)) + +(home-environment + (packages + (list + dconf-editor + emacs + emacs-org-modern + emacs-paredit + firefox + font-google-noto + font-google-noto-emoji + font-google-noto-sans-cjk + font-google-noto-serif-cjk + git + gnupg + gnome-tweaks + noweb + pinentry)) + (services + (append + (list + (simple-service + 'emacs-home-profile + home-profile-service-type + (append + (list emacs-guix emacs-nix-mode) + (list + (let + ((commit* "cfab3eb8e1c25640439f10789872e28872d656a0")) + (package + (name "emacs-org-fc") + (version (git-version "0.1.0" "0" commit*)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "git://localhost/marek/org-fc") + (commit commit*))) + (file-name (git-file-name name version)) + (sha256 (base32 "0x8bxjh4r1wqh48f69x8k6gxfpixhwci365n0rh827csfjaqs5hg")))) + (build-system emacs-build-system) + (arguments + (list + #:include #~ (cons* "\\.awk$" "\\.org$" %default-include) + #:exclude #~ (cons "^test/" %default-exclude) + #:tests? #t + #:test-command + #~ + (list + "emacs" + "--batch" + "-L" "." + "-L" "tests/" + "-l" "tests/org-fc-filter-test.el" + "-l" "tests/org-fc-indexer-test.el" + "-l" "tests/org-fc-review-data-test.el" + "-f" "ert-run-tests-batch-and-exit") + #:phases + #~ + (modify-phases + %standard-phases + (add-after + 'unpack + 'qualify-paths + (lambda* + (#:key inputs + #:allow-other-keys) + (substitute* + "org-fc-awk.el" + (("\"find ") + (string-append + "\"" + (search-input-file inputs "/bin/find") + " ")) + (("\"gawk ") + (string-append + "\"" + (search-input-file inputs "/bin/gawk") + " ")) + (("\"xargs ") + (string-append + "\"" + (search-input-file inputs "/bin/xargs") + " ")))))))) + (inputs (list findutils gawk)) + (propagated-inputs (list emacs-hydra)) + (home-page "https://www.leonrische.me/fc/index.html") + (synopsis "Spaced repetition system for Emacs Org mode") + (description + (string-append + "Org-fc is a spaced-repetition system for Emacs' Org mode.\n" + "It allows you to mark headlines in a file as flashcards, turning pieces of\n" + "knowledge you want to learn into a question-answer test. These cards are\n" + "reviewed at regular interval. After each review, the next review interval is\n" + "calculated based on how well you remembered the contents of the card.\n")) + (license license:gpl3+)))))) + (simple-service + 'home-files + home-files-service-type + (list + (list ".emacs" (local-file "home-files/emacs-configuration.el")) + (list + ".config/git/ignore" + ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore + (local-file "home-files/git-ignore.conf"))))) + (list + (let* + ((and "&& ") + (collect-garbage "sudo guix gc -d 7d ") + (configuration-prefix "/home/marek/src/izumi/") + (pull-guix "guix pull ") + (reconfigure-home + (string-append + "guix home reconfigure " + configuration-prefix + "home-configuration.scm ")) + (reconfigure-system + (string-append + "sudo guix system reconfigure " + configuration-prefix + "system-configuration.scm ")) + (update-system + (string-append + pull-guix + and + reconfigure-system + and + reconfigure-home + and + collect-garbage))) + (service + home-bash-service-type + (home-bash-configuration + (aliases + (list + `("collect-garbage" . ,collect-garbage) + `("pull-guix" . ,pull-guix) + `("reconfigure-home" . ,reconfigure-home) + `("reconfigure-system" . ,reconfigure-system) + `("update-system" . ,update-system)))))))))) -- cgit v1.2.3 From 274d71de16bfe68b5157d76601ac8c725260e53d Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Enable work with remote configuration repository --- home-configuration.scm | 12 +++++++++--- izumi.org | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 12b64ec..6b7bc68 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -141,20 +141,26 @@ (local-file "home-files/git-ignore.conf"))))) (list (let* - ((and "&& ") + ((and " && ") (collect-garbage "sudo guix gc -d 7d ") (configuration-prefix "/home/marek/src/izumi/") (pull-guix "guix pull ") (reconfigure-home (string-append + "git pull " + configuration-prefix + and "guix home reconfigure " configuration-prefix - "home-configuration.scm ")) + "home-configuration.scm")) (reconfigure-system (string-append + "git pull " + configuration-prefix + and "sudo guix system reconfigure " configuration-prefix - "system-configuration.scm ")) + "system-configuration.scm")) (update-system (string-append pull-guix diff --git a/izumi.org b/izumi.org index 9a1518c..954d034 100644 --- a/izumi.org +++ b/izumi.org @@ -795,20 +795,26 @@ #+NAME: HOME-BASH-SERVICE-TYPE #+BEGIN_SRC scheme (let* - ((and "&& ") + ((and " && ") (collect-garbage "sudo guix gc -d 7d ") (configuration-prefix "/home/marek/src/izumi/") (pull-guix "guix pull ") (reconfigure-home (string-append + "git pull " + configuration-prefix + and "guix home reconfigure " configuration-prefix - "home-configuration.scm ")) + "home-configuration.scm")) (reconfigure-system (string-append + "git pull " + configuration-prefix + and "sudo guix system reconfigure " configuration-prefix - "system-configuration.scm ")) + "system-configuration.scm")) (update-system (string-append pull-guix -- cgit v1.2.3 From d9d1411461902dfbfa20d73b17bd58b2c4cf82db Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Install pwgen --- home-configuration.scm | 4 +++- izumi.org | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 6b7bc68..8bccc5f 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -29,6 +29,7 @@ (use-modules (gnu services) (gnu home services) + (gnu packages password-utils) (guix gexp)) (use-modules (gnu home services shells) @@ -179,4 +180,5 @@ `("pull-guix" . ,pull-guix) `("reconfigure-home" . ,reconfigure-home) `("reconfigure-system" . ,reconfigure-system) - `("update-system" . ,update-system)))))))))) + `("update-system" . ,update-system))))) + (simple-service packages home-profile-service-type (list pwgen))))))) diff --git a/izumi.org b/izumi.org index 954d034..0b1bfcb 100644 --- a/izumi.org +++ b/izumi.org @@ -757,6 +757,7 @@ (use-modules (gnu services) (gnu home services) + (gnu packages password-utils) (guix gexp)) #+END_SRC @@ -833,7 +834,8 @@ `("pull-guix" . ,pull-guix) `("reconfigure-home" . ,reconfigure-home) `("reconfigure-system" . ,reconfigure-system) - `("update-system" . ,update-system)))))) + `("update-system" . ,update-system))))) + (simple-service packages home-profile-service-type (list pwgen))) #+END_SRC * [[https://www.leonrische.me/fc/][Emacs-Org-FC-TN]] -- cgit v1.2.3 From fed7905485fafdc7819abc125e5e04b0c4061c01 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Fix error with cases of divergent branches --- home-configuration.scm | 4 ++-- izumi.org | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 8bccc5f..d3dec78 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -148,7 +148,7 @@ (pull-guix "guix pull ") (reconfigure-home (string-append - "git pull " + "git pull --rebase=true " configuration-prefix and "guix home reconfigure " @@ -156,7 +156,7 @@ "home-configuration.scm")) (reconfigure-system (string-append - "git pull " + "git pull --rebase=true " configuration-prefix and "sudo guix system reconfigure " diff --git a/izumi.org b/izumi.org index 0b1bfcb..ee4c904 100644 --- a/izumi.org +++ b/izumi.org @@ -802,7 +802,7 @@ (pull-guix "guix pull ") (reconfigure-home (string-append - "git pull " + "git pull --rebase=true " configuration-prefix and "guix home reconfigure " @@ -810,7 +810,7 @@ "home-configuration.scm")) (reconfigure-system (string-append - "git pull " + "git pull --rebase=true " configuration-prefix and "sudo guix system reconfigure " -- cgit v1.2.3 From 9f6c62c99c617663f3cc8019bbb8e26ed819f973 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Fix position of pwgen installation declaration --- home-configuration.scm | 6 +++--- izumi.org | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index d3dec78..8fb18fe 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -51,7 +51,8 @@ gnupg gnome-tweaks noweb - pinentry)) + pinentry + pwgen)) (services (append (list @@ -180,5 +181,4 @@ `("pull-guix" . ,pull-guix) `("reconfigure-home" . ,reconfigure-home) `("reconfigure-system" . ,reconfigure-system) - `("update-system" . ,update-system))))) - (simple-service packages home-profile-service-type (list pwgen))))))) + `("update-system" . ,update-system)))))))))) diff --git a/izumi.org b/izumi.org index ee4c904..4464eef 100644 --- a/izumi.org +++ b/izumi.org @@ -728,7 +728,8 @@ gnupg gnome-tweaks noweb - pinentry)) + pinentry + pwgen)) (services (append <> @@ -834,8 +835,7 @@ `("pull-guix" . ,pull-guix) `("reconfigure-home" . ,reconfigure-home) `("reconfigure-system" . ,reconfigure-system) - `("update-system" . ,update-system))))) - (simple-service packages home-profile-service-type (list pwgen))) + `("update-system" . ,update-system)))))) #+END_SRC * [[https://www.leonrische.me/fc/][Emacs-Org-FC-TN]] -- cgit v1.2.3 From 94353dfb5fa2e881ac685dd6b89f9fab777e57a4 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Test fix for aliases --- home-configuration.scm | 11 +++++------ izumi.org | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 8fb18fe..35c2529 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -176,9 +176,8 @@ home-bash-service-type (home-bash-configuration (aliases - (list - `("collect-garbage" . ,collect-garbage) - `("pull-guix" . ,pull-guix) - `("reconfigure-home" . ,reconfigure-home) - `("reconfigure-system" . ,reconfigure-system) - `("update-system" . ,update-system)))))))))) + `(("collect-garbage" . ,collect-garbage) + ("pull-guix" . ,pull-guix) + ("reconfigure-home" . ,reconfigure-home) + ("reconfigure-system" . ,reconfigure-system) + ("update-system" . ,update-system)))))))))) diff --git a/izumi.org b/izumi.org index 4464eef..d8cfaf3 100644 --- a/izumi.org +++ b/izumi.org @@ -830,12 +830,11 @@ home-bash-service-type (home-bash-configuration (aliases - (list - `("collect-garbage" . ,collect-garbage) - `("pull-guix" . ,pull-guix) - `("reconfigure-home" . ,reconfigure-home) - `("reconfigure-system" . ,reconfigure-system) - `("update-system" . ,update-system)))))) + `(("collect-garbage" . ,collect-garbage) + ("pull-guix" . ,pull-guix) + ("reconfigure-home" . ,reconfigure-home) + ("reconfigure-system" . ,reconfigure-system) + ("update-system" . ,update-system)))))) #+END_SRC * [[https://www.leonrische.me/fc/][Emacs-Org-FC-TN]] -- cgit v1.2.3 From fb576303f6fd16901e0ac4ed856b50ac4014a353 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Improve HOME-FILES-SERVICE-TYPE's formatting --- home-configuration.scm | 18 +++++++++--------- izumi.org | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 35c2529..25812ca 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -132,15 +132,15 @@ "reviewed at regular interval. After each review, the next review interval is\n" "calculated based on how well you remembered the contents of the card.\n")) (license license:gpl3+)))))) - (simple-service - 'home-files - home-files-service-type - (list - (list ".emacs" (local-file "home-files/emacs-configuration.el")) - (list - ".config/git/ignore" - ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore - (local-file "home-files/git-ignore.conf"))))) + ( simple-service + 'home-files + home-files-service-type + ( list + ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) + ( list + ".config/git/ignore" + ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore + ( local-file "home-files/git-ignore.conf" ) ) ) )) (list (let* ((and " && ") diff --git a/izumi.org b/izumi.org index d8cfaf3..10c4420 100644 --- a/izumi.org +++ b/izumi.org @@ -774,15 +774,15 @@ #+NAME: HOME-FILES-SERVICE-TYPE #+BEGIN_SRC scheme - (simple-service - 'home-files - home-files-service-type - (list - (list ".emacs" (local-file "home-files/emacs-configuration.el")) - (list - ".config/git/ignore" - ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore - (local-file "home-files/git-ignore.conf")))) + ( simple-service + 'home-files + home-files-service-type + ( list + ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) + ( list + ".config/git/ignore" + ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore + ( local-file "home-files/git-ignore.conf" ) ) ) ) #+END_SRC *** [[https://guix.gnu.org/manual/en/html_node/Shells-Home-Services.html][13.3.2 Shells]] -- cgit v1.2.3 From 1fd180c62dfe96d32015850b25cc018359d72595 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Use git -C to actually pull updates --- home-configuration.scm | 12 +++++++----- izumi.org | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 25812ca..8fc6b37 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -143,26 +143,28 @@ ( local-file "home-files/git-ignore.conf" ) ) ) )) (list (let* - ((and " && ") + ((and "&& ") (collect-garbage "sudo guix gc -d 7d ") (configuration-prefix "/home/marek/src/izumi/") (pull-guix "guix pull ") (reconfigure-home (string-append - "git pull --rebase=true " + "git -C " configuration-prefix + " pull " and "guix home reconfigure " configuration-prefix - "home-configuration.scm")) + "home-configuration.scm ")) (reconfigure-system (string-append - "git pull --rebase=true " + "git -C " configuration-prefix + " pull " and "sudo guix system reconfigure " configuration-prefix - "system-configuration.scm")) + "system-configuration.scm ")) (update-system (string-append pull-guix diff --git a/izumi.org b/izumi.org index 10c4420..d2c05fd 100644 --- a/izumi.org +++ b/izumi.org @@ -797,26 +797,28 @@ #+NAME: HOME-BASH-SERVICE-TYPE #+BEGIN_SRC scheme (let* - ((and " && ") + ((and "&& ") (collect-garbage "sudo guix gc -d 7d ") (configuration-prefix "/home/marek/src/izumi/") (pull-guix "guix pull ") (reconfigure-home (string-append - "git pull --rebase=true " + "git -C " configuration-prefix + " pull " and "guix home reconfigure " configuration-prefix - "home-configuration.scm")) + "home-configuration.scm ")) (reconfigure-system (string-append - "git pull --rebase=true " + "git -C " configuration-prefix + " pull " and "sudo guix system reconfigure " configuration-prefix - "system-configuration.scm")) + "system-configuration.scm ")) (update-system (string-append pull-guix -- cgit v1.2.3 From c7eaf561411e852f6adb48c735aec4b69a61cc36 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:15 +0100 Subject: Link to the channels.scm file inside the GNU store --- home-configuration.scm | 1 + izumi.org | 1 + 2 files changed, 2 insertions(+) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 8fc6b37..db0133b 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -137,6 +137,7 @@ home-files-service-type ( list ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) + ( list ".config/guix/channels" ( local-file "channels.scm" ) ) ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore diff --git a/izumi.org b/izumi.org index d2c05fd..881a1f6 100644 --- a/izumi.org +++ b/izumi.org @@ -779,6 +779,7 @@ home-files-service-type ( list ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) + ( list ".config/guix/channels" ( local-file "channels.scm" ) ) ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore -- cgit v1.2.3 From b377dadce8e59c56d3fcf45eb44bbdea1ef69565 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:16 +0100 Subject: Bring back the fix to the error on divergent Git branches --- home-configuration.scm | 4 ++-- izumi.org | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index db0133b..b290fd6 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -152,7 +152,7 @@ (string-append "git -C " configuration-prefix - " pull " + " pull --rebase=true " and "guix home reconfigure " configuration-prefix @@ -161,7 +161,7 @@ (string-append "git -C " configuration-prefix - " pull " + " pull --rebase=true " and "sudo guix system reconfigure " configuration-prefix diff --git a/izumi.org b/izumi.org index 881a1f6..559b2b5 100644 --- a/izumi.org +++ b/izumi.org @@ -806,7 +806,7 @@ (string-append "git -C " configuration-prefix - " pull " + " pull --rebase=true " and "guix home reconfigure " configuration-prefix @@ -815,7 +815,7 @@ (string-append "git -C " configuration-prefix - " pull " + " pull --rebase=true " and "sudo guix system reconfigure " configuration-prefix -- cgit v1.2.3 From d1bb3d1d451a0a41a4e14fbbbedd8f98dcbcb970 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:16 +0100 Subject: Fix missing file extension on the channels file --- home-configuration.scm | 2 +- izumi.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index b290fd6..9eb11d7 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -137,7 +137,7 @@ home-files-service-type ( list ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) - ( list ".config/guix/channels" ( local-file "channels.scm" ) ) + ( list ".config/guix/channels.scm" ( local-file "channels.scm" ) ) ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore diff --git a/izumi.org b/izumi.org index 559b2b5..43be347 100644 --- a/izumi.org +++ b/izumi.org @@ -779,7 +779,7 @@ home-files-service-type ( list ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) - ( list ".config/guix/channels" ( local-file "channels.scm" ) ) + ( list ".config/guix/channels.scm" ( local-file "channels.scm" ) ) ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore -- cgit v1.2.3 From 71226d152e6160f5ac22b17366f4ae741a328793 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:16 +0100 Subject: stop manipulating client repository with configurations --- home-configuration.scm | 8 -------- izumi.org | 8 -------- 2 files changed, 16 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 9eb11d7..f409f1a 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -150,19 +150,11 @@ (pull-guix "guix pull ") (reconfigure-home (string-append - "git -C " - configuration-prefix - " pull --rebase=true " - and "guix home reconfigure " configuration-prefix "home-configuration.scm ")) (reconfigure-system (string-append - "git -C " - configuration-prefix - " pull --rebase=true " - and "sudo guix system reconfigure " configuration-prefix "system-configuration.scm ")) diff --git a/izumi.org b/izumi.org index 2faf761..e29b5a2 100644 --- a/izumi.org +++ b/izumi.org @@ -837,19 +837,11 @@ (pull-guix "guix pull ") (reconfigure-home (string-append - "git -C " - configuration-prefix - " pull --rebase=true " - and "guix home reconfigure " configuration-prefix "home-configuration.scm ")) (reconfigure-system (string-append - "git -C " - configuration-prefix - " pull --rebase=true " - and "sudo guix system reconfigure " configuration-prefix "system-configuration.scm ")) -- cgit v1.2.3 From 38a87de2d6d1f71530c8590d2ae9db5d142f8e6f Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:16 +0100 Subject: Allow cgit to see gitolite repositories The gitolite service is implemented in such a way, that only the git group can access the gitolite home directory. This blocks cgit from accessing the repositories subfolder. The simple addition of the executable bit on the /var/lib/gitolite directory allows the access to the desired subfolder without actually exposing any other contents of the gitolite home directory. Additionaly a reminder to upstream this change is emitted on each system reconfiguration. --- home-configuration.scm | 6 +++++- izumi.org | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index f409f1a..86fb5d6 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -157,7 +157,11 @@ (string-append "sudo guix system reconfigure " configuration-prefix - "system-configuration.scm ")) + "system-configuration.scm " + and + "sudo chmod 751 /var/lib/gitolite " + and + "echo 'WARNING: Upstream the correct permission bits to gitolite.'")) (update-system (string-append pull-guix diff --git a/izumi.org b/izumi.org index daf3472..0fd8277 100644 --- a/izumi.org +++ b/izumi.org @@ -843,7 +843,11 @@ (string-append "sudo guix system reconfigure " configuration-prefix - "system-configuration.scm ")) + "system-configuration.scm " + and + "sudo chmod 751 /var/lib/gitolite " + and + "echo 'WARNING: Upstream the correct permission bits to gitolite.'")) (update-system (string-append pull-guix -- cgit v1.2.3 From bc88cebdf3337b74521e0e5b093d4bb1e5c060a6 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 09:51:16 +0100 Subject: Set emacsclient as the default editor Vim being the editor that pops on every git commit is a problem for me. My editor of choice is Emacs. The EDITOR variable is set to "emacsclient -nw" in order to use emacs whenever an editor is needed. --- home-configuration.scm | 6 +++++- izumi.org | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 86fb5d6..0bb7c22 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -141,7 +141,11 @@ ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore - ( local-file "home-files/git-ignore.conf" ) ) ) )) + ( local-file "home-files/git-ignore.conf" ) ) ) ) + (simple-service + 'environment-variables + home-environment-variables-service-type + `(("EDITOR" . "emacsclient -nw")))) (list (let* ((and "&& ") diff --git a/izumi.org b/izumi.org index 0fd8277..0a9f776 100644 --- a/izumi.org +++ b/izumi.org @@ -774,7 +774,11 @@ #+BEGIN_SRC scheme (list <> - <>) + <> + (simple-service + 'environment-variables + home-environment-variables-service-type + `(("EDITOR" . "emacsclient -nw")))) #+END_SRC #+NAME: SHELLS -- cgit v1.2.3 From ec31546372241b1593021751fa46c49631eb4bf1 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 14:16:38 +0100 Subject: Add alias to emacsclient -nw It was getting tiring to keep typing the full emacsclient command each I wanted to write some code. Alias it to simple "edit". --- home-configuration.scm | 1 + izumi.org | 1 + 2 files changed, 2 insertions(+) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 0bb7c22..9877ebe 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -180,6 +180,7 @@ (home-bash-configuration (aliases `(("collect-garbage" . ,collect-garbage) + ("edit" . "$EDITOR") ("pull-guix" . ,pull-guix) ("reconfigure-home" . ,reconfigure-home) ("reconfigure-system" . ,reconfigure-system) diff --git a/izumi.org b/izumi.org index 187eaf5..c383451 100644 --- a/izumi.org +++ b/izumi.org @@ -867,6 +867,7 @@ (home-bash-configuration (aliases `(("collect-garbage" . ,collect-garbage) + ("edit" . "$EDITOR") ("pull-guix" . ,pull-guix) ("reconfigure-home" . ,reconfigure-home) ("reconfigure-system" . ,reconfigure-system) -- cgit v1.2.3 From 1a284fa4279fc2f4085a827b24de5d60c6037502 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Tue, 16 Jan 2024 11:47:49 +0100 Subject: Repair ORG-FC package After transfer to the proper git server and removal of git-daemon, the emacs-org-fc package broke due to the dangling repository link. Another problem found was that the forcible rewrite to the current email address of my patches, the commit hashes have changed. This commit fixes those problems. --- home-configuration.scm | 4 ++-- izumi.org | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 9877ebe..1b2cbe2 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -63,7 +63,7 @@ (list emacs-guix emacs-nix-mode) (list (let - ((commit* "cfab3eb8e1c25640439f10789872e28872d656a0")) + ((commit* "wip-algo-tn")) (package (name "emacs-org-fc") (version (git-version "0.1.0" "0" commit*)) @@ -72,7 +72,7 @@ (method git-fetch) (uri (git-reference - (url "git://localhost/marek/org-fc") + (url "https://git.marekpasnikowski.pl/org-fc.git") (commit commit*))) (file-name (git-file-name name version)) (sha256 (base32 "0x8bxjh4r1wqh48f69x8k6gxfpixhwci365n0rh827csfjaqs5hg")))) diff --git a/izumi.org b/izumi.org index b88e976..44c0d41 100644 --- a/izumi.org +++ b/izumi.org @@ -880,7 +880,7 @@ #+BEGIN_SRC scheme (list (let - ((commit* "cfab3eb8e1c25640439f10789872e28872d656a0")) + ((commit* "wip-algo-tn")) (package (name "emacs-org-fc") (version (git-version "0.1.0" "0" commit*)) @@ -889,7 +889,7 @@ (method git-fetch) (uri (git-reference - (url "git://localhost/marek/org-fc") + (url "https://git.marekpasnikowski.pl/org-fc.git") (commit commit*))) (file-name (git-file-name name version)) (sha256 (base32 "0x8bxjh4r1wqh48f69x8k6gxfpixhwci365n0rh827csfjaqs5hg")))) -- cgit v1.2.3 From 8c9f2c66672004d172cb27fa4208a8a53dbee79c Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Tue, 16 Jan 2024 12:00:08 +0100 Subject: Repair the home-bash-configuration service While searching for a way to ensure $GUIX_PROFILE is always set, I found out that the bash service should not be declared explicitly, but extended instead. This commit solves both problems by switching to home-bash-extension and then sourcing the .profile file within .bashrc . The .profile file is sourced explicitly, because sourcing indirectly by means of .bash_profile opens an infinite loop. As it turned out, the .bash_profile file sources .bashrc . --- home-configuration.scm | 8 +++++--- izumi.org | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 1b2cbe2..101dce2 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -175,13 +175,15 @@ reconfigure-home and collect-garbage))) - (service + (simple-service + 'bash-extension home-bash-service-type - (home-bash-configuration + (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)))))))))) + ("update-system" . ,update-system))) + (bashrc (list (plain-file "source-home-profile" "source ~/.profile\n")))))))))) diff --git a/izumi.org b/izumi.org index 44c0d41..02a7de5 100644 --- a/izumi.org +++ b/izumi.org @@ -848,16 +848,18 @@ reconfigure-home and collect-garbage))) - (service + (simple-service + 'bash-extension home-bash-service-type - (home-bash-configuration + (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)))))) + ("update-system" . ,update-system))) + (bashrc (list (plain-file "source-home-profile" "source ~/.profile\n")))))) #+END_SRC * [[https://www.leonrische.me/fc/][Emacs-Org-FC-TN]] -- cgit v1.2.3 From f1a8593c6252a98ffcc964d2245bbf02a2aed0b6 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Tue, 16 Jan 2024 15:44:55 +0100 Subject: Enable cryptography for git Configure the GPG key for git to use. --- home-configuration.scm | 1 + home-files/gitconfig | 4 ++++ izumi.org | 1 + 3 files changed, 6 insertions(+) create mode 100644 home-files/gitconfig (limited to 'home-configuration.scm') diff --git a/home-configuration.scm b/home-configuration.scm index 101dce2..3e61353 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -138,6 +138,7 @@ ( list ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) ( list ".config/guix/channels.scm" ( local-file "channels.scm" ) ) + ( list ".gitconfig" ( local-file "home-files/gitconfig")) ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore diff --git a/home-files/gitconfig b/home-files/gitconfig new file mode 100644 index 0000000..4e9c1ca --- /dev/null +++ b/home-files/gitconfig @@ -0,0 +1,4 @@ +[user] + email = marek@marekpasnikowski.pl + name = Marek Paśnikowski + signingkey = 6D81B1207711899F diff --git a/izumi.org b/izumi.org index 02a7de5..25cf9ab 100644 --- a/izumi.org +++ b/izumi.org @@ -803,6 +803,7 @@ ( list ( list ".emacs" ( local-file "home-files/emacs-configuration.el" ) ) ( list ".config/guix/channels.scm" ( local-file "channels.scm" ) ) + ( list ".gitconfig" ( local-file "home-files/gitconfig")) ( list ".config/git/ignore" ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore -- cgit v1.2.3