diff options
author | Thanos Apollo <[email protected]> | 2024-06-25 01:02:54 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-06-25 01:17:56 +0300 |
commit | a61b7070d4106ce3fe50fbba7992345bb1d61277 (patch) | |
tree | 5f849f2d90b75acedfcde53216409905dfa6dce9 | |
parent | 08d4fbe205f272eaa889a77197f7157e5ba80668 (diff) |
guix:(system-create) Update networking & clean up services
-rw-r--r-- | guix/system-create.scm | 100 |
1 files changed, 44 insertions, 56 deletions
diff --git a/guix/system-create.scm b/guix/system-create.scm index 7848371..4774749 100644 --- a/guix/system-create.scm +++ b/guix/system-create.scm @@ -26,23 +26,6 @@ "waybar" "gnupg" "pinentry" "font-jetbrains-mono" "docker" "docker-cli")) -(define thanos/desktop-containers - (list - (oci-container-configuration - (image "ollama/ollama:rocm") - (network "host") - (ports - '(("11434" . "11434"))) - (volumes - '(("/ollama" . "/root/.ollama")))) - (oci-container-configuration - (image "jellyfin/jellyfin") - (network "host") - (volumes - '(("/home/jelly/config" . "/config") - ("/home/jelly/cache" . "/cache") - ("/hdd" . "/media")))))) - (define* (system-create #:key (system-packages thanos/system-packages) (kernel linux-lts) @@ -81,19 +64,14 @@ ;; services, run 'guix system search KEYWORD' in a terminal. (services (append (list - ;; Containers (service docker-service-type) - (when (string= hostname "zeus") - (service oci-container-service-type - thanos/desktop-containers)) - (service transmission-daemon-service-type (transmission-daemon-configuration ;; Accept requests from this and other hosts on the ;; local network (rpc-whitelist-enabled? #t) - (rpc-whitelist '("::1" "127.0.0.1" "192.168.0.*")) + (rpc-whitelist '("::1" "127.0.0.1" "192.168.*")) (rpc-username "z3us") (rpc-password "{eab35f5df5b1e2691acf11f49be1b1dcffa55a59FyE5eNd8"))) @@ -101,9 +79,9 @@ (service elogind-service-type) (service console-font-service-type - (map (lambda (tty) - ;; Use a larger font for HIDPI screens - (cons tty (file-append + (map (lambda (tty) + ;; Use a larger font for HIDPI screens + (cons tty (file-append font-terminus "/share/consolefonts/ter-132n"))) '("tty1" "tty2" "tty3"))) @@ -126,56 +104,66 @@ (greetd-terminal-configuration (terminal-vt "5")))))) - ;; (service gnome-desktop-service-type) - (service openssh-service-type (openssh-configuration (permit-root-login 'prohibit-password))) (service screen-locker-service-type - (screen-locker-configuration + (screen-locker-configuration (name "swaylock") (program (file-append swaylock "/bin/swaylock")) (using-pam? #t) (using-setuid? #f))) - ;; Networking services - (service network-manager-service-type - (network-manager-configuration - (dns "none"))) - - (service wpa-supplicant-service-type) ;; Needed by NetworkManager - (service modem-manager-service-type) ;; For cellular modems + ;; Networking services + (service tailscale-service-type) + (service dhcp-client-service-type) + (service iwd-service-type) + (service modem-manager-service-type) ;; For cellular modems polkit-wheel-service - (service tor-service-type) (service cups-service-type) - ;; (service avahi-service-type) - (service udisks-service-type) - (service upower-service-type) - (service cups-pk-helper-service-type) - (service geoclue-service-type) - ;; (service polkit-service-type) - ;; (service dbus-root-service-type) - fontconfig-file-system-service ;; Manage the fontconfig cache - - ;; Power and thermal management services - (service thermald-service-type) - (service tlp-service-type - (tlp-configuration - (cpu-boost-on-ac? #t) - (wifi-pwr-on-bat? #t))) + (service udisks-service-type) + (service upower-service-type) + (service cups-pk-helper-service-type) + (service geoclue-service-type) - (service tailscale-service-type) - ;; Use smartdns to solve tailscale issues - (service smartdns-service-type)) + fontconfig-file-system-service ;; Manage the fontconfig cache + + ;; Power and thermal management services + (service thermald-service-type) + (service tlp-service-type + (tlp-configuration + (cpu-boost-on-ac? #t) + (wifi-pwr-on-bat? #t)))) (modify-services %base-services (delete login-service-type) (delete mingetty-service-type) - (delete console-font-service-type)))) + (delete console-font-service-type)) + ;; Services specifics for zeus + (if (string= hostname "zeus") + (list + (service oci-container-service-type + (list + (oci-container-configuration + (image "ollama/ollama:rocm") + (network "host") + (ports + '(("11434" . "11434"))) + (volumes + '(("/ollama" . "/root/.ollama")))) + (oci-container-configuration + (image "jellyfin/jellyfin") + (network "host") + (volumes + '(("/home/jelly/config" . "/config") + ("/home/jelly/cache" . "/cache") + ("/hdd" . "/media"))))))) + ;; For everything else + (list)))) (bootloader (bootloader-configuration |