feat: more wsl tweaks

This commit is contained in:
Nickolaj Jepsen 2025-12-14 04:09:59 +01:00
parent 50289dcc0d
commit 72a3dc6c5a
10 changed files with 104 additions and 40 deletions

View file

@ -5,6 +5,7 @@ _: {
./boot.nix
./hosts.nix
./keyd.nix
./wsl.nix
./ld.nix
./networking.nix
./security.nix

View file

@ -1,15 +1,21 @@
{lib, ...}: {
services.keyd = {
enable = lib.mkDefault true;
keyboards.mouse = {
ids = [
"046d:c051:4ae65a29" # Work mouse
"046d:407f:ee6ee407" # Home mouse
];
settings = {
main = {
# Bind mouse-back to meta if held
mouse1 = "overload(meta, mouse1)";
{
lib,
config,
...
}: {
config = lib.mkIf config.fireproof.desktop.enable {
services.keyd = {
enable = lib.mkDefault true;
keyboards.mouse = {
ids = [
"046d:c051:4ae65a29" # Work mouse
"046d:407f:ee6ee407" # Home mouse
];
settings = {
main = {
# Bind mouse-back to meta if held
mouse1 = "overload(meta, mouse1)";
};
};
};
};

20
modules/system/wsl.nix Normal file
View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: {
options.fireproof.wsl.enable = lib.mkEnableOption "Enable WSL configuration";
config = lib.mkIf config.fireproof.wsl.enable {
wsl = {
enable = true;
defaultUser = config.fireproof.username;
startMenuLaunchers = true;
interop.includePath = false;
};
# WSL doesn't use a bootloader - disable systemd-boot
boot.loader.systemd-boot.enable = false;
boot.loader.efi.canTouchEfiVariables = false;
};
}