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

Linux

11701 readers
380 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 28 points 3 days ago* (last edited 3 days ago) (10 children)

Nixos user here for 4 years.

Yep

[–] Ephera@lemmy.ml 5 points 3 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 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.

Well, is it like that using home manager?

I remember home-manager integrated with flakes being a nightmare for my potato laptop because I defined even the bash alias and such stuffs in it and even if I had to change/add a simple alias I had to rebuild the whole system lol, I could have just used home-manager standalone to be honest(I forgot to do this) but I just switched to using the old way of managing dotfiles with stow.

So for me I defined it in the .config/sway/config file like this:

input * {
    xkb_layout "us"
    xkb_options "caps:ctrl_shifted_capslock"
}

Maybe I will come back to using standalone home-manager one day.

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