diff options
| author | EuAndreh <eu@euandre.org> | 2026-09-05 10:24:41 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2026-09-05 10:24:41 -0300 |
| commit | 31428f4b1bda3a32de60d78352f85249d68cfdd1 (patch) | |
| tree | e13a237a25d4380fc1cff550e39b64ebf5cf27c5 /src | |
| parent | src/guix/system.scm: Drop pijul user (diff) | |
| download | toph-31428f4b1bda3a32de60d78352f85249d68cfdd1.tar.gz toph-31428f4b1bda3a32de60d78352f85249d68cfdd1.tar.xz | |
src/guix/: Use papoim pkgs over EuAndreh packages
Diffstat (limited to 'src')
| -rw-r--r-- | src/guix/channels.scm | 6 | ||||
| -rw-r--r-- | src/guix/system.scm | 183 |
2 files changed, 75 insertions, 114 deletions
diff --git a/src/guix/channels.scm b/src/guix/channels.scm index 697eb4f..da52c60 100644 --- a/src/guix/channels.scm +++ b/src/guix/channels.scm @@ -1,12 +1,12 @@ (append (list (channel - (name 'EuAndreh) - (url "git://euandre.org/packages") + (name 'papoim) + (url "git://papo.im/pkgs") (branch "main") (introduction (make-channel-introduction - "d749e053e6db365069cb9b2ef47a78b06f9e7361" + "b28de051e942840c3b202ce728053d450a6ca803" (openpgp-fingerprint "5BDA E9B8 B2F6 C6BC BB0D 6CE5 81F9 0EC3 CD35 6060"))))) %default-channels) diff --git a/src/guix/system.scm b/src/guix/system.scm index 6526ac7..fd544a9 100644 --- a/src/guix/system.scm +++ b/src/guix/system.scm @@ -1,7 +1,6 @@ (use-modules - ((xyz euandreh heredoc) #:prefix heredoc:) - ((org euandre packages) #:prefix pkg:) - ((org euandre queue) #:prefix q:) + ((im papo packages) #:prefix pkgs:) + ((org euandre packages) #:prefix packages:) (gnu)) (use-package-modules version-control @@ -16,7 +15,6 @@ ssh vpn web) -(heredoc:enable-syntax) @@ -25,15 +23,15 @@ (dirname (dirname (dirname (current-filename))))) (define (path s) - (pkg:str +working-dir+ "/" s)) + (pkgs:str +working-dir+ "/" s)) + +(define +admingroups+ + '("wheel" "becomesecretskeeper")) (define +users+ - `(("andreh" - "EuAndreh" - ("wheel" "become-secrets-keeper") - ,(path "src/keys/SSH/andreh.pub.txt")))) + `(("andreh" "EuAndreh" ,+admingroups+ ,(path "src/keys/SSH/andreh.pub.txt")))) -(define file (compose string-trim-right pkg:slurp path)) +(define file (compose string-trim-right pkgs:slurp path)) (define +ipv4+ (file "src/config/ipv4.txt")) (define +ipv6+ (file "src/config/ipv6.txt")) @@ -45,12 +43,10 @@ (define package-symbols - '(ffmpegx - node)) + '()) (define package-records - (list - pkg:euandre.org)) + (list)) @@ -58,30 +54,25 @@ (locale "fr_FR.UTF-8") (timezone "America/Sao_Paulo") (host-name +tld+) - (skeletons pkg:skeletons) + (skeletons pkgs:skeletons) (users (append - (pkg:user-accounts +users+) - (list) + (pkgs:user-accounts +users+) %base-user-accounts)) - (groups - (append - (list) - %base-groups)) - (sudoers-file pkg:syskeep-sudoers-file) - (packages (pkg:package-set package-symbols package-records)) + (sudoers-file pkgs:syskeep-sudoers-file) + (packages (pkgs:package-set package-symbols package-records)) (services (append (list (service ntp-service-type) - (service dhcp-client-service-type) + (service dhcpcd-service-type) (service knot-service-type - (q:knot-zones-configuration +tld+ +ipv4+ +ipv6+)) + (pkgs:knot-zones-configuration +tld+ +ipv4+ +ipv6+)) (service openssh-service-type - (q:openssh-default-configuration - (pkg:users->keys +users+))) + (pkgs:openssh-default-configuration + (pkgs:users->keys +users+))) (service certbot-service-type - (q:tld-certbot-configuration +tld+)) + (pkgs:tld-certbot-configuration +tld+)) (service nginx-service-type (nginx-configuration (server-blocks @@ -90,49 +81,18 @@ (server-name (list +tld+)) (listen '("[::]:443 ssl" "443 ssl")) (root "/srv/www") - (index '()) (ssl-certificate - (pkg:fmt "/etc/letsencrypt/live/~a/fullchain.pem" +tld+)) + (pkgs:fmt "/etc/letsencrypt/live/~a/fullchain.pem" +tld+)) (ssl-certificate-key - (pkg:fmt "/etc/letsencrypt/live/~a/privkey.pem" +tld+)) + (pkgs:fmt "/etc/letsencrypt/live/~a/privkey.pem" +tld+)) (locations (list (nginx-location-configuration (uri "~ ^(.*)/index\\.html$") (body - '(#"- - if ($request_uri ~ /index\.html$) { - rewrite ^(.*)/index\.html$ $1/ permanent; - } - "#))) - (nginx-location-configuration - (uri "/live/") - (body - '(#"- - rewrite /live(.*) $1 break; - add_header Access-Control-Allow-Origin *; - proxy_pass http://novinho:4219; - "#))) - (nginx-location-configuration - (uri "/b/") - (body - (list - (list "include " nginx "/share/nginx/conf/fastcgi.conf;") - #"- - fastcgi_param PATH /run/current-system/profile/bin; - fastcgi_pass localhost:9000; - "#))) - (nginx-location-configuration - (uri "/gistatic/") - (body - (list - (list - "include " nginx "/share/nginx/conf/fastcgi_params;") - #"- - fastcgi_param PATH /run/current-system/profile/bin; - fastcgi_pass localhost:9000; - rewrite /gistatic(.*) $1 break; - "#))) + '("if ($request_uri ~ /index\\.html$) {\n" + " rewrite ^(.*)/index\\.html$ $1/ permanent;\n" + "}\n"))) (nginx-location-configuration (uri "/git/static/") (body @@ -146,49 +106,50 @@ "fastcgi_param SCRIPT_FILENAME " cgit "/lib/cgit/cgit.cgi;") - #"- - fastcgi_param PATH /run/current-system/profile/bin; - fastcgi_param PATH_INFO $uri; - fastcgi_param QUERY_STRING $args; - fastcgi_param HTTP_HOST $server_name; - fastcgi_pass localhost:9000; - rewrite /git(.*) $1 break; - "#))))) + "fastcgi_param PATH_INFO $uri;" + "fastcgi_param PATH /run/current-system/profile/bin;" + "fastcgi_param QUERY_STRING $args;" + "fastcgi_param HTTP_HOST $server_name;" + "fastcgi_pass localhost:9000;" + "rewrite /git(.*) $1 break;"))))) (raw-content - '(#"- - ssl_protocols TLSv1.3; - ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH; - ssl_prefer_server_ciphers on; - gzip off; # Disable dynamic compression altogether due to BREACH - gzip_static on; - charset utf-8; - autoindex on; - add_header Strict-Transport-Security 'max-age=31536000; includeSubdomains' always; - types { - text/html html; - text/css css; - text/javascript mjs; - text/xml xml; - text/plain txt; - application/atom+xml atom; - application/gzip gz; - application/pdf pdf; - application/x-bittorrent torrent; - image/vnd.microsoft.icon ico; - image/png png; - image/svg+xml svg; - audio/flac flac; - audio/ogg ogg; - video/webm webm; - } - "#))))))) - (service cgit-service-type q:cgit-pre-configuration) - (service pkg:syskeep-service-type - (pkg:syskeep-configuration + (list + "ssl_protocols TLSv1.3;" + "ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;" + "ssl_prefer_server_ciphers on;" + "gzip off; # Disable dynamic compression due to BREACH" + "gzip_static on;" + "charset utf-8;" + "autoindex on;" + (pkgs:str + "add_header Strict-Transport-Security " + "'max-age=31536000; includeSubdomains' always;") + "types {" + " text/html html;" + " text/css css;" + " text/javascript mjs;" + " text/xml xml;" + " text/plain txt;" + " application/atom+xml atom;" + " application/gzip gz;" + " application/pdf pdf;" + " application/x-bittorrent torrent;" + " image/vnd.microsoft.icon ico;" + " image/png png;" + " image/svg+xml svg;" + " audio/flac flac;" + " audio/ogg ogg;" + " video/webm webm;" + "}"))))))) + (service cgit-service-type pkgs:cgit-pre-configuration) + (service pkgs:syskeep-service-type + (pkgs:syskeep-configuration (tld +tld+))) - (service pkg:cicd-service-type) - (service pkg:git-service-type - (pkg:git-configuration +; FIXME +#; + (service pkgs:cicd-service-type) + (service pkgs:git-service-type + (pkgs:git-configuration (export-all? #t) (run-server? #t))) (simple-service 'add-wireguard-aliases hosts-service-type @@ -217,11 +178,11 @@ (public-key "WKOAyNVPxYB9H7ga1A0DfUrZGMUFyC3RCIvUC7u9/RA=") (allowed-ips '("10.0.0.5/32")) (keep-alive 25)))))) - (service q:shadow-group-service-type) - (service q:dkimproxyout-service-type) - (service q:cyrus-sasl-service-type) - (service q:dovecot-service-type) - (service q:internet-postfix-service-type) + (service pkgs:shadowgroup-service-type) + (service pkgs:dkimproxyout-service-type) + (service pkgs:cyrussasl-service-type) + (service pkgs:dovecot-service-type) + (service pkgs:internet-postfix-service-type) (simple-service 'host-specific-etc-file etc-service-type `(("id_rsa.pub" ,(plain-file "id_rsa.pub" +root-pubkey+)) ("known_hosts" ,(plain-file "known-hosts.txt" +known-hosts+)) @@ -230,7 +191,7 @@ '(("root" "andreh") ("eu" "andreh") ("mailing-list" "andreh")))) - pkg:base-services)) + pkgs:base-services)) (bootloader (bootloader-configuration (bootloader grub-bootloader) |
