123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- (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 %apache-listen-ports '("8080"))
- (define-public %apache-server-name "127.0.0.1")
- (define-public %apache-webroot "/srv")
- (define-public %apache-conf
- (string-append "
- <Directory / >
- Options FollowSymLinks
- AllowOverride All
- </Directory>
- <FilesMatch \\.php$>
- SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
- </FilesMatch>"))
- (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"))
- %base-packages))
- (services
- (append
- (list (service dhcp-client-service-type)
- (mysql-service)
- (service mastostart-service-type
- (mastostart-configuration
- (webroot %apache-webroot)))
- (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 %apache-server-name)
- (listen %apache-listen-ports)
- (document-root %apache-webroot)
- (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 %apache-conf))))))
- (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
|