Compare commits

...

3 Commits

Author SHA1 Message Date
Tom Alexander 574a2d0ce7
Update vscode config. 4 months ago
Tom Alexander 1024f37691
Enable inlay hints for typescript. 4 months ago
Tom Alexander 724a8ca394
Fix ansible playbook on FreeBSD. 4 months ago

@ -1,7 +1,7 @@
os_flavor: "freebsd"
custom_repo: 13amd64-default-framework
#custom_repo: 13amd64-default-framework
zfs_snapshot_datasets:
- path: zroot/freebsd/release/be/default
- path: zroot/freebsd/current/be/default
sshd_enabled: true
sshd_conf: "sshd_config"
pf_config: "odofreebsd_pf.conf"
@ -14,7 +14,7 @@ loader_conf: "odofreebsd_loader.conf"
install_graphics: true
graphics_driver: "amd"
cputype: "amd"
cpu_opt: tigerlake
cpu_opt: znver4
hwpstate: true
cores: 16
build_user:
@ -38,14 +38,14 @@ users:
- homeassistant
gitconfig: "gitconfig_home"
devfs_rules: "odo_devfs.rules"
jail_zfs_dataset: zroot/freebsd/release/jails
jail_zfs_dataset: zroot/freebsd/current/jails
jail_zfs_dataset_mountpoint: /jail/main
jail_list:
- name: nat_dhcp
enabled: true
conf:
src: nat_dhcp
bhyve_dataset: zroot/freebsd/release/vm
bhyve_dataset: zroot/freebsd/current/vm
bhyve_list: []
efi_dev: /dev/gpt/EFI
sway_conf_files:

@ -2,7 +2,12 @@ clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="odo"
# wlans_iwlwifi0="wlan0"
# ifconfig_wlan0="WPA DHCP"
# ifconfig_wlan0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
zfs_enable="YES"

@ -1,2 +1,2 @@
# freebsd_version: "releng/13.2"
freebsd_version: "9c80d66ec1b4c5b9ac7aaf5b0fdbb1628d49c181"
freebsd_version: "c3d7bb5aca7749626b5c70dfa86ee8f07960f44a"

