mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-04-23 06:15:06 +00:00
services: smartdns: Rename config to config-file.
* rosenthal/services/dns.scm (smartdns-configuration)[config]: Rename to ... [config-file]: ...this. (smartdns-shepherd-service): Switch to match-record. [start]: Adjust accordingly.
This commit is contained in:
parent
b717b87fcd
commit
5b132c8844
@ -1,11 +1,11 @@
|
|||||||
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
;;
|
;;
|
||||||
;; SPDX-License-Identifier: GPL-3.0-or-later
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
(define-module (rosenthal services dns)
|
(define-module (rosenthal services dns)
|
||||||
#:use-module (ice-9 match)
|
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix records)
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu packages dns)
|
#:use-module (gnu packages dns)
|
||||||
@ -21,21 +21,21 @@
|
|||||||
(smartdns
|
(smartdns
|
||||||
(package smartdns)
|
(package smartdns)
|
||||||
"The Smartdns package.")
|
"The Smartdns package.")
|
||||||
(config
|
(config-file
|
||||||
(file-like (plain-file "empty" ""))
|
(file-like (plain-file "empty" ""))
|
||||||
"Configuration file for Smartdns."))
|
"Configuration file for Smartdns."))
|
||||||
|
|
||||||
(define smartdns-shepherd-service
|
(define (smartdns-shepherd-service config)
|
||||||
(match-lambda
|
(match-record config <smartdns-configuration>
|
||||||
(($ <smartdns-configuration> smartdns config)
|
(smartdns config-file)
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Run smartdns.")
|
(documentation "Run smartdns.")
|
||||||
(provision '(smartdns dns))
|
(provision '(smartdns dns))
|
||||||
(requirement '(loopback networking))
|
(requirement '(loopback networking))
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list #$(file-append smartdns "/sbin/smartdns")
|
(list #$(file-append smartdns "/sbin/smartdns")
|
||||||
"-f" "-c" #$(file-append config))))
|
"-f" "-c" #$(file-append config-file))))
|
||||||
(stop #~(make-kill-destructor)))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define smartdns-service-type
|
(define smartdns-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
Loading…
Reference in New Issue
Block a user