diff --git a/home-nix/flake.nix b/home-nix/flake.nix index 3ca6a37..1cb0a15 100644 --- a/home-nix/flake.nix +++ b/home-nix/flake.nix @@ -32,8 +32,22 @@ lib = (import ../lib-nix { inherit pkgs from-yaml; lib = pkgs.lib; }); in rec { - inherit pkgs; - inherit lib; + homeConfigurations.nyx = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + 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 { inherit pkgs; modules = [ diff --git a/home-nix/home.nix b/home-nix/home.nix index f50f0e1..6549e14 100644 --- a/home-nix/home.nix +++ b/home-nix/home.nix @@ -3,6 +3,7 @@ , pkgs , myHome , myLib +, extraSSH , ... }: { @@ -26,7 +27,8 @@ pkgs.python39Full pkgs.xorg.xclock pkgs.logseq - # pkgs.python310 + pkgs.mosh + # pkgs.python310 # dev packages should be in jk # pkgs.python310.numpy # pkgs.python310Packages.tensorflow # pkgs.python310Packages.scikit-learn diff --git a/ssh/config b/ssh/config index d88d67b..56925f6 100644 --- a/ssh/config +++ b/ssh/config @@ -43,3 +43,8 @@ Host ocolo-lab-2 User root Port 22 +Host lizzi + HostName 172.105.135.218 + User hungtr + Port 22 + diff --git a/system-nix/wsl-configuration.nix b/system-nix/wsl-configuration.nix new file mode 100755 index 0000000..421e194 --- /dev/null +++ b/system-nix/wsl-configuration.nix @@ -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..uid = 1000; + # networking.hostName = "nixos"; + +}