aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenken <renken@shione.net>2022-09-09 18:02:28 +0200
committerRenken <renken@shione.net>2022-09-09 18:08:49 +0200
commite3706ce50fee2d4fc32f9bdaf455846422792edb (patch)
tree23dc91a66d5efacc2b17e09d83774e9f8add3834
parent3084d6586919cf4129548cd59321553e3faffb04 (diff)
downloadshione-e3706ce50fee2d4fc32f9bdaf455846422792edb.tar.gz
shione-e3706ce50fee2d4fc32f9bdaf455846422792edb.zip
home: siga: run guix on a foreign distro
-rw-r--r--README.md5
-rw-r--r--nichijou/home/host/siga.scm15
2 files changed, 13 insertions, 7 deletions
diff --git a/README.md b/README.md
index 68fae70..07b8cc7 100644
--- a/README.md
+++ b/README.md
@@ -10,11 +10,6 @@ My personal computer which runs GNU/Linux Debian testing.
## TODO
-* Pass `is-foreign-distro?` boolean which determines whether the host is running
- Guix on top of a foreign distro or not. If yes, a selected portion of packages
- will not be installed e.g., neovim should be installed using apt, plugins
- installed through Guix should work just fine.
-
# Shione
My GNU/Linux Debian stable sever which is no longer operation, it will have a
diff --git a/nichijou/home/host/siga.scm b/nichijou/home/host/siga.scm
index 2f86088..5ab32e1 100644
--- a/nichijou/home/host/siga.scm
+++ b/nichijou/home/host/siga.scm
@@ -1,5 +1,6 @@
(define-module (nichijou home host siga)
#:use-module (gnu home)
+ #:use-module (srfi srfi-1)
#:use-module ((nichijou home nvim)
#:prefix nvim:)
#:use-module ((nichijou home mpd)
@@ -9,6 +10,16 @@
#:use-module ((nichijou home zsh)
#:prefix zsh:))
+;; TODO: Think of a better approach to do this.
+;; What if a module's get-packages function expects different parameters?
+;; Should modules (packages) be forced to implement the same get-packages
+;; signature? If so, how?
+(define (apply-get-packages m)
+ (m:get-packages #:foreign-distro? #t))
+
(home-environment
- (packages (append nvim:packages mpd:packages mpv:packages zsh:packages))
- (services (append nvim:services mpd:services mpv:services zsh:services)))
+ (packages (fold append
+ (list)
+ (map apply-get-packages
+ (list mpd mpv nvim zsh))))
+ (services (append mpd:services mpv:services nvim:services zsh:services)))