dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/hosts/wsl/default.nix (1779B)
1# WSL - NixOS on Windows
2{
3 config,
4 inputs,
5 ...
6} @ args: let
7 inherit (config) util;
8 inherit (config.flake) modules;
9
10 windows = import ./_windows.nix {};
11 fetch = import ./_fetch.nix args;
12 vscode = import ./_vscode.nix args;
13
14 hmModules =
15 util.map.array [
16 "v7-cli"
17 "secrets"
18 "crypt"
19 "shell-utils"
20 "git"
21 "codex-cli"
22 ]
23 modules.homeManager
24 ++ [
25 windows.home
26 vscode.home
27 ({lib, ...}: {
28 systemd.user.services.sops-nix.Install.WantedBy = lib.mkForce ["default.target"];
29 })
30 ];
31in {
32 configurations.nixos.wsl = {
33 defaults = false;
34 module = {pkgs, ...}: {
35 imports =
36 [
37 inputs.nixos-wsl.nixosModules.default
38 windows.nixos
39 fetch.nixos
40 ]
41 ++ util.map.array [
42 "base-cli"
43 "extbase-cli"
44 "crypt"
45 "nix"
46 "user-cli"
47 "v7"
48 "secrets"
49 "shell-cli"
50 "shell-utils"
51 "prompt"
52 "theme-cli"
53 "git"
54 ]
55 modules.nixos;
56
57 time.timeZone = "Asia/Kolkata";
58 i18n.defaultLocale = "en_IN";
59 environment.variables.LC_ALL = "en_IN.UTF-8";
60
61 system.nix.index = true;
62 apps.git.package = pkgs.git;
63 programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
64
65 wsl.defaultUser = "v7";
66 users.users.v7.extraGroups = ["wheel" "keys" "systemd-journal"];
67 home-manager.users.v7.imports = hmModules;
68 };
69 };
70
71 configurations.homeManager."v7@wsl" = {
72 defaults = false;
73 module = {
74 imports = [modules.homeManager.cli] ++ hmModules;
75 home = {
76 username = "v7";
77 homeDirectory = "/home/v7";
78 stateVersion = "26.05";
79 };
80 };
81 };
82}