aboutsummaryrefslogtreecommitdiff
path: root/tw/system/vin.scm
diff options
context:
space:
mode:
authorTimo Wilken2023-01-22 22:34:59 +0100
committerTimo Wilken2023-01-22 22:58:58 +0100
commit21ead4bff50f058bfdecdcbb5bda6965a756ed93 (patch)
tree92506909c26bc0a08557849b262abdebb67b710b /tw/system/vin.scm
parent33a632b790b83a7c03e2692d1029ddf1d9c62911 (diff)
Extract common server packages and services
This should improve maintainability a bit by combining common services running on the servers. Additionally, this parameterises common parts by servers' host names instead of the host-name-like symbols as before.
Diffstat (limited to 'tw/system/vin.scm')
-rw-r--r--tw/system/vin.scm45
1 files changed, 2 insertions, 43 deletions
diff --git a/tw/system/vin.scm b/tw/system/vin.scm
index c3e6ab16..ddecc127 100644
--- a/tw/system/vin.scm
+++ b/tw/system/vin.scm
@@ -6,9 +6,6 @@
#:use-module (guix gexp)
#:use-module (tw system common))
-(use-package-modules admin bash certs databases linux man rsync shells video)
-(use-service-modules mcron monitoring networking pm ssh vpn)
-
;; The device's BIOS does not support UEFI, sadly. It also doesn't recognise
;; NVME devices, so we can only use SATA hard disks, not the M.2 SSD.
;; /dev/sda1 is the https://en.wikipedia.org/wiki/BIOS_boot_partition for grub.
@@ -40,49 +37,11 @@
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
- (packages
- (append (list
- ;; For eventual backup scripts?
- btrfs-progs rsync)
- %common-system-packages
- %base-packages))
+ (packages %base-system-packages)
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
- (services
- (append
- (list (service openssh-service-type
- (openssh-configuration
- (port-number 22022)
- (password-authentication? #f)
- (accepted-environment '("LANG" "LC_*"))
- (authorized-keys
- `(("timo" ,(local-file "files/timo.pub"))))))
-
- (service dhcp-client-service-type)
-
- (service ntp-service-type)
-
- (simple-service 'cronjobs mcron-service-type
- (list #~(job "0 21 * * *" "guix gc -d 2w -F 25G")
- #~(job "0 22 * * *" ; after guix gc
- (string-append #$(file-append util-linux "/sbin/fstrim")
- " --fstab --verbose"))))
-
- ;; Prometheus node exporter
- (service prometheus-node-exporter-service-type
- (prometheus-node-exporter-configuration
- (web-listen-address "10.0.0.3:9100")))
-
- (wireguard-service 'vin))
-
- (modify-services %base-services
- (login-service-type
- config =>
- (login-configuration
- (inherit config)
- (motd (plain-file "no-motd" ""))
- (allow-empty-passwords? #f))))))
+ (services (server-base-services host-name))
;; The list of user accounts ('root' is implicit).
(users %server-base-user-accounts)