diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-05-25 10:48:53 +0200 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-05-25 11:21:09 +0200 |
commit | 24b13e12fb681dab7ceaa0a5b50e8a29675c8e15 (patch) | |
tree | e14f6e613161580247b9d1cf2aa776db3d57eea4 /services | |
parent | 2392e37c13eb69c0bdc4a038ab4f167512407500 (diff) |
services: split nonguix substitute configuration to its own module
Diffstat (limited to 'services')
-rw-r--r-- | services/distribution.scm | 34 | ||||
-rw-r--r-- | services/nonguix/substitute.scm | 32 |
2 files changed, 33 insertions, 33 deletions
diff --git a/services/distribution.scm b/services/distribution.scm index 09e6c56..378a1f0 100644 --- a/services/distribution.scm +++ b/services/distribution.scm @@ -1,40 +1,8 @@ (define-module (services distribution) #:use-module (gnu services) #:use-module (gnu services base) - #:use-module (gnu services configuration) #:use-module (gnu services desktop) - #:use-module (guix gexp)) - -;; DATA - -(define nonguix-authorized-guix-key-content - (string-append "(public-key \n" - "(ecc \n" - "(curve Ed25519) \n" - "(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#))) \n")) - -(define nonguix-authorized-guix-key-name - "nonguix-authorized-guix-key") - -(define nonguix-substitute-urls - (list "https://substitutes.nonguix.org")) - -;; ABSTRACTION 2 - -(define nonguix-authorized-guix-keys - (list (plain-file nonguix-authorized-guix-key-name - nonguix-authorized-guix-key-content))) - -;; ABSTRACTION 1 - -(define (nonguix-substitute config) - (guix-configuration (inherit config) - (substitute-urls (append %default-substitute-urls - nonguix-substitute-urls)) - (authorized-keys (append %default-authorized-guix-keys - nonguix-authorized-guix-keys)))) - -;; PUBLIC + #:use-module (services nonguix substitute)) (define-public %distribution-services (modify-services %desktop-services diff --git a/services/nonguix/substitute.scm b/services/nonguix/substitute.scm new file mode 100644 index 0000000..4cf866a --- /dev/null +++ b/services/nonguix/substitute.scm @@ -0,0 +1,32 @@ +(define-module (services nonguix substitute) + #:use-module (gnu services base) + #:use-module (guix gexp)) + +;; DATA + +(define nonguix-authorized-guix-key-content + (string-append "(public-key \n" + "(ecc \n" + "(curve Ed25519) \n" + "(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#))) \n")) + +(define nonguix-authorized-guix-key-name + "nonguix-authorized-guix-key") + +(define nonguix-substitute-urls + (list "https://substitutes.nonguix.org")) + +;; ABSTRACTION 1 + +(define nonguix-authorized-guix-keys + (list (plain-file nonguix-authorized-guix-key-name + nonguix-authorized-guix-key-content))) + +;; PUBLIC + +(define-public (nonguix-substitute config) + (guix-configuration (inherit config) + (substitute-urls (append %default-substitute-urls + nonguix-substitute-urls)) + (authorized-keys (append %default-authorized-guix-keys + nonguix-authorized-guix-keys)))) |