From 2a0cef9908f0a3fb8b6774d36a9c7d4de4e7a3ed Mon Sep 17 00:00:00 2001
From: NullBite <me@nullbite.com>
Date: Sun, 3 Mar 2024 02:24:59 +0000
Subject: [PATCH] flake: add wsl host

---
 flake.nix                         |  6 ++++++
 hosts/nixos-wsl/configuration.nix | 23 +++++++++++++++++++++++
 hosts/nixos-wsl/home.nix          |  6 ++++++
 3 files changed, 35 insertions(+)
 create mode 100644 hosts/nixos-wsl/configuration.nix
 create mode 100644 hosts/nixos-wsl/home.nix

diff --git a/flake.nix b/flake.nix
index 003cf9f..5876701 100644
--- a/flake.nix
+++ b/flake.nix
@@ -214,6 +214,12 @@
         hostname = "nullbox";
         stateVersion = "23.11";
       };
+
+      nixos-wsl = mkWSLSystem {
+        system = "x86_64-linux";
+        stateVersion = "23.11";
+        hostname = "nixos-wsl";
+      };
     }; # end nixosConfigurations
   }; # end outputs
 } # end flake
diff --git a/hosts/nixos-wsl/configuration.nix b/hosts/nixos-wsl/configuration.nix
new file mode 100644
index 0000000..d3e8dab
--- /dev/null
+++ b/hosts/nixos-wsl/configuration.nix
@@ -0,0 +1,23 @@
+{ pkgs, config, lib, ... }:
+{
+  config = {
+    networking.hostName = "nixos-wsl";
+    nixfiles.profile.base.enable = true;
+    programs.gnupg.agent = {
+      enable = true;
+      pinentryFlavor = "gnome3";
+    };
+
+    fonts.packages = with pkgs; [
+      (nerdfonts.override { fonts = [ "FiraCode" ]; })
+      noto-fonts
+      noto-fonts-cjk
+    ];
+
+
+    fileSystems."/mnt/wsl/instances/NixOS" = {
+      device = "/";
+      options = [ "bind" ];
+    };
+  };
+}
diff --git a/hosts/nixos-wsl/home.nix b/hosts/nixos-wsl/home.nix
new file mode 100644
index 0000000..32202fb
--- /dev/null
+++ b/hosts/nixos-wsl/home.nix
@@ -0,0 +1,6 @@
+{ pkgs, lib, config, osConfig ? {}, ... }:
+{
+  config = {
+    nixfiles.profile.base.enable = true;
+  };
+}