-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwsl.nix
100 lines (91 loc) · 2.06 KB
/
wsl.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
self,
config,
lib,
inputs,
...
}: {
flake.nixosModules.wsl = {pkgs, ...}: let
stateVersion = "22.11";
in {
imports = [
./cachix.nix
inputs.home-manager.nixosModules.home-manager
inputs.nixos-wsl.nixosModules.wsl
];
system.stateVersion = stateVersion;
home-manager = {
extraSpecialArgs = inputs;
users.nixos = {lib, ...}: {
imports = [
./git.nix
./fish.nix
./direnv.nix
./emacs.nix
inputs.emacs-nix.nixosModules.emacs-nix
];
nixpkgs = {
inherit (config) overlays;
};
programs.git.signing = lib.mkForce null;
home.stateVersion = stateVersion;
};
};
users.users.nixos.shell = pkgs.fish;
programs.fish.enable = true;
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "nixos";
startMenuLaunchers = true;
};
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
services.xserver.enable = true;
services.xserver.layout = "gb";
services.xserver.xkbVariant = "dvorak";
# Load fonts
fonts = {
fonts = with pkgs; [
nerd-fonts.SourceCodePro
symbola
dejavu_fonts
];
fontconfig = {
enable = true;
antialias = true;
cache32Bit = true;
defaultFonts = {
monospace = ["SauceCodePro Nerd Font Mono"];
sansSerif = ["DejaVu Sans"];
serif = ["DejaVu Serif"];
};
};
};
nixpkgs = {
inherit (config) overlays;
};
nixpkgs.config = {
allowUnfree = true;
};
environment.systemPackages = with pkgs; [
git
(inputs.nixmacs.fromConf ./wsl-nixmacs.nix)
emacs
ripgrep
xorg.setxkbmap
docker
# Dictionaries
aspell
aspellDicts.en
];
};
flake.nixosConfigurations.wsl = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
self.nixosModules.wsl
];
};
}