Skip to content

Instantly share code, notes, and snippets.

@apraga
Last active September 2, 2022 21:25
Show Gist options
  • Save apraga/321a8754b0fc927577242161d0c30668 to your computer and use it in GitHub Desktop.
Save apraga/321a8754b0fc927577242161d0c30668 to your computer and use it in GitHub Desktop.
NixOS: configuration wsl2
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
"${modulesPath}/profiles/minimal.nix"
./cachix.nix
nixos-wsl.nixosModules.wsl
];
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "alex";
startMenuLaunchers = true;
# Enable integration with Docker Desktop (needs to be installed)
# docker.enable = true;
};
# Enable nix flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
environment.shells = with pkgs; [ fish ];
# Needed for exa !
time.timeZone = "Europe/Paris";
# Emacs28 with nativecomp
services.emacs.package = pkgs.emacsNativeComp;
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.t$
}))
];
environment.systemPackages = with pkgs; [
emacsNativeComp
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment