Update sway config and flake.nix
This commit is contained in:
@@ -12,6 +12,17 @@ with lib; let
|
||||
in
|
||||
{
|
||||
config = mkIf gui.sway.enable {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 600;
|
||||
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
|
||||
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false;
|
||||
@@ -26,6 +37,7 @@ in
|
||||
"XF86AudioPause" = "exec playerctl play-pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
"${modifier}+space" = "exec \"kickoff-dot-desktop | ${pkgs.kickoff}/bin/kickoff --from-stdin --stdout | xargs -d '\\n' ${pkgs.sway}/bin/swaymsg exec\"";
|
||||
"${modifier}+Return" = "exec alacritty ";
|
||||
"${modifier}+Control+f" = "exec MOZ_ENABLE_WAYLAND=1 firefox";
|
||||
"${modifier}+Control+s" = "exec steam";
|
||||
@@ -54,11 +66,12 @@ in
|
||||
"${modifier}+Shift+Right" = "move right";
|
||||
"${modifier}+b" = "split h";
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+r" = "mode 'resize'";
|
||||
"${modifier}+f" = "fullscreen toggle";
|
||||
"${modifier}+Shift+space" = "floating toggle";
|
||||
"${modifier}+s" = "layout stacking";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+e" = "layout toggle split";
|
||||
"${modifier}+Shift+space" = "floating toggle";
|
||||
"${modifier}+a" = "focus parent";
|
||||
"${modifier}+1" = "workspace 1 ";
|
||||
"${modifier}+2" = "workspace 2";
|
||||
@@ -82,12 +95,9 @@ in
|
||||
"${modifier}+Shift+0" = "move container to workspace 10";
|
||||
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
||||
"${modifier}+Shift+c" = "reload";
|
||||
"${modifier}+r" = "mode 'resize'";
|
||||
};
|
||||
|
||||
startup = [
|
||||
{ command = "--no-startup-id swayidle -w timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"'"; }
|
||||
]
|
||||
startup = []
|
||||
++ optionals gui.sway.desktop [
|
||||
{ command = "vorta"; }
|
||||
{ command = "MOZ_ENABLE_WAYLAND=1 firefox"; }
|
||||
@@ -154,7 +164,7 @@ in
|
||||
|
||||
input."type:keyboard" = {
|
||||
xkb_layout = "us,de";
|
||||
xkb_options = "caps:escape,grp:shifts_toggle";
|
||||
xkb_options = "grp:shifts_toggle";
|
||||
};
|
||||
|
||||
output = gui.monitors;
|
||||
@@ -184,14 +194,14 @@ in
|
||||
};
|
||||
|
||||
bars = [
|
||||
{ command = "\${pkgs.waybar}/bin/waybar"; }
|
||||
{ command = "${pkgs.waybar}/bin/waybar"; }
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
bindsym ${modifier}+space exec kickoff-dot-desktop | kickoff --from-stdin --stdout | xargs -d '\n' swaymsg exec
|
||||
|
||||
set $bg-color #58536d
|
||||
set $inactive-bg-color #2f343f
|
||||
@@ -207,6 +217,7 @@ in
|
||||
client.urgent $urgent-bg-color $urgent-bg-color $text-color #4B5177
|
||||
|
||||
smart_gaps inverse_outer
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -28,6 +28,12 @@ in
|
||||
type = types.enum [ "fish" ];
|
||||
default = "fish";
|
||||
};
|
||||
|
||||
caps = mkOption {
|
||||
description = "What key to bind caps lock to";
|
||||
type = types.enum [ "ctrl-esc" "esc" "caps" ];
|
||||
default = "ctrl-esc";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -42,6 +48,7 @@ in
|
||||
eza
|
||||
ripgrep
|
||||
fzf
|
||||
yazi
|
||||
ncdu
|
||||
btop
|
||||
]
|
||||
@@ -52,6 +59,19 @@ in
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
services.keyd = mkIf (cfg.caps != "caps") {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = [ "*" ];
|
||||
settings = {
|
||||
main = mkMerge [
|
||||
(mkIf (cfg.caps == "ctrl-esc") { capslock = "overload(control, esc)"; })
|
||||
(mkIf (cfg.caps == "esc") { capslock = "esc"; })
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish.enable = mkIf (cfg.shell == "fish") true;
|
||||
};
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; with localPackages.x86_64-linux; []
|
||||
++ optional cfg.protonup.enable protonup-qt
|
||||
++ optional cfg.gamescope.enable gamescope-old
|
||||
++ optional cfg.gamescope.enable gamescope
|
||||
++ optional cfg.discord.enable vesktop
|
||||
++ optionals cfg.lutris.enable [ lutris wine ];
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@ in
|
||||
allowedTCPPorts = mkOption {
|
||||
description = "Which tcp ports to allow through firewall";
|
||||
type = types.listOf types.int;
|
||||
default = []
|
||||
++ optional openssh.enable openssh.port;
|
||||
default = [];
|
||||
};
|
||||
|
||||
allowedUDPPorts = mkOption {
|
||||
@@ -66,7 +65,9 @@ in
|
||||
networking.nameservers = cfg.nameservers;
|
||||
networking.firewall = {
|
||||
enable = cfg.firewall.enable;
|
||||
allowedTCPPorts = cfg.firewall.allowedTCPPorts;
|
||||
allowedTCPPorts = cfg.firewall.allowedTCPPorts
|
||||
++ optional openssh.enable openssh.port;
|
||||
|
||||
allowedUDPPorts = cfg.firewall.allowedUDPPorts;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user