Skip to content

Commit

Permalink
wsl
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunsingh committed Nov 25, 2023
1 parent f26e539 commit 167ee92
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@ _:

modules = [ ./c1/configuration.nix ];
};
wsl2 = {
system = "x86_64-linux";
stateVersion = "22.05"; # only change this if you know what you are doing.
wsl = true;

modules = [
./wsl2/configuration.nix
];
};
};
}
28 changes: 28 additions & 0 deletions hosts/wsl2/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ pkgs, modulesPath, ... }:

{
imports = [ "${modulesPath}/profiles/minimal.nix" ];

wsl = {
enable = true;
defaultUser = "shaurizard";
startMenuLaunchers = true;
wslConf.automount.root = "/mnt";
};

hardware.opengl.enable = true;

environment.systemPackages = with pkgs; [
git
home-manager
];

users.users.shaurizard = {
isNormalUser = true;
home = "/home/shaurizard";
shell = pkgs.zsh;
extraGroups = [ "wheel" ];
};

programs.zsh.enable = true;
}
6 changes: 6 additions & 0 deletions users/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ _:

modules = [ ./shaurizard/home.nix ];
};

"shaurizard@wsl2" = {
system = "x86_64-linux";
stateVersion = "23.05";
modules = [ ./wsl/home.nix ];
};
};
}
15 changes: 15 additions & 0 deletions users/wsl/home.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ pkgs, ... }:

/*
home-manager configuration
Useful links:
- Home Manager Manual: https://nix-community.gitlab.io/home-manager/
- Appendix A. Configuration Options: https://nix-community.gitlab.io/home-manager/options.html
*/
{
home = {
packages = builtins.attrValues {
inherit (pkgs) neofetch;
};
};
}

0 comments on commit 167ee92

Please sign in to comment.