This repository has been archived on 2025-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
excellon-config/config.scm
2024-12-29 10:11:27 -06:00

228 lines
8.3 KiB
Scheme

;; Indicate which modules to import to access the variables
;; used in this configuration.
(use-modules (gnu))
(use-package-modules databases)
(use-service-modules cups desktop networking ssh xorg docker dbus databases)
(operating-system
(locale "en_US.utf8")
(timezone "America/Chicago")
(keyboard-layout (keyboard-layout "us"))
(host-name "excellon")
;; The list of user accounts ('root' is implicit).
(users
(cons* (user-account
(name "bartronx7")
(comment "bartronx7")
(group "users")
(home-directory "/home/bartronx7")
(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.
(services
(append (list
;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below.
(service openssh-service-type)
(service dhcp-client-service-type)
(service ntp-service-type)
(service elogind-service-type
(elogind-configuration (handle-suspend-key 'ignore)))
(service dbus-root-service-type)
(service containerd-service-type)
(service docker-service-type (docker-configuration
(environment-variables (list
"TMPDIR=/tmp/dockerd"))))
;; (service postgresql-service-type
;; (postgresql-configuration
;; (postgresql postgresql-16)
;; (data-directory "/data/postgres")))
(service oci-container-service-type (list
(oci-container-configuration
(image "miniflux/miniflux:latest")
(provision "miniflux")
(network "sandbox")
(requirement '(miniflux-db))
(ports '(
("8081" . "8080")))
(environment (list
'("DATABASE_URL" . "postgres://miniflux:99uskas0_l@miniflux-db/miniflux?sslmode=disable")
'("RUN_MIGRATIONS" . "1")
'("CREATE_ADMIN" . "1")
'("ADMIN_USERNAME" . "admin")
'("ADMIN_PASSWORD" . "982#@2gGGHjf"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "postgres:17-alpine")
(provision "miniflux-db")
(network "sandbox")
(ports '(
("5432" . "5432")))
(environment (list
'("POSTGRES_USER" . "miniflux")
'("POSTGRES_PASSWORD" . "99uskas0_l")
'("POSTGRES_DB" . "miniflux")))
(volumes (list
'("/data/docker/volumes/miniflux_db" . "/var/lib/postgresql/data"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "codeberg.org/forgejo/forgejo:9")
(provision "forgejo")
(network "sandbox")
(ports '(
("3000" . "3000")
("2222" . "22")))
(environment (list
'("USER_UID" . "1000")
'("USER_GID" . "1000")))
(volumes (list
'("/data/docker/volumes/forgejo" . "/data")
'("/etc/timezone" . "/etc/timezone:ro")
'("/etc/localtime" . "/etc/localtime:ro"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "packetriot/pktriot:latest")
(provision "pktriot")
(network "sandbox")
(volumes (list
'("/data/docker/volumes/pktriot" . "/data:rw"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "plexinc/pms-docker")
(provision "plex")
(network "sandbox")
(ports '(
("32400" . "32400")
("8324" . "8324")
("32469" . "32469")
("1900" . "1900")
("32410" . "32410")
("32412" . "32412")
("32413" . "32413")
("32414" . "32414")))
(environment (list
'("TZ" . "America/Chicago")
'("PLEX_CLAIM:" . "claim-7-N1LVT5AMco6ayhy4Tm")
'("ADVERTISE_IP:" . "http://192.168.1.3:32400/")))
(volumes (list
'("/data/docker/volumes/plex/config" . "/config")
'("/data/docker/volumes/plex/transcode" . "/transcode")
'("/data" . "/data:rw"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "postgres:15")
(provision "ente-db")
(network "ente")
(respawn? #t)
(ports '(
("5433" . "5432")))
(environment (list
'("POSTGRES_USER" . "ente")
'("POSTGRES_PASSWORD" . "00u5kas()_1")
'("POSTGRES_DB" . "ente_db")))
(volumes (list
'("/data/docker/volumes/ente/db" . "/var/lib/postgresql/data"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "ghcr.io/ente-io/server")
(provision "ente-photos")
(requirement '(ente-db))
(network "ente")
(ports '(
("8090" . "8080")
("2112" . "2112")))
(environment (list
'("ENTE_CREDENTIALS_FILE" . "/credentials.yaml")))
(volumes (list
'("/data/docker/volumes/ente/logs" . "/var/logs")
'("/data/docker/volumes/ente/museum.yaml" . "/museum.yaml:ro")
'("/data/docker/volumes/ente/credentials.yaml" . "/credentials.yaml:ro")
'("/data/docker/volumes/ente/data" . "/data:ro"))))))
(service oci-container-service-type (list
(oci-container-configuration
(image "alpine/socat")
(provision "ente-socat")
(requirement '(ente-photos minio))
(network "service:ente-photos")
(extra-arguments '("network_mode: service:museum"))
(command '("TCP-LISTEN:3200,fork,reuseaddr" "TCP:minio:3200")))))
(service oci-container-service-type (list
(oci-container-configuration
(image "minio/minio")
(provision "minio")
(network "ente")
(command '("server" "--address" ":3200" "--console-address" ":3201" "/data"))
(ports '(
("3200" . "3200")
("3201" . "3201")))
(environment (list
'("MINIO_USER" . "test")
'("MINIO_ROOT_USER" . "myminioadmin")
'("MINIO_ROOT_PASSWORD" . "u8^ll01.Qs")
'("MINIO_CONFIG_ENV_FILE" . "/etc/config.env")))
(volumes (list
'("/data/docker/volumes/minio/data" . "/data")
'("/data/docker/volumes/minio/env" . "/etc/config.env")))))))
;; (service oci-container-service-type (list
;; (oci-container-configuration
;; (image "minio/mc")
;; (provision "minio-provision")
;; (requirement '(minio))
;; (network "ente")
;; (entrypoint "sh /provision.sh")
;; (environment (list
;; '("MINIO_USER" . "test")))
;; (volumes (list
;; '("/data/docker/volumes/ente/minio_data" . "/data")
;; '("/data/docker/volumes/ente/minio-provision.sh" . "/provision.sh:ro")))))))
%base-services))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets (list "/dev/sda"))
(keyboard-layout keyboard-layout)))
;; The devices that make up the luks "docs" labelled filesystem
(mapped-devices
(list (mapped-device
(source (uuid "cf6bafca-b225-46ca-8dfc-b82fb6ab5560"))
(target "doc1")
(type luks-device-mapping))
(mapped-device
(source (uuid "05f833fb-1c68-4453-9df5-68a454f59845"))
(target "doc2")
(type luks-device-mapping))))
;; 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 "/")
(device (file-system-label "guixos"))
(type "btrfs"))
(file-system
(mount-point "/data")
(device (file-system-label "datapool"))
(type "btrfs"))
(file-system
(mount-point "/docs")
(device "/dev/mapper/doc1")
(type "btrfs"))
%base-file-systems)))