aboutsummaryrefslogtreecommitdiff
path: root/src/guix/system.scm
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2026-09-05 10:24:41 -0300
committerEuAndreh <eu@euandre.org>2026-09-05 10:24:41 -0300
commit31428f4b1bda3a32de60d78352f85249d68cfdd1 (patch)
treee13a237a25d4380fc1cff550e39b64ebf5cf27c5 /src/guix/system.scm
parentsrc/guix/system.scm: Drop pijul user (diff)
downloadtoph-31428f4b1bda3a32de60d78352f85249d68cfdd1.tar.gz
toph-31428f4b1bda3a32de60d78352f85249d68cfdd1.tar.xz
src/guix/: Use papoim pkgs over EuAndreh packages
Diffstat (limited to 'src/guix/system.scm')
-rw-r--r--src/guix/system.scm183
1 files changed, 72 insertions, 111 deletions
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)