summaryrefslogtreecommitdiff
path: root/abdul-home/home-config.scm
diff options
context:
space:
mode:
Diffstat (limited to 'abdul-home/home-config.scm')
-rw-r--r--abdul-home/home-config.scm84
1 files changed, 84 insertions, 0 deletions
diff --git a/abdul-home/home-config.scm b/abdul-home/home-config.scm
new file mode 100644
index 0000000..8f46e84
--- /dev/null
+++ b/abdul-home/home-config.scm
@@ -0,0 +1,84 @@
+(use-modules ((gnu home) #:select (home-environment))
+ ((gnu home services) #:select
+ (home-activation-service-type home-files-service-type service
+ service-extension service-type))
+ ((gnu home services shells) #:select
+ (home-bash-configuration home-bash-service-type))
+ ((gnu home services shepherd) #:select
+ (home-shepherd-service-type shepherd-service))
+ ((gnu packages messaging) #:select (matterbridge))
+ ((gnu packages minetest) #:select (minetest-server))
+ ((gnu system shadow) #:select (%default-dotguile))
+ ((guix gexp) #:select (file-append gexp local-file plain-file)))
+
+(define home-matterbridge-services
+ (const
+ (list (shepherd-service
+ (provision '(mattermost))
+ (modules '((shepherd support))) ;for '%user-log-dir'
+ (start #~(make-forkexec-constructor
+ '(#$(file-append matterbridge "/bin/matterbridge")
+ "--conf"
+ #$(local-file "config.toml"))
+ #:log-file (string-append %user-log-dir
+ "/matterbridge.log")))
+ (stop #~(make-kill-destructor))
+ (documentation "Start local matterbridge.")))))
+
+(define home-matterbridge-service-type
+ (service-type
+ (name 'home-matterbridge)
+ (extensions
+ (list (service-extension home-shepherd-service-type
+ home-matterbridge-services)))
+ (description "Bridge messaging platforms using matterbridge.")
+ (default-value #f)))
+
+(define home-minetest-services
+ (const
+ (list (shepherd-service
+ (provision '(minetest))
+ (modules '((shepherd support))) ;for '%user-log-dir'
+ (start #~(make-forkexec-constructor
+ '(#$(file-append minetest-server "/bin/minetestserver")
+ "--gameid" "minetest"
+ "--config" #$(local-file "abdultest.conf"))
+ #:environment-variables
+ (cons
+ (format #f "MINETEST_SUBGAME_PATH=~a/share/minetest/games"
+ #$(@@ (gnu packages minetest) minetest-data))
+ (default-environment-variables))
+ #:log-file (string-append %user-log-dir
+ "/minetest.log")))
+ (stop #~(make-kill-destructor))
+ (documentation "Start Minetest block game like Minecraft.")))))
+
+(define home-minetest-activation
+ (const #~(mkdir-p "~/.local/minetest/abdultest")))
+
+(define home-minetest-service-type
+ (service-type
+ (name 'home-minetest)
+ (extensions
+ (list (service-extension home-shepherd-service-type
+ home-minetest-services)
+ (service-extension home-activation-service-type
+ home-minetest-activation)))
+ (description "Minetest block game like Minecraft.")
+ (default-value #f)))
+
+(home-environment
+ (services
+ (list
+ (service home-bash-service-type
+ (home-bash-configuration
+ (bash-profile (list (plain-file
+ "bash_ps1"
+ "export PS1=\"\nā†“ā† $PS1\nā†’ \"")))))
+
+ (service home-files-service-type
+ `((".guile" ,%default-dotguile)))
+
+ ;;(service home-matterbridge-service-type)
+
+ (service home-minetest-service-type))))