!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

341 Members
https://github.com/nix-community/NixOS-WSL57 Servers

Load older messages


SenderMessageTime
8 Mar 2024
@k900:0upti.meK900The annoying part is managing .wslconfig14:27:05
@sandro:supersandro.deSandro 🐧Copy it to /mnt/c/ on activation or so15:00:22
@greg:thehellings.comgregHow about putting a VPN directly on your WSL and connecting through that? 🤔16:04:18
@k900:0upti.meK900Connecting to what?16:05:19
@greg:thehellings.comgregTo an ssh server in the wsl16:05:38
9 Mar 2024
@qyriad:katesiria.orgQyriad joined the room.00:36:57
@jee_mj:matrix.orgmj joined the room.03:36:26
@jee_mj:matrix.orgmjguys im here n00bin about cos I couldn't figure out what's going on with the current state of things in 23.1104:14:21
@jee_mj:matrix.orgmjPrior, I built this out in a full NixOS host, https://github.com/jee-mj/dotFiles It worked fine mostly, besides supportfor my PHP database server with phpmyadmin, which I thought might be better addressed in the actual environment it's supposed to be running on. Which is this.04:18:45
@jee_mj:matrix.orgmj

I'm going to continue with this video but I imported the outdated packages into the current one, which saw me compiling 3000 items, which I don't know what that's done to my system now:

 nixos@nixos  ~  cat /etc/nixos/configuration.nix                                                                                                                                                      04:12:21
# 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, modulesPath, ... }:

with lib;
let
  nixos-wsl = import ./NixOS-WSL;
in
{
  imports = [
    # include NixOS-WSL modules
    "${modulesPath}/profiles/minimal.nix"

    nixos-wsl.nixosModules.wsl
  ];

  wsl = {
    enable = true;
    automountPath = "/mnt";
    defaultUser = "nixos";
    startMenuLaunchers = true;

    # docker.enable = true;
  };

  # flakes

  nix = {
    package = pkgs.nixFlakes;
    settings.experimental-features = [ "nix-command" "flakes" ];
  };


  environment.systemPackages = with pkgs; [
    file
    fish
    git
    neovim
    nodejs
    wget
  ];

  programs = {
    fzf = {
      keybindings = true;
      fuzzyCompletion = true;
    };
    fish.enable = true;
  };

  users.users.nixos.shell = pkgs.fish;
  users.users.root.shell = pkgs.fish;

  # 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 = "23.11"; # Did you read the comment?
04:20:40
@jee_mj:matrix.orgmj * Prior, I built this out in a full NixOS host,
It worked fine mostly, besides supportfor my PHP database server with phpmyadmin, which I thought might be better addressed in the actual environment it's supposed to be running on. Which is this.
04:21:00
@jucax:matrix.orgjucax joined the room.05:38:08
@k900:0upti.meK900Please just use the official tarball06:50:41
@k900:0upti.meK900It's set up correctly06:50:44
@jee_mj:matrix.orgmji did thats what I started with06:53:13
@k900:0upti.meK900Then what is happening here?06:54:13
@k900:0upti.meK900
with lib;
let
  nixos-wsl = import ./NixOS-WSL;
in
{
  imports = [
    # include NixOS-WSL modules
    "${modulesPath}/profiles/minimal.nix"

    nixos-wsl.nixosModules.wsl
  ];
06:54:15
@jee_mj:matrix.orgmjthat was me trying the old latest fixed tarball configuration file from that video06:57:37
@jee_mj:matrix.orgmjthat was actually great timing thank you so much, it fixed an issue that came from merging my github conf with the wsl hardware conf06:58:06
@jee_mj:matrix.orgmj
In reply to @k900:0upti.me
with lib;
let
  nixos-wsl = import ./NixOS-WSL;
in
{
  imports = [
    # include NixOS-WSL modules
    "${modulesPath}/profiles/minimal.nix"

    nixos-wsl.nixosModules.wsl
  ];
this looks like an excellent way to import a custom module
06:58:49
@k900:0upti.meK900Yeah I have no idea what's going on there, and you shouldn't need a hardware-configuration.nix at all06:59:08
@jee_mj:matrix.orgmjthen it'll get built by nixos06:59:12
@k900:0upti.meK900Just use the tarball and start with the default config in the tarball06:59:27
@jee_mj:matrix.orgmjI'm just getting this error mainly nixos@URIEL-WSL  /m/c/U/mj  code . 17:59:20 /home/nixos/.vscode-server/bin/1e790d77f81672c49be070e04474901747115651/bin/remote-cli/code: line 12: /home/nixos/.vscode-server/bin/1e790d77f81672c49be070e04474901747115651/node: cannot execute: required file not found06:59:38
@k900:0upti.meK900That's an unrelated issue which has to do with how NixOS work07:00:06
@k900:0upti.meK900* That's an unrelated issue which has to do with how NixOS works07:00:07
@jee_mj:matrix.orgmj

I have this configuration file now

───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /etc/nixos/configuration.nix
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ { config, lib, pkgs, ... }:
   2   │
   3   │ {
   4   │   imports = [
   5   │
   6   │     /etc/nixos/.nix/system.nix
   7   │     /etc/nixos/.nix/environment.nix
   8   │     <nixos-wsl/modules>
   9   │   ];
  10   │
  11   │   wsl = {
  12   │     enable = true;
  13   │     defaultUser = "nixos";
  14   │     startMenuLaunchers = true;
  15   │
  16   │     # docker.enable = true;
  17   │   };
  18   │
  19   │   system.stateVersion = "23.11";
  20   │ }
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 
07:00:23
@k900:0upti.meK900OK yes that looks a lot more normal07:00:49
@jee_mj:matrix.orgmjis there documentation of the options anywhere?"07:00:53
@jee_mj:matrix.orgmj e.g. wsl.automountPath 07:01:12

Show newer messages


Back to Room ListRoom Version: 9