summaryrefslogtreecommitdiff
path: root/upstream/services/nbfc.scm
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2025-06-14 02:46:25 +0200
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2025-06-14 02:46:25 +0200
commit4ba9c9f7bdf4117ee7d0408e36b67705aa7107ce (patch)
treeef83c8049a92fdb724a530b211198dc80deb26a2 /upstream/services/nbfc.scm
parentbb947fce2bb532a1c36ab9e5ab1c2c9abced9724 (diff)
distribution: remove files related to abandoned NBFC service
Diffstat (limited to 'upstream/services/nbfc.scm')
-rw-r--r--upstream/services/nbfc.scm65
1 files changed, 0 insertions, 65 deletions
diff --git a/upstream/services/nbfc.scm b/upstream/services/nbfc.scm
deleted file mode 100644
index 4b0b646..0000000
--- a/upstream/services/nbfc.scm
+++ /dev/null
@@ -1,65 +0,0 @@
-(define-module (upstream services nbfc)
- ;; #:use-module (gnu packages linux)
- #:use-module (gnu services)
- #:use-module (gnu services shepherd)
- #:use-module (guix build utils)
- #:use-module (guix gexp)
- #:use-module (guix records)
- #:use-module (upstream packages nbfc)
- #:export (nbfc-configuration))
-
-(define-record-type* <nbfc-configuration>
- nbfc-configuration
- make-nbfc-configuration
- nbfc-configuration?
- (package get-nbfc-configuration-package
- (default nbfc-linux))
- (model get-nbfc-configuration-model
- (default "undefined")))
-
-(define (nbfc-etc-extension configuration-record)
- (let* ((model (get-nbfc-configuration-model configuration-record))
-
- (nbfc-configuration-file (mixed-text-file "nbfc.json-stored"
- "{\"SelectedConfigId\": \""
- model
- "\"}\n")))
- (list `("nbfc.json" ,nbfc-configuration-file))))
-
-(define nbfc-profile-extension
- (lambda (configuration-record)
- (list (get-nbfc-configuration-package configuration-record))))
-
-(define (nbfc-shepherd-extension configuration-record)
- (let* ((profile (get-nbfc-configuration-package configuration-record))
-
- (service-executable (file-append profile
- "/bin/nbfc_service"))
-
- (start-command #~ (list #$ service-executable
- "--config-file"
- "/etc/nbfc.json"))
-
- (start-process #~ (make-forkexec-constructor #$ start-command))
- (symbols (list 'nbfc))
-
- (default-service (shepherd-service (provision symbols)
- (start start-process))))
- (list default-service)))
-
-(define-public nbfc-service-type
- (let* ((nbfc-etc-extension* (service-extension etc-service-type
- nbfc-etc-extension))
- (nbfc-profile-extension* (service-extension profile-service-type
- nbfc-profile-extension))
- (nbfc-shepherd-extension* (service-extension shepherd-root-service-type
- nbfc-shepherd-extension))
-
- (description "C port of Stefan Hirschmann's NoteBook FanControl")
- (extensions (list nbfc-etc-extension*
- nbfc-profile-extension*
- nbfc-shepherd-extension*)))
- (service-type (name 'nbfc)
- (extensions extensions)
- (description description)
- (default-value (nbfc-configuration)))))