summaryrefslogtreecommitdiff
path: root/src/guix/system.scm
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-23 06:08:25 -0300
committerEuAndreh <eu@euandre.org>2024-08-23 06:08:25 -0300
commit7215d8413cbcb8bc79fda76672541d229e354da4 (patch)
tree369a09fb7f28818eca57812e27e7a78b42dbdc5d /src/guix/system.scm
parentsystem.scm: Remove cgit and enable git-daemon's git:// server (diff)
downloadasami-7215d8413cbcb8bc79fda76672541d229e354da4.tar.gz
asami-7215d8413cbcb8bc79fda76672541d229e354da4.tar.xz
cat src/guix/packages.scm >> src/guix/system.scm
Diffstat (limited to 'src/guix/system.scm')
-rw-r--r--src/guix/system.scm53
1 files changed, 41 insertions, 12 deletions
diff --git a/src/guix/system.scm b/src/guix/system.scm
index 677fcc2..536f33e 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -19,19 +19,48 @@
+(define (cat name s)
+ (string-trim-right
+ (pkg:slurp
+ (string-append "src/versions/" name "/" s))))
+
+(define (go-latest pkg)
+ (let* ((name (package-name pkg))
+ (version (cat name "version"))
+ (checksum (cat name "sha256")))
+ (package
+ (inherit pkg)
+ (version version)
+ (source
+ (origin
+ (inherit (package-source pkg))
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url
+ (pkg:str "git://papo.im/" name))
+ (commit version)))
+ (sha256
+ (base32 checksum))
+ (file-name
+ (git-file-name name version))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments pkg)
+ ((#:make-flags _flags)
+ #~(list
+ "-e"
+ (string-append "PREFIX=" #$output)
+ (string-append "VERSION=" #$version)
+ (string-append "CC=" #$(cc-for-target)))))))))
+
(define (path s)
;; src/guix/system.scm + ../../../ = ./
(pkg:str (dirname (dirname (dirname (current-filename)))) "/" s))
-(define +users+
- `(("andre" "EuAndreh" ("wheel") ,(path "src/keys/SSH/andre.pub.txt"))))
-
-(add-to-load-path (dirname (current-filename)))
-(use-modules
- ((packages) #:prefix packages:))
-
+(define +users+
+ `(("andre" "EuAndreh" ("wheel") ,(path "src/keys/SSH/andre.pub.txt"))))
(define +ipv4+ "216.238.73.1")
(define +ipv6+ "2001:19f0:b400:1582:5400:04ff:fea9:370e")
@@ -104,11 +133,11 @@
(service ntp-service-type)
(service dhcp-client-service-type)
(service fail2ban-service-type)
- (service binder-service-type (pkg:binder-configuration (package packages:binder)))
- ;; (service glaze-service-type (pkg:glaze-configuration (package packages:glaze)))
- ;; (service untls-service-type (pkg:untls-configuration (package packages:untls)))
- ;; (service pkg:wscat-service-type (pkg:wscat-configuration (package packages:wscat)))
- ;; (service pkg:papod-service-type (pkg:papod-configuration (package packages:papod)))
+ (service binder-service-type (pkg:binder-configuration (package (go-latest pkg:binder))))
+ ;; (service glaze-service-type (pkg:glaze-configuration (package (go-latest pkg:glaze))))
+ ;; (service untls-service-type (pkg:untls-configuration (package (go-latest pkg:untls))))
+ ;; (service pkg:wscat-service-type (pkg:wscat-configuration (package (go-latest pkg:wscat))))
+ ;; (service pkg:papod-service-type (pkg:papod-configuration (package (go-latest pkg:papod))))
(service knot-service-type (q:knot-zones-configuration +tld+ +ipv4+ +ipv6+))
(service openssh-service-type (q:openssh-default-configuration (pkg:users->keys +users+)))
(service certbot-service-type (q:tld-certbot-configuration +tld+))