nixos/home/sway/nixos.nix

24 lines
609 B
Nix

{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.faucet.gui; ( enable && session );
in mkIf gui {
services.xserver.displayManager.sessionPackages = [
(pkgs.writeTextFile {
name = "sway-session";
destination = "/share/wayland-sessions/sway.desktop";
text = ''
[Desktop Entry]
Name=Sway
Comment=An i3-compatible Wayland compositor
Exec=sway --unsupported-gpu
Type=Application
'';
} // { providedSessions = [ pkgs.sway.meta.mainProgram ]; })
];
security.pam.services.swaylock = { };
programs.light.enable = true;
}