summaryrefslogtreecommitdiff
path: root/guix/uranus.scm
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-10-14 13:58:14 +0300
committerThanos Apollo <[email protected]>2024-10-14 18:05:08 +0300
commitf7e88aaaa9d6e6f6a2105592909f54da1b237be9 (patch)
treec4484499f218fe977b28ab93751fbe987a4d876e /guix/uranus.scm
parentead72e5f63a109fadaba64ff8b9ae6e9c204c450 (diff)
guix: Add uranus (server).
Diffstat (limited to 'guix/uranus.scm')
-rw-r--r--guix/uranus.scm105
1 files changed, 105 insertions, 0 deletions
diff --git a/guix/uranus.scm b/guix/uranus.scm
new file mode 100644
index 0000000..3a99f50
--- /dev/null
+++ b/guix/uranus.scm
@@ -0,0 +1,105 @@
+(define-module (server)
+ #:use-module (gnu)
+ #:use-module (gnu services)
+ #:use-module (gnu services web)
+ #:use-module (gnu services dbus)
+ #:use-module (gnu services docker)
+ #:use-module (gnu services version-control)
+ #:use-module (gnu services cgit)
+ #:use-module (rosenthal services child-error)
+ #:use-module (rosenthal services networking))
+
+(use-service-modules cups desktop networking ssh docker xorg)
+
+(operating-system
+ (locale "en_US.utf8")
+ (timezone "Europe/Athens")
+ (keyboard-layout (keyboard-layout "us"))
+ (host-name "uranus")
+
+ ;; The list of user accounts ('root' is implicit).
+ (users (cons* (user-account
+ (name "thanos")
+ (comment "Thanos Apollo")
+ (group "users")
+ (home-directory "/home/thanos")
+ (supplementary-groups '("wheel" "netdev" "audio" "video" "docker")))
+ %base-user-accounts))
+
+ ;; Below is the list of system services. To search for available
+ ;; services, run 'guix system search KEYWORD' in a terminal.
+ (packages
+ (append (map specification->package '("docker" "dbus" "docker-cli")) %base-packages))
+ (services
+ (append (list
+ ;; To configure OpenSSH, pass an 'openssh-configuration'
+ ;; record as a second argument to 'service' below.
+ (service openssh-service-type
+ (openssh-configuration
+ (permit-root-login 'prohibit-password)))
+
+ (service nginx-service-type
+ (nginx-configuration
+ (server-blocks
+ (list (nginx-server-configuration
+ (server-name '("thanosapollo.org"))
+ (root "/srv/http/thanosapollo.org")
+ (listen '("*:8000"))
+ (ssl-certificate #f)
+ (ssl-certificate-key #f))))))
+
+ (service cgit-service-type
+ (cgit-configuration
+ (root-desc "Freely you have received; freely give. | Mathew 10:8")
+ (project-list '("dotfiles" "gnosis" "yeetube"
+ "hecate" "pcmpl-emerge" "pcmpl-rc"
+ "pcmpl-tailscale"))
+ (repository-directory "/srv/git")
+ (root-title "Thanos Apollo | Git server")
+ ;; (root-readme "/srv/git/README")
+ (clone-prefix '("https://git.thanosapollo.org"))))
+
+ (service gitolite-service-type
+ (gitolite-configuration
+ (admin-pubkey (plain-file
+ "thanosapollo.pub"
+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDWbBxe1gu9IQEKSIu22Xz7n/w/kCHWl/+7jgDd2YBeqcnIZ3d/s6TGIFDlrZQpSjwkFHke78jk6OW2/LzGn7MH0mYldqdUlbBrAWK1INeQPsdE6bPysKjufLt/E18as1E+gEd1H4lcw63SU2jr+hm/XMU/pK7sCFEbu1n2kAv5qedg6ik0+Ts9y3U9W11DzShATg1TaotgcXvkO+Iaup7wsaPYfUp6MkNBEE9dXg3hrUrtjozlr9bIfcpLwwkG/ZpQJdSPcB/6X9dBg3Crop6iK272vlyvmGohBrvkvuC8EpDVZu+i5xfwr1VAv/kWKdQQyovlJLHC6+S5gGLIE9RC8J5rHSrUkuOcQOhwvEVXThLbtwiXA3ozsyM6Mh/5jVIKc8erqvLrC9+dGh98mAajme4TGFw/agZ5uo/uKehNFGwBEqjXQHFJfjmW0OhjAtNLg2/4E7TuTV+0qtvvxPLEOKiuHDWsVC06OFj5UbLpvMR790j1WhODHVcVlKskop8= thanos@zeus"))
+ (rc-file (gitolite-rc-file
+ (umask #o0077)))))
+
+ (service elogind-service-type
+ (elogind-configuration
+ (handle-lid-switch 'ignore)))
+
+ (service dhcp-client-service-type)
+ (service ntp-service-type)
+ (service cups-service-type)
+
+ (service containerd-service-type)
+ (service docker-service-type))
+ ;; This is the default list of services we
+ ;; are appending to.
+ %base-services))
+
+ (bootloader (bootloader-configuration
+ (bootloader grub-efi-bootloader)
+ (targets (list "/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+ (swap-devices (list (swap-space
+ (target (uuid
+ "cc0005c6-0cae-4a38-ae3c-ae32009c7788")))))
+
+ ;; The list of file systems that get "mounted". The unique
+ ;; file system identifiers there ("UUIDs") can be obtained
+ ;; by running 'blkid' in a terminal.
+ (file-systems (cons* (file-system
+ (mount-point "/boot/efi")
+ (device (uuid "54F2-0DFC"
+ 'fat32))
+ (type "vfat"))
+ (file-system
+ (mount-point "/")
+ (device (uuid
+ "3575b20f-398d-4f67-9f7e-bd793a0ca332"
+ 'ext4))
+ (type "ext4")) %base-file-systems)))