Files
-----
-* home.scm - home directory configuration for the GNU Guix operating system.
-* system.scm - system configuration for the GNU Guix operating system.
-* conf/home/ - custom GNU Guix programs and services for the home directory.
-* <program>/ - program-specific dotfiles.
+* home.scm - home directory configuration for the GNU Guix operating system.
+* system.scm - system configuration for the GNU Guix operating system.
+* conf/home/ - custom GNU Guix programs and services for the home directory.
+* conf/common/ - custom GNU Guix programs and services shared by home and system
+ configurations.
+* <program>/ - program-specific dotfiles.
--- /dev/null
+;; Copyright (c) 2022 Jakub Czajka <jakub@ekhem.eu.org>
+;; License: GPL-3.0 or later.
+;;
+;; local-package.scm - install package from local source code.
+
+(define-module (conf common local-package)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:export (local-package))
+
+(define (local-package guix-package)
+ (define guix-package-name
+ (package-name guix-package))
+
+ (define local-package-name
+ (string-concatenate
+ (list "conf-" guix-package-name)))
+
+ (define local-source-path
+ (string-concatenate
+ (list (getenv "GUIX_PACKAGE_PATH") "/" guix-package-name)))
+
+ (define local-source
+ (local-file local-source-path
+ local-package-name
+ #:recursive? #t))
+
+ (package
+ (inherit guix-package)
+ (name local-package-name)
+ (source local-source)))