Update sway config and flake.nix
This commit is contained in:
@@ -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