Closed andar1an closed 11 months ago
Going to try to learn and use an overlay.
So did you figure out how to do this? 😅
Oh wait, nvm, I looked into the other issues, I think I got it
I did but on Debian using bash haha. Glad you figured out! I still love nix/nixos but it didn't fit for my personal needs.
For anyone dealing with this issue on a non-NixOS system with with a standalone installation.
This should be a minimal reproducible example:
# flake.nix
{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# VS Code extensions
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
home-manager,
nix-vscode-extensions,
...
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
homeConfigurations = {
my-pc = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
{
nixpkgs.overlays = [
nix-vscode-extensions.overlays.default # Also have a look at https://github.com/nix-community/nix-vscode-extensions/issues/29
];
}
];
};
};
};
}
# home.nix
{ config, pkgs, ... }:
{
home.username = "user";
home.homeDirectory = "/home/user";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages =
[
];
# Let Home Manager install and manage itself
programs = {
home-manager = {
enable = true;
};
};
programs.vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with pkgs.vscode-marketplace; [
jnoortheen.nix-ide
quarto.quarto # I added Quarto extensions that cannot be installed without nix-vscode-extensions
];
};
}
I have tried a few ways to use nix-vscode-extensions with vscode module in home-manager. I have not had luck yet.
My current attempt looks something like this:
Flake.nix
Home.nix
I am new to nix, and it would be helpful if I could get some direction or guidance please.
Thanks :)