;;; Tyreunom's system administration and configuration tools. ;;; ;;; Copyright © 2019 Julien Lepiller ;;; ;;; This program is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation, either version 3 of the License, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see . (define-module (home) #:use-module (guix build union) #:use-module (guix build utils) #:use-module (guix build-system trivial) #:use-module (guix gexp) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (home build utils) #:export (home)) (define (home inputs) (define union (computed-file "home" #~(begin (use-modules (guix build union)) (union-build #$output '#$inputs)) #:options '(#:local-build? #t #:modules ((guix build union))))) (package (name "tyreunom-home") (version "0") (source #f) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils) (home build utils)) #:builder (begin (use-modules (guix build utils) (home build utils)) (mkdir-p (home-file %outputs ".config")) ;; TODO: manage profiles, plugins, etc through guix. (symlink "/data/tyreunom/.mozilla" (home-file %outputs ".mozilla")) ;; For guix (symlink "/data/tyreunom/.config/guix" (home-file %outputs ".config/guix")) (symlink "/data/tyreunom/.guix-profile" (home-file %outputs ".guix-profile")) ;; symlink writeable directories (symlink "/data/tyreunom/.local" (home-file %outputs ".local")) (symlink "/data/tyreunom/.cache" (home-file %outputs ".cache")) ;; rest of the files (with-directory-excursion (assoc-ref %build-inputs "union") (for-each (lambda (f) (mkdir-p (home-file %outputs (dirname f))) (symlink (string-append (assoc-ref %build-inputs "union") "/" f) (home-file %outputs f))) (find-files "." ".*")))))) (inputs `(("union" ,union))) (home-page "") (synopsis "") (description "") (license gpl3+)))