summaryrefslogtreecommitdiffstats
path: root/systems
diff options
context:
space:
mode:
Diffstat (limited to 'systems')
-rw-r--r--systems/qi/config.nix2
-rw-r--r--systems/qi/sway.nix68
2 files changed, 70 insertions, 0 deletions
diff --git a/systems/qi/config.nix b/systems/qi/config.nix
index e7aab4d2..695e6f72 100644
--- a/systems/qi/config.nix
+++ b/systems/qi/config.nix
@@ -3,6 +3,8 @@
./base.nix
../../configs/wiregrill.nix
+ ./sway.nix
+
../../configs/networkd.nix { networking.useDHCP = lib.mkForce true; }
{
diff --git a/systems/qi/sway.nix b/systems/qi/sway.nix
new file mode 100644
index 00000000..7dfe3bed
--- /dev/null
+++ b/systems/qi/sway.nix
@@ -0,0 +1,68 @@
+{ pkgs, ... }: {
+ nixpkgs.overlays = [(self: super: {
+ sway-unwrapped = super.sway-unwrapped.overrideAttrs (old: {
+ patches = old.patches or [] ++ [
+ (self.fetchurl {
+ url = "https://codeberg.org/neuromagus/disable_titlebar_in_sway/raw/branch/main/disable_titlebar_sway1-10.patch";
+ hash = "sha256-3aQysi6WlOghbnb3tc1JTz67Ajsbic3Pi1cb1FOd1AU=";
+ })
+ ];
+ });
+ })];
+
+ systemd.user.services.squeekboard = {
+ environment = {
+ WAYLAND_DISPLAY = "wayland-1";
+ };
+ serviceConfig = {
+ ExecStart = "${pkgs.squeekboard}/bin/squeekboard";
+ };
+ };
+ systemd.user.services.wvkbd = {
+ environment = {
+ WAYLAND_DISPLAY = "wayland-1";
+ };
+ serviceConfig = {
+ ExecStart = "${pkgs.wvkbd}/bin/wvkbd-mobintl";
+ };
+ };
+ environment.systemPackages = [
+ # wlr-randr --output DSI-1 --toggle
+ # wlr-randr --output DSI-1 --transform 270
+ # wlr-randr --output DSI-1 --scale 1.8
+ pkgs.wlr-randr
+
+ # used by sway config
+ pkgs.brightnessctl
+
+ (pkgs.writeDashBin "squeekboard-toggle" ''
+ set -efu
+ if systemctl --user is-active --quiet squeekboard; then
+ systemctl --user stop squeekboard
+ else
+ systemctl --user start squeekboard
+ fi
+ '')
+ # integrate into sway config
+ (pkgs.writeDashBin "start-lisgd" ''
+ if ! ${pkgs.procps}/bin/pgrep lisgd >/dev/null; then
+ ${pkgs.lisgd}/bin/lisgd \
+ -d /dev/input/by-path/platform-a90000.i2c-event \
+ -m 500 \
+ -g '2,DU,*,*,R,systemctl --user start wvkbd' \
+ -g '2,UD,*,*,R,systemctl --user stop wvkbd' \
+ -g '2,RL,*,*,R,swaymsg workspace next' \
+ -g '2,LR,*,*,R,swaymsg workspace prev' \
+ &
+ fi
+ '')
+ ];
+ programs.sway.enable = true;
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ extraPortals = [
+ pkgs.xdg-desktop-portal-gtk
+ ];
+ };
+}