Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(greetd): use greetd instead of sddm #26

Merged
merged 20 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/files/usr/etc/greetd/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[terminal]
vt = 1

[default_session]
command = "sway --config /etc/greetd/sway-config"
user = "greetd"
3 changes: 3 additions & 0 deletions config/files/usr/etc/greetd/environments
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sway
bash
fish
10 changes: 10 additions & 0 deletions config/files/usr/etc/greetd/sway-config
Original file line number Diff line number Diff line change
@@ -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/*
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions config/files/usr/sbin/greetd-selinux-workaround
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion config/recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down