|
@@ -0,0 +1,96 @@
|
|
|
+(define-module (mastostart-gnu system mastostart)
|
|
|
+ #:use-module (gnu)
|
|
|
+ #:use-module (guix packages)
|
|
|
+ #:use-module (gnu packages databases)
|
|
|
+ #:use-module (guix packages)
|
|
|
+ #:use-module (guix build syscalls)
|
|
|
+ #:use-module (guix monads)
|
|
|
+ #:use-module (guix store)
|
|
|
+ #:use-module (guix gexp)
|
|
|
+ #:use-module (mastostart-gnu services mastostart))
|
|
|
+
|
|
|
+(use-service-modules databases
|
|
|
+ networking
|
|
|
+ shepherd
|
|
|
+ ssh
|
|
|
+ web)
|
|
|
+
|
|
|
+(define-public mastostart-conf
|
|
|
+ (operating-system
|
|
|
+ (locale "it_IT.utf8")
|
|
|
+ (timezone "Europe/Rome")
|
|
|
+ (host-name "mastostart")
|
|
|
+ (keyboard-layout
|
|
|
+ (keyboard-layout "it" "nodeadkeys"))
|
|
|
+
|
|
|
+ (bootloader
|
|
|
+ (bootloader-configuration
|
|
|
+ (bootloader grub-bootloader)
|
|
|
+ (target "/dev/sda")
|
|
|
+ (keyboard-layout keyboard-layout)))
|
|
|
+
|
|
|
+ (file-systems
|
|
|
+ (cons* (file-system
|
|
|
+ (mount-point "/")
|
|
|
+ (device (file-system-label "root"))
|
|
|
+ (type "ext4"))
|
|
|
+ %base-file-systems))
|
|
|
+
|
|
|
+ (packages
|
|
|
+ (append
|
|
|
+ (map specification->package
|
|
|
+ '("glibc-utf8-locales"
|
|
|
+ "font-dejavu"
|
|
|
+ "font-gnu-freefont"
|
|
|
+ "gs-fonts"
|
|
|
+ "mariadb"
|
|
|
+ "php"
|
|
|
+ "rsync"))
|
|
|
+ `(,mastostart)
|
|
|
+ %base-packages))
|
|
|
+
|
|
|
+ (services
|
|
|
+ (append
|
|
|
+ (list (service dhcp-client-service-type)
|
|
|
+ (mysql-service)
|
|
|
+ (service openssh-service-type
|
|
|
+ (openssh-configuration
|
|
|
+ (port-number 10022)
|
|
|
+ (permit-root-login #t)))
|
|
|
+ (service httpd-service-type
|
|
|
+ (httpd-configuration
|
|
|
+ (config
|
|
|
+ (httpd-config-file
|
|
|
+ (server-name "127.0.0.1")
|
|
|
+ (listen '("8080"))
|
|
|
+ (document-root "/var/www")
|
|
|
+ (modules (cons*
|
|
|
+ (httpd-module
|
|
|
+ (name "rewrite_module")
|
|
|
+ (file "modules/mod_rewrite.so"))
|
|
|
+ (httpd-module
|
|
|
+ (name "proxy_module")
|
|
|
+ (file "modules/mod_proxy.so"))
|
|
|
+ (httpd-module
|
|
|
+ (name "proxy_fcgi_module")
|
|
|
+ (file "modules/mod_proxy_fcgi.so"))
|
|
|
+ %default-httpd-modules))
|
|
|
+ (extra-config (list "\
|
|
|
+<Directory \"/exchange\">
|
|
|
+ AllowOverride All
|
|
|
+</Directory>
|
|
|
+
|
|
|
+<FilesMatch \\.php$>
|
|
|
+ SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
|
|
|
+</FilesMatch>"))))))
|
|
|
+
|
|
|
+ (service php-fpm-service-type
|
|
|
+ (php-fpm-configuration
|
|
|
+ (socket "/var/run/php-fpm.sock")
|
|
|
+ (socket-group "httpd")))
|
|
|
+
|
|
|
+ (extra-special-file "/usr/bin/env"
|
|
|
+ (file-append coreutils "/bin/env")))
|
|
|
+ %base-services))))
|
|
|
+
|
|
|
+mastostart-conf
|