add config for sway
This commit is contained in:
parent
8f4ffd1d45
commit
4982dbdb5a
4 changed files with 45 additions and 0 deletions
|
@ -31,6 +31,9 @@ in
|
|||
|
||||
programs.gpg.settings.default-key = "99658A3EB5CD7C13";
|
||||
|
||||
# Sway is configured in .#nixosModules.dadada.sway
|
||||
home.file.".config/sway/config" = ../modules/sway/config;
|
||||
|
||||
dadada.home =
|
||||
lib.attrsets.genAttrs useFeatures (useFeatures: { enable = true; })
|
||||
// {
|
||||
|
|
|
@ -51,6 +51,7 @@ in
|
|||
};
|
||||
vpnExtension = "3";
|
||||
};
|
||||
sway.enable = true;
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
secrets = import ./secrets.nix;
|
||||
share = import ./share.nix;
|
||||
steam = import ./steam.nix;
|
||||
sway = import ./sway.nix;
|
||||
update = import ./update.nix;
|
||||
vpnServer = import ./vpnServer.nix;
|
||||
weechat = import ./weechat.nix;
|
||||
|
|
40
nixos/modules/sway.nix
Normal file
40
nixos/modules/sway.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.dadada.sway;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
dadada.sway.enable = lib.mkEnableOption "Enable sway";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
wrapperFeatures.base = true;
|
||||
extraPackages = with pkgs; [
|
||||
qt5.qtwayland
|
||||
swayidle
|
||||
xwayland
|
||||
mako
|
||||
kanshi
|
||||
kitty
|
||||
i3status
|
||||
bemenu
|
||||
xss-lock
|
||||
swaylock
|
||||
brightnessctl
|
||||
playerctl
|
||||
];
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# needs qt5.qtwayland in systemPackages
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
# Fix for some Java AWT applications (e.g. Android Studio),
|
||||
# use this if they aren't displayed properly:
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue