weparate wsl config

nix-components
pegasust 2022-11-14 07:50:02 +00:00
parent 6c1d177e03
commit 9de4e985f3
4 changed files with 56 additions and 3 deletions

View File

@ -32,8 +32,22 @@
lib = (import ../lib-nix { inherit pkgs from-yaml; lib = pkgs.lib; }); lib = (import ../lib-nix { inherit pkgs from-yaml; lib = pkgs.lib; });
in in
rec { rec {
homeConfigurations.nyx = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
inherit lib; modules = [
./home.nix
];
# optionally pass inarguments to module
# we migrate this from in-place modules to allow flexibility
# in this case, we can add "home" to input arglist of home.nix
extraSpecialArgs = {
myLib = lib;
myHome = {
username = "nyx";
homeDirectory = "/home/nyx";
};
};
};
homeConfigurations.nixos = home-manager.lib.homeManagerConfiguration { homeConfigurations.nixos = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ modules = [

View File

@ -3,6 +3,7 @@
, pkgs , pkgs
, myHome , myHome
, myLib , myLib
, extraSSH
, ... , ...
}: }:
{ {
@ -26,7 +27,8 @@
pkgs.python39Full pkgs.python39Full
pkgs.xorg.xclock pkgs.xorg.xclock
pkgs.logseq pkgs.logseq
# pkgs.python310 pkgs.mosh
# pkgs.python310 # dev packages should be in jk
# pkgs.python310.numpy # pkgs.python310.numpy
# pkgs.python310Packages.tensorflow # pkgs.python310Packages.tensorflow
# pkgs.python310Packages.scikit-learn # pkgs.python310Packages.scikit-learn

View File

@ -43,3 +43,8 @@ Host ocolo-lab-2
User root User root
Port 22 Port 22
Host lizzi
HostName 172.105.135.218
User hungtr
Port 22

View File

@ -0,0 +1,32 @@
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
./hardware-configuration.nix
nixos-wsl.nixosModules.wsl
configuration.nix
];
system.stateVersion = "22.05";
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";
# 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;
# networking.hostName = "nixos";
}