src/default.scm: HOSTNAME environment variable workaround
Signed-off-by: molese <molese@protonmail.com>
This commit is contained in:
parent
15e5fb91df
commit
7e1ee2f6d7
@ -7,11 +7,14 @@
|
||||
|
||||
;; FIXME(Krey): Process DOMAIN
|
||||
|
||||
;; FIXME(Krey): getenv returns #f if it's variable is unassigned.. i don't know how to check for false
|
||||
;(if (false? (getenv "HOSTNAME"))
|
||||
; (throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration"))
|
||||
;; function to print error if environment variable 'HOSTNAME' is not set or if it's value is empty
|
||||
(define system-hostname-check (lambda ()
|
||||
(if (not (system-hostname-set?))
|
||||
(throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration"))
|
||||
(if (eq? (getenv "HOSTNAME") #f)
|
||||
(throw 1 "Environment variable 'HOSTNAME' is set to empty, unable to apply sufficient configuration"))))
|
||||
|
||||
;(define system-hostname (getenv "HOSTNAME"))
|
||||
(define system-hostname (getenv "HOSTNAME"))
|
||||
|
||||
;; TODO(Krey): Process https://guix.gnu.org/manual/en/html_node/Invoking-guix-deploy.html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user