diff --git a/config/files/usr/etc/greetd/config.toml b/config/files/usr/etc/greetd/config.toml new file mode 100644 index 0000000..f62d565 --- /dev/null +++ b/config/files/usr/etc/greetd/config.toml @@ -0,0 +1,6 @@ +[terminal] +vt = 1 + +[default_session] +command = "sway --config /etc/greetd/sway-config" +user = "greetd" diff --git a/config/files/usr/etc/greetd/environments b/config/files/usr/etc/greetd/environments new file mode 100644 index 0000000..ff1b19f --- /dev/null +++ b/config/files/usr/etc/greetd/environments @@ -0,0 +1,3 @@ +sway +bash +fish diff --git a/config/files/usr/etc/greetd/sway-config b/config/files/usr/etc/greetd/sway-config new file mode 100644 index 0000000..cb49ef2 --- /dev/null +++ b/config/files/usr/etc/greetd/sway-config @@ -0,0 +1,10 @@ +# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. +exec "gtkgreet -l; swaymsg exit" + +bindsym Mod4+shift+e exec swaynag \ + -t warning \ + -m 'What do you want to do?' \ + -b 'Poweroff' 'systemctl poweroff' \ + -b 'Reboot' 'systemctl reboot' + +include /etc/sway/config.d/* diff --git a/config/files/usr/lib/systemd/system/greetd-selinux-workaround.service b/config/files/usr/lib/systemd/system/greetd-selinux-workaround.service new file mode 100644 index 0000000..cea6c0a --- /dev/null +++ b/config/files/usr/lib/systemd/system/greetd-selinux-workaround.service @@ -0,0 +1,12 @@ +[Unit] +Description=Workaround greetd not having the correct SElinux label +ConditionFileIsExecutable=/usr/bin/greetd +After=local-fs.target +Before=greetd.service + +[Service] +Type=oneshot +ExecStart=/usr/sbin/greetd-selinux-workaround + +[Install] +WantedBy=multi-user.target diff --git a/config/files/usr/sbin/greetd-selinux-workaround b/config/files/usr/sbin/greetd-selinux-workaround new file mode 100755 index 0000000..8d08685 --- /dev/null +++ b/config/files/usr/sbin/greetd-selinux-workaround @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# This is a workaround to set the SELinux context of +# the greetd binary correctly. +# (See: https://github.com/sidusIO/sediment/pull/26) + +cp /usr/bin/greetd /usr/local/bin/greetd +mount --bind /usr/local/bin/greetd /usr/bin/greetd +semanage fcontext -a -t xdm_exec_t /usr/bin/greetd +restorecon /usr/bin/greetd diff --git a/config/recipe.yml b/config/recipe.yml index c98acd7..47ada4a 100644 --- a/config/recipe.yml +++ b/config/recipe.yml @@ -27,8 +27,13 @@ modules: - https://download.docker.com/linux/fedora/docker-ce.repo install: - fish + - greetd + - gtkgreet - docker-ce - docker-ce-cli + remove: + - sddm + - sddm-wayland-sway # configure what to pull in from ublue-os/bling - type: bling @@ -44,11 +49,13 @@ modules: # set up the proper policy & signing files for signed images to work - signing.sh - setup-asdf.sh - + - type: systemd system: enabled: - docker + - greetd.service + - greetd-selinux-workaround.service - type: fonts fonts: