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

Linux

12001 readers
641 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
[–] Steamymoomilk@sh.itjust.works 29 points 4 days ago* (last edited 4 days ago) (10 children)

Nixos user here for 4 years.

Yep

[–] Ephera@lemmy.ml 5 points 4 days ago (9 children)

Seems like there's now an option for that in Home-Manager: https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.sway.config.keybindings

But yeah, if you tried to use it when Sway wasn't yet well-supported, or just want to use some obscure software in general, then yeah, things can get more complicated...

[–] Oinks@lemmy.blahaj.zone 11 points 4 days ago* (last edited 4 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.

[–] balsoft@lemmy.ml 2 points 2 days ago

The CSS thing might be true, but the swayconfig file is probably a solvable problem, especially with everything being slowly moving to freeform modules. We just need to write a Nix -> swayconfig generator, which shouldn't be too difficult because swayconfig is not even turing-complete.

load more comments (5 replies)
load more comments (7 replies)
load more comments (7 replies)