Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for non-NixOS home-manager Linux systems #72

Open
jeeftor opened this issue Apr 30, 2024 · 8 comments
Open

Add support for non-NixOS home-manager Linux systems #72

jeeftor opened this issue Apr 30, 2024 · 8 comments
Labels
feature A new feature in my configuration

Comments

@jeeftor
Copy link

jeeftor commented Apr 30, 2024

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.

@dustinlyons
Copy link
Owner

dustinlyons commented May 1, 2024

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.

@dustinlyons
Copy link
Owner

Closing, if you have future questions, please don't hesitate to reach out.

@ollema
Copy link

ollema commented May 24, 2024

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

@dustinlyons
Copy link
Owner

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.

@dustinlyons dustinlyons reopened this May 30, 2024
@dustinlyons dustinlyons changed the title Does your configuration play with non nix-os Linux systems? Support for non-NixOS home-manager systems May 30, 2024
@dustinlyons dustinlyons changed the title Support for non-NixOS home-manager systems Support for non-NixOS home-manager Linux systems May 30, 2024
@dustinlyons dustinlyons added the feature A new feature in my configuration label May 30, 2024
@ollema
Copy link

ollema commented Jun 5, 2024

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

@jeeftor
Copy link
Author

jeeftor commented Jun 9, 2024

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 jeeftor closed this as completed Jun 9, 2024
@ollema
Copy link

ollema commented Jun 9, 2024

@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

@jeeftor
Copy link
Author

jeeftor commented Jun 9, 2024

Cause... I donno. Regardless we can reopen

@jeeftor jeeftor reopened this Jun 9, 2024
@dustinlyons dustinlyons changed the title Support for non-NixOS home-manager Linux systems Add support for non-NixOS home-manager Linux systems Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature in my configuration
Projects
None yet
Development

No branches or pull requests

3 participants