diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-19 13:18:30 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-19 18:56:59 -0700 |
commit | d2e0d4c5a7b52fcca9c6e05c682433a86a67fcb8 (patch) | |
tree | e22a4aec869d99d0b6a69af8c68753db499b754d /src/property/apt.lisp | |
parent | fa6c93ea9587e50f03aa277313d8749e1ca2b9a7 (diff) | |
download | consfigurator-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.lisp | 16 |
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))) |