Skip to content

Instantly share code, notes, and snippets.

@ShalokShalom
Last active January 21, 2025 12:31
Show Gist options
  • Save ShalokShalom/aa49372b191833b7c5e2cea542abffae to your computer and use it in GitHub Desktop.
Save ShalokShalom/aa49372b191833b7c5e2cea542abffae to your computer and use it in GitHub Desktop.
Quick installation of Lix + Homemanager
@ShalokShalom
Copy link
Author

ShalokShalom commented Jan 2, 2025

Install Lix

curl -sSf -L https://install.lix.systems/lix | sh -s -- install

Say no to Flakes and start a new shell.

nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager

nix-channel --update
nix-shell '<home-manager>' -A install

Find the package you want to install: https://search.nixos.org/packages

Replace everything from line 18 and below in the text file that is shown to you at the end of the last output.

It is /$HOME/.config/home-manager/home.nix for me 😃

Be sure to put the name of the application within the brackets, like so:

  home.packages = with pkgs; [
      babashka
      
  ];

  programs.home-manager.enable = true;
}

Save the file and then run home-manager switch to complete the process.

Further documentation: https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager

GPU-driven apps, who make use of Vulkan and OpenGL for GPU driven computation, do need additional configuration:

https://nix-community.github.io/home-manager/index.xhtml#sec-usage-gpu-non-nixos

It is possible to configure and maintain a lot more, specifically the editor, and also to create a self-contained development container. Overall, this setup here is a nice base for practical development.

Bildschirmfoto_20250102_154756

To update the packages, run nix-channel --update and then home-manager switch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment