ops/nixos: refactoring for sway
This commit is contained in:
parent
1c571d965a
commit
b7cd20c769
4 changed files with 127 additions and 94 deletions
|
@ -13,5 +13,11 @@ in
|
|||
|
||||
config = {
|
||||
my.home-manager.imports = lib.mkAfter [ ./home-manager/graphical-client-wayland.nix ];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
gtkUsePortal = true;
|
||||
extraPortals = with depot.pkgs; [ xdg-desktop-portal-wlr ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,24 +9,43 @@
|
|||
waybar
|
||||
mako
|
||||
kanshi
|
||||
|
||||
qt5.qtwayland
|
||||
]);
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_USE_XINPUT2=1
|
||||
'';
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in lib.mkOptionDefault {
|
||||
"${modifier}+l" = "exec loginctl lock-session";
|
||||
"${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock";
|
||||
"${modifier}+p" = "exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui";
|
||||
"${modifier}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
|
||||
};
|
||||
startup = [
|
||||
{ command = "xss-lock --transfer-sleep-lock -- ${pkgs.swaylock}/bin/swaylock"; }
|
||||
{ command = "${pkgs.gnome3.networkmanagerapplet}/bin/nm-applet"; }
|
||||
];
|
||||
|
||||
output."*".bg = "${depot.pkgs.lukegb-wallpapers}/lunik1-gruvbox-dark-rainbow.png fill";
|
||||
|
||||
# howl: tap-to-click
|
||||
input."1739:24385:Synaptics_TM2438-005" = {
|
||||
tap = "enabled";
|
||||
tap_button_map = "lrm";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
my.alacritty.fontSize = 12;
|
||||
}
|
||||
|
|
|
@ -19,4 +19,10 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "${depot.nix.pkgs.lukegb-wallpapers}";
|
||||
interval = null;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
{
|
||||
imports = [ ./client.nix ];
|
||||
|
||||
options.my.alacritty = with lib; {
|
||||
fontSize = mkOption {
|
||||
default = 6;
|
||||
type = types.int;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig = {
|
||||
|
@ -39,8 +47,7 @@
|
|||
bold = iosevka "Bold";
|
||||
italic = iosevka "Italic";
|
||||
bold_italic = iosevka "Bold Italic";
|
||||
|
||||
size = 6;
|
||||
size = config.my.alacritty.fontSize;
|
||||
};
|
||||
settings.colors = {
|
||||
# Ayu Dark, from https://github.com/alacritty/alacritty/wiki/Color-schemes
|
||||
|
@ -92,10 +99,5 @@
|
|||
systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID
|
||||
systemctl --user restart ssh-agent
|
||||
'';
|
||||
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "${depot.nix.pkgs.lukegb-wallpapers}";
|
||||
interval = null;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue