!KEJUbONnoBpiYKGWEq:nixos.org

NixOS Gaming

715 Members
Gaming things, my hands are typing words.182 Servers

Load older messages


SenderMessageTime
27 Jan 2024
@k900:0upti.meK900I know you said you tried17:44:11
@k900:0upti.meK900But this smells like libgbm mismatch17:44:16
@x10an14:matrix.orgx10an14
In reply to @k900:0upti.me
Is your Sway from the same nixpkgs as the rest?

I think so. This is the sway binary I use (this is configured in home-manager, same nix codebase, but completely unconnected to nixos, beyond sharing same flake inputs):

  programs.bash.profileExtra = let
    systemd-cat = "${pkgs.systemd}/bin/systemd-cat";
    sway = "${config.wayland.windowManager.sway.package}/bin/sway";
  in ''
    if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty4" ]; then
       # https://wiki.archlinux.org/title/Sway#Automatically_on_TTY_login
       exec ${systemd-cat} --identifier=sway ${sway}
    fi
  '';
17:44:58
@k900:0upti.meK900Do you maybe have different versions of the flake activated though17:45:28
@k900:0upti.meK900That could also do it17:45:32
@x10an14:matrix.orgx10an14

This is my sway config on the nixos side of same flake inputs-sharing nix-repo:

_:
# Sway specific stuffs (fixes that must be system based - instead of home-manager based)
{
  # Allow Wayland stuff to use OpenGL
  #  (Anything installed via Home-Manager needs a new switch for this to take effect)
  hardware.opengl.enable = true;

  # Necessary according to Nixos Wiki for Sway under HM:
  security.polkit.enable = true;

  # Allow swaylock to unlock machine;
  #   necessary due to: https://github.com/NixOS/nixpkgs/issues/143365
  programs.sway.enable = true;

  # Allow screensharing:
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    pulse.enable = true;
  };

  xdg.portal = {
    enable = true;
    wlr.enable = true;
    # Don't enable unless sway.wrapperFeatures.gtk is also enabled
    # extraPortals = [pks.xdg-desktop-portal-gtk];
    # gtkUsePortal = true;
  };

  # Enable icons for say, Gnome applications
  xdg.icons.enable = true;
}
17:45:53
@x10an14:matrix.orgx10an14
In reply to @k900:0upti.me
Do you maybe have different versions of the flake activated though
No, I always do sudo nixos-rebuild switch; home-manager switch. And I do the nix flake check --log-format internal-json -vvv |& nom --json before I activate either.
17:46:57
@k900:0upti.meK900Well I guess the other option is just "Sway broke Proton"17:47:21
@k900:0upti.meK900Which feels like a thing that should have been caught17:47:29
@x10an14:matrix.orgx10an14Well, I made sure to do this now that we updated, to avoid this pitfall at least. Not gonna say I'm perfect and never make mistakes.17:47:31
@k900:0upti.meK900But at this point17:47:46
@k900:0upti.meK900Wew17:47:46
@k900:0upti.meK900Strange stuff17:47:53
@x10an14:matrix.orgx10an14Aight, will see if I can produce some sway debug logs next time I feel like diving into this. Will just game with my patient friend who's been waiting for more than 2h now.17:51:54
@9hp71n:matrix.org@9hp71n:matrix.org Isn't this "${config.wayland.windowManager.sway.package} some HM thing that should not be used on NixOS ? 17:52:29
@9hp71n:matrix.org@9hp71n:matrix.org * Isn't this "${config.wayland.windowManager.sway.package} some HM thing that should not be used on NixOS ?
This one: programs.sway.enable = true; uses other package with some NixOS specific overrides inside.
17:53:17
@x10an14:matrix.orgx10an14
In reply to @9hp71n:matrix.org
Isn't this "${config.wayland.windowManager.sway.package} some HM thing that should not be used on NixOS ?
This one: programs.sway.enable = true; uses other package with some NixOS specific overrides inside.
Please do document/provide source =) Could be!
17:53:33
@9hp71n:matrix.org@9hp71n:matrix.org * Isn't this "${config.wayland.windowManager.sway.package} some HM thing that should not be used on NixOS ?
This one: programs.sway.enable = true; uses other package with some NixOS specific overrides inside.
If it's a NixOS one.
17:53:52
@x10an14:matrix.orgx10an14Bit of a shame if it's the case, 'cause I wanted my HM config to be NixOS independent. But some more coding should provide a way to fix that I suppose.17:54:48
@9hp71n:matrix.org@9hp71n:matrix.org

Nevermind, I think it should be okay ?
https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.sway.package

Sway package to use. Will override the options ‘wrapperFeatures’, ‘extraSessionCommands’, and ‘extraOptions’. Set to null to not add any Sway package to your path. This should be done if you want to use the NixOS Sway module to install Sway.
I know NixOS module does some things inside:
https://github.com/NixOS/nixpkgs/blob/a77ab169a83a4175169d78684ddd2e54486ac651/nixos/modules/programs/wayland/sway.nix#L34
but they are probably not related your issue.

17:57:22
@9hp71n:matrix.org@9hp71n:matrix.org *

Nevermind, I think it should be okay ?
https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.sway.package

Sway package to use. Will override the options ‘wrapperFeatures’, ‘extraSessionCommands’, and ‘extraOptions’. Set to null to not add any Sway package to your path. This should be done if you want to use the NixOS Sway module to install Sway.

I know NixOS module does some things inside:
https://github.com/NixOS/nixpkgs/blob/a77ab169a83a4175169d78684ddd2e54486ac651/nixos/modules/programs/wayland/sway.nix#L34
but they are probably not related your issue.

17:57:38
@9hp71n:matrix.org@9hp71n:matrix.org Actually you were running sway from HM, so if you didn't have home-manager.inputs.nixpkgs.follows = "nixpkgs"; (and maybe useGlobalPkgs=true;) it could have different version. 18:08:27
@9hp71n:matrix.org@9hp71n:matrix.org * Actually you were running sway from HM, so if you didn't have home-manager.inputs.nixpkgs.follows = "nixpkgs"; (and maybe useGlobalPkgs = true; ?) it could have different version. 18:09:24
@9hp71n:matrix.org@9hp71n:matrix.org * Actually you were running sway from HM, so if you didn't have:
home-manager.inputs.nixpkgs.follows = "nixpkgs";
(and maybe useGlobalPkgs = true; ?)
it could have different version.
18:10:18
@k900:0upti.meK900
In reply to@9hp71n:matrix.org
Actually you were running sway from HM, so if you didn't have:
home-manager.inputs.nixpkgs.follows = "nixpkgs";
(and maybe useGlobalPkgs = true; ?)
it could have different version.
They're doing HM standalone on NixOS
18:16:24
@k900:0upti.meK900So no useGlobalPkgs or follows will help, technically18:16:31
@9hp71n:matrix.org@9hp71n:matrix.orgNot sure about useGlobalPkgs. But even for standalone if they don't do follows wouldn't their sway and all its dependencies be from nixpkgs that is currently locked in HM repo ?18:27:16
@k900:0upti.meK900Well yes but even if they do it won't help18:27:30
@k900:0upti.meK900 Because they may have different versions of nixpkgs at different times 18:27:42
@k900:0upti.meK900As in, the active nixos may be built from another flake revision18:27:57

Show newer messages


Back to Room ListRoom Version: 6