feat(wpcarro/emacs): Define new device

For my latest workstation.

Change-Id: Idd18c07f05f2afdf57fde25a5aad627759ca1643
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4795
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
This commit is contained in:
William Carroll 2021-10-23 16:46:01 -07:00 committed by clbot
parent 3693221522
commit aa348226a2

View file

@ -23,7 +23,8 @@
;; TODO(wpcarro): Consider integrating this with Nix and depot instead of
;; denormalizing the state.
(defconst device-hostname->device
'(("zeno.lon.corp.google.com" . work-desktop)
'(("zeno.lon.corp.google.com" . work-desktop-lon)
("wpcarro.svl.corp.google.com" . work-desktop-svl)
("seneca" . work-laptop)
("marcus" . personal-laptop)
("diogenes" . personal-vm))
@ -42,12 +43,16 @@
(defun device-work-desktop? ()
"Return t if current device is work desktop."
(equal 'work-desktop
(device-classify)))
(-contains? '(work-desktop-lon
work-desktop-svl)
(device-classify)))
(defun device-corporate? ()
"Return t if the current device is owned by my company."
(or (device-work-laptop?) (device-work-desktop?)))
(-contains? '(work-desktop-lon
work-desktop-svl
work-laptop)
(device-classify)))
(defun device-laptop? ()
"Return t if the current device is a laptop."