2024-12-19 15:13:56 -05:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2024-12-19 18:59:38 -05:00
|
|
|
let
|
|
|
|
sway-config = pkgs.writeTextFile {
|
|
|
|
name = "config";
|
|
|
|
text = ''
|
|
|
|
# Default config for sway
|
|
|
|
#
|
|
|
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
|
|
|
#
|
|
|
|
# Read `man 5 sway` for a complete reference.
|
|
|
|
|
|
|
|
### Variables
|
|
|
|
#
|
|
|
|
# Logo key. Use Mod1 for Alt.
|
|
|
|
set $mod Mod4
|
|
|
|
# set $mod Mod1
|
|
|
|
# Home row direction keys, like vim
|
|
|
|
set $left h
|
|
|
|
set $down j
|
|
|
|
set $up k
|
|
|
|
set $right l
|
|
|
|
# Your preferred terminal emulator
|
|
|
|
set $term ${pkgs.alacritty}/bin/alacritty
|
|
|
|
# Your preferred application launcher
|
|
|
|
# Note: it's recommended that you pass the final command to sway
|
|
|
|
# set $menu dmenu_path | dmenu | xargs swaymsg exec
|
|
|
|
set $menu ${pkgs.wofi}/bin/wofi --show drun --gtk-dark
|
|
|
|
|
|
|
|
# Do not show a title bar on windows
|
|
|
|
default_border pixel 2
|
|
|
|
|
|
|
|
bindsym $mod+grave exec $term
|
|
|
|
|
|
|
|
exec ${pkgs.alacritty}/bin/alacritty
|
|
|
|
|
|
|
|
include ~/.config/sway/config.d/*.conf
|
|
|
|
include /etc/sway/config.d/*
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
2024-12-19 15:13:56 -05:00
|
|
|
{
|
|
|
|
imports = [];
|
|
|
|
|
2024-12-19 16:28:40 -05:00
|
|
|
environment.systemPackages = with pkgs; [
|
2024-12-19 17:33:21 -05:00
|
|
|
alacritty
|
|
|
|
firefox
|
2024-12-19 16:28:40 -05:00
|
|
|
];
|
2024-12-19 18:59:38 -05:00
|
|
|
hardware.opengl.enable = true;
|
2024-12-19 16:28:40 -05:00
|
|
|
|
2024-12-19 17:33:21 -05:00
|
|
|
environment.sessionVariables = {
|
|
|
|
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
|
|
|
};
|
|
|
|
|
2024-12-19 16:28:40 -05:00
|
|
|
programs.sway = {
|
|
|
|
enable = true;
|
|
|
|
wrapperFeatures.gtk = true;
|
2024-12-19 17:33:21 -05:00
|
|
|
extraOptions = [
|
|
|
|
"--debug"
|
|
|
|
"--config"
|
2024-12-19 18:59:38 -05:00
|
|
|
"${sway-config}"
|
2024-12-19 17:33:21 -05:00
|
|
|
"--unsupported-gpu"
|
|
|
|
];
|
2024-12-19 16:28:40 -05:00
|
|
|
};
|
|
|
|
|
2024-12-19 17:33:21 -05:00
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
|
|
|
};
|
2024-12-19 15:13:56 -05:00
|
|
|
}
|