@ -23,6 +23,52 @@
(run-command-on-buffer "jq" "--monochrome-output" ".")
)
(defun configure-typescript-language-server ()
"Configures the typescript language server."
(when-linux
;; Either initializationOptions or workspace/didChangeConfiguration works.
(setq eglot-workspace-configuration
(list (cons ':typescript '(:inlayHints (:includeInlayParameterNameHints
"all"
:includeInlayParameterNameHintsWhenArgumentMatchesName
t
:includeInlayFunctionParameterTypeHints
t
:includeInlayVariableTypeHints
t
:includeInlayVariableTypeHintsWhenTypeMatchesName
t
:includeInlayPRopertyDeclarationTypeHints
t
:includeInlayFunctionLikeReturnTypeHints
t
:includeInlayEnumMemberValueHints
t)))))
(eglot-ensure)
;; (defclass my/eglot-typescript (eglot-lsp-server) ()
;; :documentation
;; "Own eglot server class.")
;; (add-to-list 'eglot-server-programs
;; '((js-mode js-ts-mode tsx-ts-mode typescript-ts-mode typescript-mode) . (my/eglot-typescript "typescript-language-server" "--stdio" :initializationOptions (:preferences (:includeInlayParameterNameHints
;; "all"
;; :includeInlayParameterNameHintsWhenArgumentMatchesName
;; t
;; :includeInlayFunctionParameterTypeHints
;; t
;; :includeInlayVariableTypeHints
;; t
;; :includeInlayVariableTypeHintsWhenTypeMatchesName
;; t
;; :includeInlayPRopertyDeclarationTypeHints
;; t
;; :includeInlayFunctionLikeReturnTypeHints
;; t
;; :includeInlayEnumMemberValueHints
;; t)))))
)
)
(use-package tsx-ts-mode
:ensure nil
:pin manual
@ -33,7 +79,7 @@
:hook (
(tsx-ts-mode . (lambda ()
(when-linux
(eglot-ensure)
(configure-typescript-language-server)
)
))
)
@ -52,9 +98,7 @@
:commands (typescript-ts-mode)
:hook (
(typescript-ts-mode . (lambda ()
(when-linux
(eglot-ensure)
)
(configure-typescript-language-server)
))
)
:init

@ -5,7 +5,7 @@ not_jail_nat_v4 = "{ any, !10.215.1.0/24 }"
dns_redirect = "{ 10.193.223.1 10.213.177.1 10.215.1.1 }"
dhcp = "{ bootpc, bootps }"
allow = "{ wgf wgh drmario colo }"
#allow = "{ wgf wgh drmario colo }"
tcp_pass_in = "{ 22 }"
udp_pass_in = "{ 53 51820 }"
@ -16,8 +16,8 @@ udp_pass_in = "{ 53 51820 }"
set skip on lo
# redirections
nat pass on $ext_if inet from $jail_nat_v4 to $not_jail_nat_v4 -> (wlan0)
rdr pass on $not_ext_if proto {tcp, udp} from any to 10.215.1.1 port 53 -> 1.1.1.1 port 53
#nat pass on $ext_if inet from $jail_nat_v4 to $not_jail_nat_v4 -> (wlan0)
#rdr pass on $not_ext_if proto {tcp, udp} from any to 10.215.1.1 port 53 -> 1.1.1.1 port 53
# Redirect jaeger ports to virtual machine.
# nat pass on lo inet from 127.0.0.0/24 to 127.0.0.0/24 port {6831 6832 16686 14268} -> (jail_nat)
@ -27,19 +27,19 @@ rdr pass on $not_ext_if proto {tcp, udp} from any to 10.215.1.1 port 53 -> 1.1.1
block log all
pass out on $ext_if
pass in on jail_nat
#pass in on jail_nat
# Allow traffic from my machine to the jails/virtual machines
pass out on jail_nat from $jail_nat_v4
#pass out on jail_nat from $jail_nat_v4
# We pass on the interfaces listed in allow rather than skipping on
# them because changes to pass rules will update when running a
# `service pf reload` but interfaces that we `skip` will not update (I
# forget if its from adding, removing, or both. TODO: test to figure
# it out). Also skipped interfaces are not subject to nat/rdr rules.
pass quick on $allow
#pass quick on $allow
pass on $ext_if proto icmp all
pass on $ext_if proto icmp6 all
pass in on $ext_if proto tcp to any port $tcp_pass_in
pass in on $ext_if proto udp to any port $udp_pass_in
#pass in on $ext_if proto tcp to any port $tcp_pass_in
#pass in on $ext_if proto udp to any port $udp_pass_in

@ -1,7 +1,7 @@
- name: Install packages
package:
name:
- sourcecodepro-ttf
- source-code-pro-ttf
- source-sans-ttf
- cascadia-code
- noto

@ -0,0 +1,42 @@
- name: Install packages
package:
name:
- drm-kmod
# - libva-intel-media-driver # va-api support for broadwell (2014) and newer.
# - libva-intel-driver # va-api support until after coffeelake (2017).
- vulkan-loader
- libva-utils # for vainfo
- vdpauinfo # for vdpauinfo
- libvdpau-va-gl # vdpau support
# - igt-gpu-tools # for intel_gpu_top
- vulkan-tools # For vulkaninfo
state: present
# - name: Configure vdpau to use va-api driver
# copy:
# src: vdpau.sh
# dest: /etc/profile.d/vdpau.sh
# mode: 0644
# owner: root
# group: root
#- name: Install loader.conf
# copy:
# src: "files/{{ item }}_loader.conf"
# dest: "/boot/loader.conf.d/{{ item }}.conf"
# mode: 0644
# owner: root
# group: wheel
# loop:
# - intel_power
# - intel_hw_accel_video
#- name: Install service configuration
# copy:
# src: "files/intel_{{ item }}_rc.conf"
# dest: "/etc/rc.conf.d/{{ item }}"
# mode: 0644
# owner: root
# group: wheel
# loop:
# - kld

@ -188,5 +188,21 @@
"key": "ctrl+f",
"command": "-actions.find",
"when": "editorFocus || editorIsOpen"
},
{
"key": "ctrl+shift+-",
"command": "undo"
},
{
"key": "ctrl+z",
"command": "-undo"
},
{
"key": "alt+x",
"command": "workbench.action.showCommands"
},
{
"key": "ctrl+shift+p",
"command": "-workbench.action.showCommands"
}
]

@ -1,17 +1,22 @@
{
"workbench.colorTheme": "Default High Contrast",
"remote.SSH.connectTimeout": 30,
"remote.SSH.enableDynamicForwarding": false,
"remote.SSH.enableAgentForwarding": false,
"remote.SSH.enableX11Forwarding": false,
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.inlayHints.variableTypes": true,
"editor.minimap.enabled": false,
"editor.fontSize": 12,
"editor.cursorStyle": "block",
"editor.fontFamily": "'Cascadia Mono', 'monospace', monospace",
"workbench.colorCustomizations": {
"editorCursor.foreground": "#ccff66",
"terminalCursor.foreground": "#ccff66"
}
}
"application.shellEnvironmentResolutionTimeout": 90,
"workbench.colorTheme": "Default High Contrast",
"remote.SSH.connectTimeout": 30,
"remote.SSH.enableDynamicForwarding": false,
"remote.SSH.enableAgentForwarding": false,
"remote.SSH.enableX11Forwarding": false,
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.inlayHints.variableTypes": true,
"editor.minimap.enabled": false,
"editor.fontSize": 12,
"editor.cursorStyle": "block",
"editor.fontFamily": "'Cascadia Mono', 'monospace', monospace",
"workbench.colorCustomizations": {
"editorCursor.foreground": "#ccff66",
"terminalCursor.foreground": "#ccff66"
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
}
}

@ -26,7 +26,7 @@
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
mode: 0644
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:

@ -76,6 +76,7 @@ function start_vm {
-c 6 \
-m 8G \
-H \
-o 'rtc.use_localtime=false' \
-s 0,hostbridge \
-s "4,nvme,/dev/zvol/zroot/vm/opnsense/disk0" \
-S \

@ -75,8 +75,9 @@ function start_vm {
bhyve \
-D \
-c 1 \
-m 2G \
-m 3G \
-H \
-o 'rtc.use_localtime=false' \
-s 0,hostbridge \
-s "4,nvme,/dev/zvol/zroot/vm/unifi/disk0" \
-s 30,xhci,tablet \

Loading…
Cancel
Save