update: add WSL

This commit is contained in:
2025-07-08 14:52:17 +00:00
parent 585e8fcd8c
commit 560e8e5a00
4 changed files with 134 additions and 4 deletions

View File

@@ -0,0 +1,42 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, inputs, ... }:
{
imports = [
inputs.nixos-wsl.nixosModules.default
inputs.home-manager.nixosModules.default
../../modules/nixos/user.nix
];
wsl.enable = true;
wsl.defaultUser = "mthomson";
networking.hostName = "wsl";
environment.systemPackages = with pkgs; [
git
wget
vim
];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
home-manager = {
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
useUserPackages = true;
users = {
mthomson = import ./home.nix;
};
};
system.stateVersion = "24.11";
}

26
hosts/wsl/home.nix Normal file
View File

@@ -0,0 +1,26 @@
{
config,
pkgs,
...
}: {
imports = [
../../modules/home-manager/git.nix
../../modules/home-manager/nixcats
../../modules/home-manager/zsh.nix
../../modules/home-manager/tmux.nix
../../modules/home-manager/direnv.nix
../../modules/home-manager/jq.nix
../../modules/home-manager/lazygit.nix
../../modules/home-manager/man.nix
../../modules/home-manager/emacs
];
home.username = "mthomson";
home.homeDirectory = "/home/mthomson";
home.stateVersion = "24.11";
home.packages = with pkgs; [
gcc
];
programs.home-manager.enable = true;
}