From d34e9a4fd0608ce65ee55c3e9f965d42a896e997 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:46:48 +0200 Subject: [PATCH] merge: hosts/wsl.nix from wsl branch :truck: --- nixos/hosts/wsl.nix | 98 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 nixos/hosts/wsl.nix diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix new file mode 100644 index 0000000..4a76710 --- /dev/null +++ b/nixos/hosts/wsl.nix @@ -0,0 +1,98 @@ +# 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, ... }: + +{ + wsl = { + enable = true; + defaultUser = "nixos"; + # TODO: check that this actually works, if it does, remove this comment and resolv.conf + # if not, remove this part and add URLs below to resolv.conf + wslConf.network.generateResolvConf = false; + }; + + networking = { + useDHCP = true; + # nameserver sources: https://dnsmap.io/articles/most-popular-dns-servers + nameservers = [ "84.200.69.80" "8.26.56.26" "1.1.1.1" "8.8.8.8" "64.6.65.6" "208.67.222.222" "209.244.0.3" ]; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + programs.nix-ld.enable = true; + # TODO: move to home manager (?) + programs = { + direnv = { + enable = true; + # enableFishIntegration = true; + nix-direnv.enable = true; + }; + }; + + # 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 = "25.05"; # Did you read the comment? + + users.users.dth = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + initialPassword = "test"; + }; + + nixpkgs.config.allowUnfree = true; + environment.variables = { + DBT_USER = "DNTH"; + }; + + environment.systemPackages = with pkgs; [ + # tmux # activated in tmux.nix + # vim # using neovim in stead + # neovim # activated in neovim.nix + + git # version control + gh # github cli tool + + ripgrep # faster grep + wget # for vscode-server + busybox # useful programs e.g. tree, unzip etc + openssl # cryptography swiss army knife + xdg-utils # terminal desktop intergrations (i.e. allow terminal to open browser) + + # make default.nix in python project folders instead of using a top-level python environment manager + # pyenv + # poetry + + neofetch # system info + btop # resource monitor + tldr # community alternative to man + fzf # fuzzy finder + + # gimp # bloat + # blender # bloat + # inkscape # bloat + + cowsay + lolcat + ]; + + services.vscode-server.enable = true; + security.rtkit.enable = true; # realtime kit hands out realtime scheduling priority + services.pipewire = { + enable = true; # if not already enabled + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + }; + +}