refactor(wsl): move user packages to home-manager 🎨
Enable home-manager on WSL, importing the shared home.nix config. Remove duplicate packages and env vars from wsl.nix that are now provided by home-manager (git, ripgrep, fzf, direnv, etc.).
This commit is contained in:
parent
6c057d945e
commit
533e5810a9
2 changed files with 20 additions and 45 deletions
|
|
@ -36,10 +36,20 @@
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
./hosts/wsl.nix
|
./hosts/wsl.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
# TODO: handle all user-level programs via home-manager
|
|
||||||
# ./neovim.nix # Now handled via home-manager
|
|
||||||
./fish.nix
|
./fish.nix
|
||||||
# home-manager.nixosModules.default
|
|
||||||
|
# Home Manager on WSL
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
({ lib, ... }: {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
home-manager.users.dth = { ... }: {
|
||||||
|
home.username = "dth";
|
||||||
|
home.homeDirectory = lib.mkForce "/home/dth";
|
||||||
|
imports = [ ./home/danny/home.nix ];
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,7 @@
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
# TODO: move to home manager (?)
|
# direnv is now managed by home-manager (home/danny/home.nix)
|
||||||
programs = {
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
# enableFishIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
@ -47,42 +40,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
environment.variables = {
|
|
||||||
DBT_USER = "DNTH";
|
|
||||||
EDITOR = "nvim";
|
|
||||||
VISUAL = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
# User-level packages (git, ripgrep, fzf, etc.) are managed by
|
||||||
|
# home-manager via home/danny/home.nix. Only system-wide deps here.
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# tmux # activated in tmux.nix
|
wget # needed by vscode-server
|
||||||
# vim # using neovim in stead
|
busybox # useful system utilities (tree, unzip, etc.)
|
||||||
# neovim # activated in neovim.nix
|
xdg-utils # terminal desktop integrations
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
fastfetch # system info
|
|
||||||
btop # resource monitor
|
|
||||||
tldr # community alternative to man
|
|
||||||
fzf # fuzzy finder
|
|
||||||
jq # parse json
|
jq # parse json
|
||||||
|
|
||||||
# gimp # bloat
|
|
||||||
# blender # bloat
|
|
||||||
# inkscape # bloat
|
|
||||||
|
|
||||||
cowsay
|
|
||||||
lolcat
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.ollama.enable = true;
|
services.ollama.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue