aboutsummaryrefslogtreecommitdiff
path: root/src/property/apt.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-19 13:18:30 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-19 18:56:59 -0700
commitd2e0d4c5a7b52fcca9c6e05c682433a86a67fcb8 (patch)
treee22a4aec869d99d0b6a69af8c68753db499b754d /src/property/apt.lisp
parentfa6c93ea9587e50f03aa277313d8749e1ca2b9a7 (diff)
downloadconsfigurator-d2e0d4c5a7b52fcca9c6e05c682433a86a67fcb8.tar.gz
add APT:USES-PARENT-MIRROR, APT:PROXY and APT:USES-PARENT-PROXY
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/apt.lisp')
-rw-r--r--src/property/apt.lisp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/property/apt.lisp b/src/property/apt.lisp
index 41b9b2e..50c448e 100644
--- a/src/property/apt.lisp
+++ b/src/property/apt.lisp
@@ -59,6 +59,22 @@
(:hostattrs
(pushnew-hostattrs :apt.mirror uri)))
+(defproplist uses-parent-mirror :posix ()
+ (:desc #?"Uses parent's apt mirror")
+ (mirror (get-parent-hostattrs-car :apt.mirror)))
+
+(defprop proxy :posix (uri)
+ (:desc #?"${uri} apt proxy selected")
+ (:hostattrs
+ (pushnew-hostattrs :apt.proxy uri))
+ (:apply
+ (file:has-content "/etc/apt/apt.conf.d/20proxy"
+ (format nil "Acquire::HTTP::Proxy \"~A\";~%" uri))))
+
+(defproplist uses-parent-proxy :posix ()
+ (:desc #?"Uses parent's apt proxy")
+ (proxy (get-parent-hostattrs-car :apt.proxy)))
+
(defun get-mirrors ()
(or (get-hostattrs :apt.mirror) (call-with-os #'get-default-mirrors)))