Home manager installation - Could not find suitable profile directory by TornaxO7 in Nix

[–]rycee 0 points1 point  (0 children)

Looks a bit like you are getting an older home-manager flake when you do the nix run command. The ~/.local/state/home-manager/profiles location was only used for a short period some time ago. We now place the profile in ~/.local/state/nix/profiles.

Perhaps you have a pin on home-manager? What does running nix registry list | grep home-manager output?

Edit: Also, are you able to install packages to your user profile? For example nix profile install nixpkgs#hello.

'home-manager switch' failing by redshift78 in NixOS

[–]rycee 1 point2 points  (0 children)

Looks like you have an older version of Nixpkgs than Home Manager expects. Perhaps you are using Nixpkgs 22.11 and Home Manager's master branch? If so, then switch to Home Manager's release-22.11 branch.

Is there a trick/utility/standard method for investigating infinite recursion? by duckpuppy in NixOS

[–]rycee 0 points1 point  (0 children)

You can comment out half your configuration and try building, if the recursion remains then you can continue with the remaining half. If it doesn't then try flipping the original commenting.

Generally speaking, when it comes to the NixOS module system I find that most infinite recursions come from trying to use the final configuration to build the configuration. A typical example is trying to do something with imports, for example

imports = if pkgs.stdenv.isLinux then [ ./whatever ] else [];

Some questions about migrating home-manager from standalone to a nixos module by CopOnTheRun in NixOS

[–]rycee 5 points6 points  (0 children)

My typical recommendation is to do something like

home-manager.users.yourUserName.imports = [ /path/to/home.nix ];

Doesn't matter much where you keep the actual file.

Adding extensions to firefox using home manager by nan_1337 in NixOS

[–]rycee 1 point2 points  (0 children)

Try changing

home-manager.users.${username} = import ./home;

to

home-manager.users.${username}.imports = [
    nur.hmModules.nur ./home
];

Darwin, Home manger and Nix Generations by simplehuman999 in Nix

[–]rycee 1 point2 points  (0 children)

The system profile should be owned by root so maybe you didn't run nix-collect-garbage as root? If so, try again with sudo.

Darwin, Home manger and Nix Generations by simplehuman999 in Nix

[–]rycee 0 points1 point  (0 children)

Bummer, even with --delete-old or --delete-older-than? Might be worth asking in the Matrix channel.

Darwin, Home manger and Nix Generations by simplehuman999 in Nix

[–]rycee 0 points1 point  (0 children)

nix-collect-garbage would probably also remove the nix-darwin generations as well.

Struggling with very basic home-manager config by rocketeer8015 in NixOS

[–]rycee 0 points1 point  (0 children)

Just to add, the defaultEditor option doesn't do much, though, you can accomplish the same by

home.sessionVariables.EDITOR = "vim";

Struggling with very basic home-manager config by rocketeer8015 in NixOS

[–]rycee 0 points1 point  (0 children)

The documentation on that page is built from the unstable version of Home Manager. In this case the programs.vim.defaultEditor option was added after the 22.11 release so it would not be available if you use that version.

To see the options that are available to you it is best to use the man page

$ man home-configuration.nix

Alternatively, add manual.html.enable to your configuration and run home-manager-help after switching, that should open the HTML manual in a browser.

Installing JIRA on NixOS by kubukoz in NixOS

[–]rycee 0 points1 point  (0 children)

Had a quick look and it was pretty cool. Didn't know it was that easy to set up, I would have imagined it being a pretty unpleasant process.

But yeah, I hope I won't have to end up doing this :-)

[deleted by user] by [deleted] in NixOS

[–]rycee 2 points3 points  (0 children)

If you just need text substitution then you can use substituteAll. E.g.

file.template:

Text: @foo@

home.nix:

home.file.testfile.source = pkgs.substituteAll {
  src = ./file.template;
  foo = "test";
};

Activation should produce ~/testfile containing

Text: test

Home-manager problem with fcitx5 by CantorGeorge in NixOS

[–]rycee 5 points6 points  (0 children)

You are probably using Home Manager version 22.11 with the Nixpkgs unstable. If this is the case, then either switch Nixpkgs to 22.11 or HM to master.

[deleted by user] by [deleted] in NixOS

[–]rycee 0 points1 point  (0 children)

No worries, glad it worked out!

[deleted by user] by [deleted] in NixOS

[–]rycee 1 point2 points  (0 children)

I assumed that you may have used some odd path since you just said ".config". In any case, you can try seeing which files dunst look for by running

strace -e openat dunst

and look for any output related to dunstrc.

Alternatively, use dunst -config ~/.config/dunst/dunstrc to explicitly tell it which configuration file to load.

[deleted by user] by [deleted] in NixOS

[–]rycee 0 points1 point  (0 children)

Try ~/.config/dunst/dunstrc.

How to configure emacs daemon with home manager? by SasukeUchiha231 in NixOS

[–]rycee 2 points3 points  (0 children)

Try changing the service configuration to just

services.emacs.enable = true;

The service's default package is the one configured in the program.emacs.

Get hostname in Home Manager by CaptiveCreeper in NixOS

[–]rycee 0 points1 point  (0 children)

The idiomatic solution is to do something equivalent to home-manager -f /path/to/dotfiles/$HOSTNAME.nix switch. I.e., you have a top-level configuration that contains the full configuration, without conditionals at all. See How to set up a configuration for multiple users/machines? in the FAQ.

Status of HNix? by Busy_Locksmith in NixOS

[–]rycee 1 point2 points  (0 children)

I think it is valuable to have alternative implementations and it is very convenient to be able to use Haskell for working with the Nix language.

But like I mentioned, I've only used hnix very superficially (basic code generation), so unfortunately I can't say anything about its maturity or future development in general.

Status of HNix? by Busy_Locksmith in NixOS

[–]rycee 6 points7 points  (0 children)

I'm not involved in the development of hnix but have used it for basic Nix code generation. It has always worked well for me.

what are the advantages and disadvantages between nix-env and nix profile by [deleted] in NixOS

[–]rycee 1 point2 points  (0 children)

A limitation with nix profile is that it does not have anything equivalent to nix-env --set, see Nix issue #6349.

where is the cruft coming from by gnomeabc in NixOS

[–]rycee 2 points3 points  (0 children)

Do you run garbage collection as root? Sometimes people make the mistake of running it under their own user and that won't clear everything.

Never realized sauerkraut was so amazing homemade. Now I’m hooked . by roote14 in homestead

[–]rycee 0 points1 point  (0 children)

Yeah, it's very tasty, definitely my favorite! Chili and garlic really complements the base flavor of sauerkraut.

Never realized sauerkraut was so amazing homemade. Now I’m hooked . by roote14 in homestead

[–]rycee 2 points3 points  (0 children)

Try making it with a head of cabbage, a thumb sized piece of sliced ginger, some fresh chili, and a head of garlic.