From db2c36f4689fb7f8c1747dd3402098aff55d968e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 9 Aug 2022 09:31:39 -0400 Subject: Move serval TODOs into org --- Biz/Serval.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/Biz/Serval.scm b/Biz/Serval.scm index 0e6be55..93eb3ac 100644 --- a/Biz/Serval.scm +++ b/Biz/Serval.scm @@ -27,11 +27,6 @@ ;; /var/lib/serval// - root directory for the kit ;; /nix/var/nix/profiles/per-kit/ - symlink to cfg in /nix/store ;; -;; TODO -;; - save-kit function (write kit to /var/lib/serval/.kit) -;; - profiles in /nix/var/nix/profiles/per-kit -;; - each of the below commented functions for state manipulation -;; (define-module (Biz Serval) #:use-module ((ice-9 getopt-long)) #:use-module ((ice-9 match) @@ -48,8 +43,6 @@ (define *data-dir* "/var/lib/serval") (define *nix-profiles-dir* "/nix/var/nix/profiles") -;; TODO: I would really like a better command line parser... -;; getopt-long sucks (define (main args) ;; pop first arg if its the executable (let* ([args (if (equal? (first args) "Biz/Serval.scm") @@ -61,11 +54,11 @@ ["del" (del-kit! args)] ["start" (start-kit! args)] ["stop" (stop-kit! args)] - ["scale" (prn "TODO: scale running kits")] + ["scale" (prn "scale running kits")] ["ssh" (run-in-kit! args)] - ["info" (prn "TODO: show kit")] - ["ls" ("TODO: list available kits")] - [else (prn "TODO: help text")]))) + ["info" (prn "show kit")] + ["ls" ("list available kits")] + [else (prn "help text")]))) (define-record-type @Kit (Kit name nix-path system-path host-address @@ -90,7 +83,6 @@ (define (zip a b) "Combine a and b into a single list of pairs." - ;; TODO: zip-list, zip-with, in Core (apply map cons (list a b))) (define (serialize kit) @@ -112,7 +104,6 @@ (call-with-input-file (fmt "~a/~a.kit" *data-dir* kit-name) (lambda (a) (deserialize (read a))))) -;; TODO (define (find-available-address) "10.233.0.1") @@ -128,8 +119,6 @@ 1. first arg is name 2. second arg is nix-path 3. rest args parsed by getopt-long - -TODO: ensure kit-name is unique " (let* ([name (first args)] [nix-path (second args)] @@ -153,7 +142,6 @@ TODO: ensure kit-name is unique (Shell.exec (fmt "ls ~a" *data-dir*))) (define (update-kit! args) - ;; TODO: load kit and update with new config file (let ([kit #nil]) (Shell.exec (fmt "nix-env -p ~a/system -I nixos-config=~a -f --set -A system" -- cgit v1.2.3