dotfiles/nixos/configuration-wsl.nix

81 lines
2.1 KiB
Nix
Raw Normal View History

# 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, ... }:
{
imports = [
# include NixOS-WSL modules
<nixos-wsl/modules>
];
users.users.nixos = {
isNormalUser = true;
extraGroups = [
"wheel"
"wireshark"
];
packages = with pkgs; [
home-manager
];
};
time.timeZone = "Asia/Shanghai";
environment.sessionVariables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
};
environment.enableAllTerminfo = true;
environment.systemPackages = with pkgs; [
file
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
sqlite
# clash-verge-rev
bind
pciutils
iptables
];
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.nix-ld.enable = true;
services.openssh.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.common.default = "gtk";
};
services.flatpak.enable = true;
networking.firewall.enable = false;
system.copySystemConfiguration = true;
wsl.enable = true;
wsl.defaultUser = "nixos";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}