From 2b1a15d868800b00373fbffc597624e4bf39fa40 Mon Sep 17 00:00:00 2001 From: uku Date: Sun, 6 Apr 2025 10:34:13 +0200 Subject: [PATCH] chore(systems/fuji-wsl): add function for extraBin --- systems/fuji-wsl/default.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/systems/fuji-wsl/default.nix b/systems/fuji-wsl/default.nix index 26543b7..e0c6e87 100644 --- a/systems/fuji-wsl/default.nix +++ b/systems/fuji-wsl/default.nix @@ -5,6 +5,14 @@ nixos-wsl, ... }: +let + mkExtraBin = lib.mapAttrsToList ( + name: value: { + inherit name; + src = lib.escapeShellArg value; + } + ); +in { imports = [ nixos-wsl.nixosModules.default @@ -23,16 +31,11 @@ useWindowsDriver = true; interop.includePath = false; - extraBin = [ - { - name = "code"; - src = lib.escapeShellArg "/mnt/c/Users/Leo/AppData/Local/Programs/Microsoft VS Code/bin/code"; - } - { - name = "neovide-unwrapped"; - src = lib.escapeShellArg "/mnt/c/Program Files/Neovide/neovide.exe"; - } - ]; + extraBin = mkExtraBin { + code = "/mnt/c/Users/Leo/AppData/Local/Programs/Microsoft VS Code/bin/code"; + neovide-unwrapped = "/mnt/c/Program Files/Neovide/neovide.exe"; + win32yank = "/mnt/c/Program Files/win32yank/win32yank.exe"; + }; wslConf.network = { hostname = config.networking.hostName;