diff options
author | Timo Wilken | 2024-08-25 22:29:12 +0200 |
---|---|---|
committer | Timo Wilken | 2024-08-25 22:29:12 +0200 |
commit | f10f2eb06824daf551f49bdd24c33bc1d9b16e96 (patch) | |
tree | d69707ad3de96dc89e35b4c40b0c2a6b6e69dde5 /tw | |
parent | 161dc84fce2c2de603d0b867d07e9a412897e51c (diff) |
Revert "Move from extra-special-file to etc-service-type for system config files"
`etc-service-type' can't seem to deal with files in subdirectories, if those
subdirectories of /etc already exist partially.
This reverts commit 2ed6efb6517ec2265af4e3622f25dddfa503dded.
Diffstat (limited to 'tw')
-rw-r--r-- | tw/system.scm | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/tw/system.scm b/tw/system.scm index a66a9230..f0719ebc 100644 --- a/tw/system.scm +++ b/tw/system.scm @@ -313,9 +313,8 @@ ACTION!=\"remove\", SUBSYSTEM==\"leds\", GROUP=\"video\", MODE=\"0664\" (list #$(file-append ipp-usb "/bin/ipp-usb") "standalone"))) (stop #~(make-kill-destructor))))) - (simple-service 'set-timezone-script etc-service-type - `(("/etc/NetworkManager/dispatcher.d/09-set-timezone" - ,(program-file "set-timezone" set-timezone-script)))) + (extra-special-file "/etc/NetworkManager/dispatcher.d/09-set-timezone" + (program-file "set-timezone" set-timezone-script)) (service tw-wireguard-service-type (tw-wireguard-configuration @@ -326,39 +325,38 @@ ACTION!=\"remove\", SUBSYSTEM==\"leds\", GROUP=\"video\", MODE=\"0664\" ;; Since Guix 953c65ffdd4, build-machines can be directly specified in ;; `guix-configuration'. However, this doesn't allow the dynamic ;; selection of build machines as is done here. - (simple-service 'guix-build-machines etc-service-type - `(("/etc/guix/machines.scm" - ,(scheme-file "machines.scm" - (if work-system? - #~'() ; work machine doesn't have the required SSH keys for lud or vin - #~(let ((lud (build-machine - (name "lud.twilken.net") - (systems '("x86_64-linux")) - (port '#$(assoc-ref %ssh-ports "lud.twilken.net")) - (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqXbxv3a2bZyGjnEirVCMtRBeLKW/ha8ULSR9Xye4Z1") - (user "timo") - (private-key "/home/timo/.local/share/ssh-keys/id_ed25519") - (speed '#$(/ 4 cores)))) ; 4 cores, 16 GB RAM - (vin (build-machine - (name "vin.twilken.net") - (systems '("x86_64-linux")) - (port '#$(assoc-ref %ssh-ports "vin.twilken.net")) - (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEEpdfKxzoCwg53TKPF5YxgUwhGF+bELAyBGdxagQroJ") - (user "timo") - (private-key "/home/timo/.local/share/ssh-keys/id_ed25519") - (speed '#$(/ 8 cores))))) ; 8 cores, 16 GB RAM - (use-modules (ice-9 popen) - (ice-9 textual-ports) - (ice-9 regex)) - (let* ((regexp (make-regexp "^GENERAL\\.CONNECTION:[[:space:]]+TLAN$" regexp/newline)) - (pipe (open-pipe* OPEN_READ #$(file-append network-manager "/bin/nmcli") - "device" "show" #$wireless-interface)) - (at-home? (regexp-exec regexp (get-string-all pipe)))) - (close-pipe pipe) - ;; Only offload to vin when at home, as the network connection is too bad otherwise. - (if at-home? - (list vin) - (list lud))))))))) + (extra-special-file "/etc/guix/machines.scm" + (scheme-file "machines.scm" + (if work-system? + #~'() ; work machine doesn't have the required SSH keys for lud or vin + #~(let ((lud (build-machine + (name "lud.twilken.net") + (systems '("x86_64-linux")) + (port '#$(assoc-ref %ssh-ports "lud.twilken.net")) + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqXbxv3a2bZyGjnEirVCMtRBeLKW/ha8ULSR9Xye4Z1") + (user "timo") + (private-key "/home/timo/.local/share/ssh-keys/id_ed25519") + (speed '#$(/ 4 cores)))) ; 4 cores, 16 GB RAM + (vin (build-machine + (name "vin.twilken.net") + (systems '("x86_64-linux")) + (port '#$(assoc-ref %ssh-ports "vin.twilken.net")) + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEEpdfKxzoCwg53TKPF5YxgUwhGF+bELAyBGdxagQroJ") + (user "timo") + (private-key "/home/timo/.local/share/ssh-keys/id_ed25519") + (speed '#$(/ 8 cores))))) ; 8 cores, 16 GB RAM + (use-modules (ice-9 popen) + (ice-9 textual-ports) + (ice-9 regex)) + (let* ((regexp (make-regexp "^GENERAL\\.CONNECTION:[[:space:]]+TLAN$" regexp/newline)) + (pipe (open-pipe* OPEN_READ #$(file-append network-manager "/bin/nmcli") + "device" "show" #$wireless-interface)) + (at-home? (regexp-exec regexp (get-string-all pipe)))) + (close-pipe pipe) + ;; Only offload to vin when at home, as the network connection is too bad otherwise. + (if at-home? + (list vin) + (list lud))))))) (simple-service 'disk-maintenance mcron-service-type ;; I don't think jobs run on boot if they would have run when the |