Add a script to launch sway on FreeBSD.

This commit is contained in:
Tom Alexander 2022-10-17 15:15:09 -04:00
parent 172b4063ee
commit 1f408202f1
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 49 additions and 0 deletions

View File

@ -18,3 +18,16 @@ cores: 8
build_user:
name: talexander
group: talexander
users:
talexander:
initialize: true
uid: 11235
gid: 11235
groups:
- name: wheel
- name: video
authorized_keys:
- yubikey
- main_fido
- backup_fido
- homeassistant

View File

@ -89,3 +89,16 @@
path: /etc/rc.conf
start: absent
when: rc_conf is not defined
- name: Add fstab entries
mount:
name: "{{ item.dst }}"
src: "{{ item.src }}"
fstype: "{{ item.fstype }}"
opts: "{{ item.opts }}"
state: present
loop:
- dst: /tmp
src: tmpfs
fstype: tmpfs
opts: rw,mode=777

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
#
# Launch sway
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ ! -v XDG_RUNTIME_DIR ]]; then
export XDG_RUNTIME_DIR=$(mktemp -d)
fi
sway |& tee $HOME/.config/swaylog

View File

@ -35,3 +35,14 @@
loop:
- seatd
- dbus
- name: Install scripts
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0755
owner: root
group: wheel
loop:
- src: launch_sway.bash
dest: /usr/local/bin/launch_sway