From 3908645b186239837f733d154448d182ba49ea7d Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sat, 28 Oct 2023 22:27:50 +0200 Subject: Update hipis os configuration. --- hipis/hipis.scm | 71 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/hipis/hipis.scm b/hipis/hipis.scm index ba36cbf..217eadb 100755 --- a/hipis/hipis.scm +++ b/hipis/hipis.scm @@ -20,9 +20,6 @@ #~(let ((pid (call-with-input-file "/var/run/nginx/pid" read))) (kill pid SIGHUP)))) -(define uuid-root "1ec6339b-4918-45d2-b77e-b32cf265265d") -(define dev-bootloader "/dev/xvda") - (define (letsencrypt-certificate domain) (string-append "/etc/letsencrypt/live/" domain "/fullchain.pem")) @@ -47,22 +44,16 @@ "netdev" ;; network devices "tty" "input"))) - (user-account - (name "fcgiwrap") - (group "fcgiwrap") - (supplementary-groups '("git"))) %base-user-accounts)) -;; (user-group (name "git")) - - (packages (append - (specifications->packages '("emacs-no-x-toolkit" - "exfat-utils" - "git" - "nss-certs" - "nmap" - "curl")) - %base-packages)) + (packages (append + (specifications->packages '("emacs-no-x-toolkit" + "exfat-utils" + "git" + "nss-certs" + "nmap" + "curl")) + %base-packages)) (services (cons* (service openssh-service-type @@ -78,11 +69,11 @@ (addresses (list (network-address (device "eth0") - (value "195.74.91.18/26")))) + (value "193.200.51.92/27")))) (routes (list (network-route (destination "default") - (gateway "195.74.91.1")))) + (gateway "193.200.51.89")))) (name-servers '("195.74.91.4 " "193.200.50.51"))) %loopback-static-networking)) @@ -90,9 +81,26 @@ (service gitolite-service-type (gitolite-configuration (admin-pubkey jdlugosz-ssh-pub) + (group "fcgiwrap") (rc-file - (gitolite-rc-file (umask #o0027))))) - + (gitolite-rc-file (umask #o0027) + ;; Allow to set any configuration key + (git-config-keys ".*") + ;; Allow any text as a valid configuration value + (unsafe-pattern "^$") + )))) + + ;;; Note to myself: + ;;; + ;;; After fresh installation, nginx wont be working, + ;;; because the ssl certifications aren't generated yet, + ;;; you have to comment out the cgit and nginx service type + ;;; and after system reconfigure, run this script: + ;;; /var/lib/certbot/renew-certicates + ;;; after it, new certificates should appear in: + ;;; /etc/letsencrypt/live/{domain} directory + ;;; now you can uncomment cgit and nginx service type + ;;; and after system reconfigure everything should be up and running. (service certbot-service-type (certbot-configuration (email "me@jdlugosz.com") @@ -111,7 +119,9 @@ (enable-log-filecount? #t) (enable-log-linecount? #t) (side-by-side-diffs? #t) - (repository-directory "/var/lib/gitolite/repositories/public") + (enable-git-config? #t) + (section-from-path 1) + (repository-directory "/var/lib/gitolite/repositories/public/") (source-filter (file-append cgit "/lib/cgit/filters/syntax-highlighting.py")) (about-filter (file-append cgit "/lib/cgit/filters/about-formatting.sh")) (max-stats "year") @@ -142,14 +152,21 @@ (delete static-networking-service-type)))) (bootloader (bootloader-configuration - (bootloader grub-bootloader) - (targets (list dev-bootloader)) - (keyboard-layout keyboard-layout))) - + (bootloader grub-bootloader) + (targets (list "/dev/sda")) + (keyboard-layout keyboard-layout))) + (initrd-modules (append '("virtio_scsi") %base-initrd-modules)) + (swap-devices (list (swap-space + (target (uuid + "1510f063-9936-494a-97ee-488fda7ff0fe"))))) + + ;; 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 (uuid - uuid-root + "21ea8fcd-d031-4f00-9e57-0bd4ed5b0230" 'ext4)) (type "ext4")) %base-file-systems)))) -- cgit v1.2.3