Add support for non-NixOS home-manager Linux systems
Opened this issue · 8 comments
I've been trying to wrap my head around a single git repo I can use to:
- Configure OSX (nix-darwin)
- Configure NixOS (looks like you have that)
- Configure my setup on random linux machines with just nix-shell that I have to use daily
Does this repo have support for the 3rd option? Say I'm stuck in redhat/ubuntu land and I want to have my same prompt and utilities available I like everywhere ... is your repo an approach I can take?
Thanks - otherwise it looks awesome.
Hi @jeeftor,
Thanks for giving this configuration a try!
Yes, we cover points 1 and 2 (macOS and NixOS). I've been using this configuration for the past couple of years with that exact use case. I like some redundancy across my dev environments (I will never lose a day of work).
However, we don't currently support the nix-shell
use case in a nicely packaged way. I really like how you describe it, though... it sounds useful to jump across machines and have your vim
, emacs
, tmux
, or zsh
config easily available.
My workflow generally involves using a combination of devenv
, direnv
, and nix-direnv
to work on a per-project basis. And then I only really use the machines I have.
Closing, if you have future questions, please don't hesitate to reach out.
I think something that would have been awesome is to have something like this:
https://github.com/ollema/dotfiles/blob/699505bfef4e5108de1373ed977aeed590df5441/flake.nix
which I used to have working before, then I migrated to your config for various reasons and now I really miss the option of setting up just home-manager on Linux server that do not run NixOS.
it just does not feel at home without aliases!
how much work do you think it would be to adapt the current flake.nix so that it has support for this? I am bit lost to be honest, your config is very powerful but a lot more complex than mine
I agree, it would be a great feature to also enable non-NixOS systems to use some of the home-manager settings. I don't have much time right now to work on this, but it would involve adding a flake target like what you've shown in the example and editing the shared/home-manager.nix
module to support it. May not take much.
I'll reopen this Issue for now.
I agree, it would be a great feature to also enable non-NixOS systems to use some of the home-manager settings. I don't have much time right now to work on this, but it would involve adding a flake target like what you've shown in the example and editing the
shared/home-manager.nix
module to support it. May not take much.I'll reopen this Issue for now.
in addition to a flake target you would need additional/modified "apps" right? or something like that. whatever the nix run .#build-switch
does so that it picks up the right target on these linux boxes.
I wish I could help more but it's a bit out of my ballpark
So... I'm now running a config that has an option for:
- NixOS + Home Manager
- Nix-Darwin + Home Manager
- Nix (on non-nix-os) + Home Manager
I ended up writing all my own dot files using inspiration from everywhere - but here is the block I use for dealing with redhat/ubuntu boxes :)
So its doable
# Standalone Home manager Config Attempt (probably a fail however)
homeConfigurations."jstein@linux-64" = home-manager.lib.homeManagerConfiguration
{
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit allowed-unfree-packages; };
modules = [ ./hosts/non-nix-linux/home.nix ];
#Could have this moudle instead ... ./home-manager/users/${user}.nix
};
};
@jeeftor why did you close this? I believe there is still some investigation to do for a more general solution, see previous comments, even if you have something that works for your custom config
Cause... I donno. Regardless we can reopen