From e68f05c78c57d2d719929b42e9659511d14af455 Mon Sep 17 00:00:00 2001 From: Devin Finlinson Date: Wed, 30 Aug 2023 22:56:23 +0200 Subject: Creating initial commit. --- modules/sway.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 modules/sway.nix (limited to 'modules/sway.nix') diff --git a/modules/sway.nix b/modules/sway.nix new file mode 100644 index 0000000..8d4d664 --- /dev/null +++ b/modules/sway.nix @@ -0,0 +1,40 @@ +{ config, pkgs, lib, ... }: +{ + environment.systemPackages = with pkgs; [ + ]; + + # xdg-desktop-portal works by exposing a series of D-Bus interfaces + # known as portals under a well-known name + # (org.freedesktop.portal.Desktop) and object path + # (/org/freedesktop/portal/desktop). + # The portal interfaces include APIs for file access, opening URIs, + # printing and others. + xdg.portal = { + enable = true; + wlr.enable = true; + # gtk portal needed to make gtk apps happy + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; + + # enable sway window manager + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + }; + + # kanshi systemd service + systemd.user.services.kanshi = { + description = "kanshi daemon"; + serviceConfig = { + Type = "simple"; + ExecStart = ''${pkgs.kanshi}/bin/kanshi -c kanshi_config_file''; + }; + }; + + security.pam.services.swaylock.text = '' + # PAM configuration file for the swaylock screen locker. By default, it includes + # the 'login' configuration file (see /etc/pam.d/login) + auth include login + ''; +} + -- cgit v1.2.3