Update sway config and flake.nix

This commit is contained in:
2024-06-07 18:47:10 -05:00
parent 76e3492a30
commit 4a914da23e
14 changed files with 122 additions and 117 deletions

View File

@@ -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;
};

View File

@@ -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 ];

View File

@@ -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;
};
};