home: siga: run guix on a foreign distro

This commit is contained in:
Renken 2022-09-09 18:02:28 +02:00
parent 3084d65869
commit e3706ce50f
Signed by: renken
GPG key ID: 1F2BB159B645E575
2 changed files with 13 additions and 7 deletions

View file

@ -10,11 +10,6 @@ My personal computer which runs GNU/Linux Debian testing.
## TODO ## 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 # Shione
My GNU/Linux Debian stable sever which is no longer operation, it will have a My GNU/Linux Debian stable sever which is no longer operation, it will have a

View file

@ -1,5 +1,6 @@
(define-module (nichijou home host siga) (define-module (nichijou home host siga)
#:use-module (gnu home) #:use-module (gnu home)
#:use-module (srfi srfi-1)
#:use-module ((nichijou home nvim) #:use-module ((nichijou home nvim)
#:prefix nvim:) #:prefix nvim:)
#:use-module ((nichijou home mpd) #:use-module ((nichijou home mpd)
@ -9,6 +10,16 @@
#:use-module ((nichijou home zsh) #:use-module ((nichijou home zsh)
#:prefix 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 (home-environment
(packages (append nvim:packages mpd:packages mpv:packages zsh:packages)) (packages (fold append
(services (append nvim:services mpd:services mpv:services zsh:services))) (list)
(map apply-get-packages
(list mpd mpv nvim zsh))))
(services (append mpd:services mpv:services nvim:services zsh:services)))