;; This is an operating system configuration template ;; for a "bare bones" setup, with no X11 display server. (use-modules (gnu)) (use-service-modules networking version-control web) (use-package-modules curl version-control) (define %make-git-repository ;; Create Git repository in /srv/git/test. #~(begin (mkdir-p "/srv/git/test") (system* (string-append #$git "/bin/git") "-C" "/srv/git/test" "init"))) (define %cgit-configuration-nginx (list (nginx-server-configuration (root cgit) (locations (list (nginx-location-configuration (uri "@cgit") (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;" "fastcgi_param PATH_INFO $uri;" "fastcgi_param QUERY_STRING $args;" "fastcgi_param HTTP_HOST $server_name;" "fastcgi_pass 127.0.0.1:9000;"))))) (try-files (list "$uri" "@cgit")) (http-port 19418) (https-port #f) (ssl-certificate #f) (ssl-certificate-key #f)))) (operating-system (host-name "komputilo") (timezone "Europe/Moscow") (locale "en_US.utf8") ;; Assuming /dev/sdX is the target hard disk, and "my-root" is ;; the label of the target root file system. (bootloader (grub-configuration (target "/dev/sda") (terminal-outputs '(console)))) (file-systems (cons (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4")) %base-file-systems)) ;; This is where user accounts are specified. The "root" ;; account is implicit, and is initially created with the ;; empty password. (users (cons (user-account (name "alice") (comment "Bob's sister") (group "users") ;; Adding the account to the "wheel" group ;; makes it a sudoer. Adding it to "audio" ;; and "video" allows the user to play sound ;; and access the webcam. (supplementary-groups '("wheel" "audio" "video")) (home-directory "/home/alice")) %base-user-accounts)) (packages (cons* git curl %base-packages)) ;; Add services to the baseline: a DHCP client and ;; an SSH server. (services (cons* (dhcp-client-service) (service nginx-service-type) (service fcgiwrap-service-type) (service cgit-service-type (cgit-configuration (nginx %cgit-configuration-nginx))) (simple-service 'make-git-repository activation-service-type %make-git-repository) %base-services)))