dotfiles/system-nix/configuration.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

2022-08-30 14:29:44 +00:00
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
"${modulesPath}/profiles/minimal.nix"
2022-11-06 10:45:45 +00:00
./hardware-configuration.nix
2022-08-30 14:29:44 +00:00
nixos-wsl.nixosModules.wsl
];
2022-11-06 10:45:45 +00:00
system.stateVersion = "22.05";
2022-08-30 14:29:44 +00:00
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "nixos"; # if change defaultUser, make sure uid to be 1000 (first user)
startMenuLaunchers = true;
automountOptions = "drvfs,metadata,uid=1000,gid=100";
2022-08-30 14:29:44 +00:00
# Enable native Docker support
# docker-native.enable = true;
# Enable integration with Docker Desktop (needs to be installed)
docker-desktop.enable = true;
};
# users.users.<defaultUser>.uid = 1000;
2022-11-06 20:23:10 +00:00
# networking.hostName = "nixos";
2022-08-30 14:29:44 +00:00
# Enable nix flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
2022-11-06 20:23:10 +00:00
# Some basic programs
2022-08-30 14:29:44 +00:00
programs.neovim = {
enable = true;
defaultEditor = true;
};
programs.git = {
enable = true;
# more information should be configured under user level
};
environment.systemPackages = [
pkgs.gnumake
];
}