this post was submitted on 31 Jan 2026
209 points (98.6% liked)

Linux

11919 readers
415 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Oinks@lemmy.blahaj.zone 10 points 3 days ago* (last edited 3 days ago) (6 children)

This module is actually a bit of a pet peeve of mine and a big reason I soured on Home Manager in general...

You inevitably end up writing chimera configurations like this:

# home.nix
programs.sway = {
  enable = true;
  
  # not supported by module - need to use escape hatch
  # good luck getting your editor to syntax highlight this snippet btw
  extraConfig = /* swayconfig */ ''
    bindgesture swipe:right workspace prev
    bindgesture swipe:left workspace next
  '';
};

programs.waybar = {
  enable = true:

  # can't do that in Nix
  style = /* css */ ''
    window#waybar {
      background: #16191C;
      color: #AAB2BF;
    }
  '';
};

# configuration.nix
# need to enable Sway a second time so the display manager can see it
# this may also install a second Sway if you fuck up your HM setup
programs.sway.enable = true;

and in exchange for this you get:

  • 30s+ iteration times for basic changes like keybinds
  • No ability to copy paste config snippets from READMEs/Wikis (unless you use home.file/extraConfig escape hatches)
  • No ability to edit configuration in scripts (breaks a lot of theming functionality in "shells" like DMS, Noctalia, etc.)
  • More ways to write configs that look right but don't quite work or just do dumb things (extra Nixpkgs imports, duplicated packages, WMs that aren't visible to the DM, etc.)

Alternatively you could just use a dotfile manager like rcm or stow or chezmoi like everyone not on NixOS+HM and not have to deal with any of this.

[–] tomenzgg@midwest.social 0 points 3 days ago (2 children)

Does Home Manager not just have a dot file manager built in? On Guix, I just have my Waybar config. get moved to the appropriate location that Waybar will expect it.

Some services will even allow you to specify files to get injected into the config.; like the Bash service so I can write some definitions out in a .sh file and the service inserts that contents after the boilerplate it provides into my .bashrc.

[–] Oinks@lemmy.blahaj.zone 7 points 3 days ago* (last edited 3 days ago) (1 children)

It does, that's the home.file escape hatch I mentioned. But then you end up paying 10-30 seconds eval for a "config" that looks like this:

{
  home.file.".bashrc".source = ./bashrc;
  home.file.".bash_profile".source = ./bash_profile;
  xdg.configFile.nvim.source = ./nvim;
  xdg.configFile.sway.source = ./sway;
  # ...
}

I suppose there are fringe use cases where Nix attrset merging behaviour is useful, but in the general case I just don't see much value here.

[–] balsoft@lemmy.ml 2 points 1 day ago* (last edited 1 day ago)

You don't have to waste 30 seconds on a full eval when just iterating, I use these one-liners when trying to get some config file working: https://github.com/balsoft/nixos-config/blob/master/flake.nix#L140 ; they only evaluate one specific file and then link it into the right location "imperatively"

Then when I get it working I do the nixos-rebuild switch, which is a no-op in terms of home-manager stuff because the link points to the same location, it just makes it so that it stays the same after a reboot (I use impermanence).

load more comments (3 replies)