Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/cosmic: init; nixos/cosmic-greeter: init #267099

Closed
wants to merge 1,612 commits into from

Conversation

nyabinary
Copy link
Contributor

@nyabinary nyabinary commented Nov 12, 2023

Description of changes

  • Adds a cosmic module for the COSMIC DE
  • Adds a cosmic-greeter module for the COSMIC greeter

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@elijahimmer
Copy link
Contributor

Wouldn't it be better to place this project in nixos/modules/services/desktops/? From all I can tell, Cosmic is not a X11 desktop, nor does it have X11 support (other than xwayland)?

I do think that maybe there should be a nixos/modules/services/desktops/wayland or nixos/modules/services/wayland/desktops/ just so that when there is another protocol or something that comes out that we have a structure to separate it as we have done with X11 sofar.

@lilyinstarlight
Copy link
Member

lilyinstarlight commented Nov 13, 2023

Wouldn't it be better to place this project in nixos/modules/services/desktops/? From all I can tell, Cosmic is not a X11 desktop, nor does it have X11 support (other than xwayland)?

This directory has nothing to do with X11 any longer and Wayland-only desktop environments also exist in that directory. It's just as misnamed as services.xserver.* at this point, which all have to do with anything graphical (X11 or not)

The nixos/modules/services/desktops directory is for desktop services, not desktop environments, and would be an inappropriate place to put it (though I will admit that directory is also poorly named)

I do think that maybe there should be a nixos/modules/services/desktops/wayland or nixos/modules/services/wayland/desktops/ just so that when there is another protocol or something that comes out that we have a structure to separate it as we have done with X11 sofar.

Honestly we should probably just make it one graphical directory/option namespace instead of x11/xserver. Feel free to propose that for NixOS though! It's just a bigger discussion than this PR

@kevincox
Copy link
Contributor

I tried this and it failed to start due to what appears to be a hardcoded path to xdg-desktop-portal-cosmic.

thread 'main' panicked at 'failed to start /usr/libexec/xdg-desktop-portal-cosmic': src/main.rs:405
Full Log
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: Starting cosmic-session
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' COSMIC_SESSION_SOCK=12 cosmic-comp '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.423345Z  INFO cosmic_session: Starting cosmic-session
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.423399Z  INFO launch_pad: starting process ' COSMIC_SESSION_SOCK=12 cosmic-comp '
Jan 25 13:12:21 kevinryzen .cosmic-comp-wrapped[4659]: Failed to read config 'workspaces'
Jan 25 13:12:21 kevinryzen .cosmic-comp-wrapped[4659]: Failed to read config 'xkb-config'
Jan 25 13:12:21 kevinryzen .cosmic-comp-wrapped[4659]: Failed to read config 'input-default'
Jan 25 13:12:21 kevinryzen .cosmic-comp-wrapped[4659]: Failed to read config 'input-touchpad'
Jan 25 13:12:21 kevinryzen .cosmic-comp-wrapped[4659]: Failed to read config 'input-devices'
Jan 25 13:12:21 kevinryzen .cosmic-comp-wrapped[4659]: Unable to become drm master, assuming unprivileged mode
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: got environmental variables from cosmic-comp: [("DISPLAY", ":0"), ("WAYLAND_DISPLAY", "wayland-1")]
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.680154Z  INFO cosmic_session: got environmental variables from cosmic-comp: [("DISPLAY", ":0"), ("WAYLAND_DISPLAY", "wayland-1")]
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' cosmic-settings-daemon '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.683283Z  INFO launch_pad: starting process ' cosmic-settings-daemon '
Jan 25 13:12:21 kevinryzen systemd[2133]: Reached target Cosmic Session Target.
Jan 25 13:12:21 kevinryzen systemd[2133]: Reached target Current graphical user session.
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland DAEMON_NOTIFICATIONS_FD=19 WAYLAND_SOCKET=22 cosmic-notifications '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.688199Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland DAEMON_NOTIFICATIONS_FD=19 WAYLAND_SOCKET=22 cosmic-notifications '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: sending 1 fds
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland PANEL_NOTIFICATIONS_FD=13 WAYLAND_SOCKET=22 cosmic-panel '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.688721Z  INFO cosmic_session::comp: sending 1 fds
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.688740Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland PANEL_NOTIFICATIONS_FD=13 WAYLAND_SOCKET=22 cosmic-panel '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=22 cosmic-app-library '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.689205Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=22 cosmic-app-library '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: sending 1 fds
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=23 cosmic-launcher '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.689683Z  INFO cosmic_session::comp: sending 1 fds
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.689698Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=23 cosmic-launcher '
Jan 25 13:12:21 kevinryzen .cosmic-notifications-wrapped[4764]: cosmic-notifications (com.system76.CosmicNotifications)
Jan 25 13:12:21 kevinryzen .cosmic-notifications-wrapped[4764]: Version: 0.1.0 (release)
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=32 cosmic-workspaces '
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.690137Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=32 cosmic-workspaces '
Jan 25 13:12:21 kevinryzen .cosmic-notifications-wrapped[4764]: Current Locale: [LanguageIdentifier { language: Language(Some("en")), script: None, region: Some(Region("CA")), variants: None }, LanguageIdentifier { language: Language(Some("en")), script: None, region: Some(Region("GB")), variants: None }, LanguageIdentifier { language: Language(Some("en")), script: None, region: None, variants: None }]
Jan 25 13:12:21 kevinryzen .cosmic-notifications-wrapped[4764]: No such file or directory (os error 2)
Jan 25 13:12:21 kevinryzen .cosmic-notifications-wrapped[4764]: No such file or directory (os error 2)
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: 2024-01-25T18:12:21.689832Z  INFO cosmic_notifications: cosmic-notifications (com.system76.CosmicNotifications)
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: 2024-01-25T18:12:21.689845Z  INFO cosmic_notifications: Version: 0.1.0 (release)
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.690568Z  INFO cosmic-notifications: cosmic_session::notifications: 2024-01-25T18:12:21.689832Z  INFO cosmic_notifications: cosmic-notifications (com.system76.CosmicNotifications)
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.690576Z  INFO cosmic-notifications: cosmic_session::notifications: 2024-01-25T18:12:21.689845Z  INFO cosmic_notifications: Version: 0.1.0 (release)
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.690612Z  INFO cosmic_session::comp: sending 1 fds
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.690625Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=36 cosmic-osd '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: sending 1 fds
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=36 cosmic-osd '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: 2024-01-25T18:12:21.690210Z  INFO i18n_embed::requester: Current Locale: [LanguageIdentifier { language: Language(Some("en")), script: None, region: Some(Region("CA")), variants: None }, LanguageIdentifier { language: Language(Some("en")), script: None, region: Some(Region("GB")), variants: None }, LanguageIdentifier { language: Language(Some("en")), script: None, region: None, variants: None }]    
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: 2024-01-25T18:12:21.690270Z ERROR cosmic::app::core: No such file or directory (os error 2)
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.691032Z  INFO cosmic-notifications: cosmic_session::notifications: 2024-01-25T18:12:21.690210Z  INFO i18n_embed::requester: Current Locale: [LanguageIdentifier { language: Language(Some("en")), script: None, region: Some(Region("CA")), variants: None }, LanguageIdentifier { language: Language(Some("en")), script: None, region: Some(Region("GB")), variants: None }, LanguageIdentifier { language: Language(Some("en")), script: None, region: None, variants: None }]
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.691038Z  INFO cosmic-notifications: cosmic_session::notifications: 2024-01-25T18:12:21.690270Z ERROR cosmic::app::core: No such file or directory (os error 2)
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.691042Z  INFO cosmic-notifications: cosmic_session::notifications: 2024-01-25T18:12:21.690275Z ERROR cosmic::app::core: No such file or directory (os error 2)
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: 2024-01-25T18:12:21.690275Z ERROR cosmic::app::core: No such file or directory (os error 2)
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.691073Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=40 cosmic-bg '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=40 cosmic-bg '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: sending 1 fds
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.691504Z  INFO cosmic_session::comp: sending 1 fds
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.691525Z  INFO launch_pad: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=50 PORTAL_WAYLAND_SOCKET=44 /usr/libexec/xdg-desktop-portal-cosmic '
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: starting process ' DISPLAY=:0 WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland WAYLAND_SOCKET=50 PORTAL_WAYLAND_SOCKET=44 /usr/libexec/xdg-desktop-portal-cosmic '
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-panel[4765]: Panel Entry Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 25 13:12:21 kevinryzen cosmic-session[4645]: thread 'main' panicked at 'failed to start /usr/libexec/xdg-desktop-portal-cosmic': src/main.rs:405
                                                    0: <backtrace::capture::Backtrace as core::default::Default>::default
                                                    1: log_panics::Config::install_panic_hook::{{closure}}
                                                    2: std::panicking::rust_panic_with_hook
                                                    3: std::panicking::begin_panic_handler::{{closure}}
                                                    4: std::sys_common::backtrace::__rust_end_short_backtrace
                                                    5: rust_begin_unwind
                                                    6: core::panicking::panic_fmt
                                                    7: cosmic_session::start_component::{{closure}}
                                                    8: cosmic_session::start::{{closure}}
                                                    9: <core::pin::Pin<P> as core::future::future::Future>::poll
                                                   10: tokio::runtime::scheduler::current_thread::Context::enter
                                                   11: tokio::runtime::context::set_scheduler
                                                   12: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
                                                   13: tokio::runtime::runtime::Runtime::block_on
                                                   14: cosmic_session::main
                                                   15: std::sys_common::backtrace::__rust_begin_short_backtrace
                                                   16: std::rt::lang_start::{{closure}}
                                                   17: std::panicking::try
                                                   18: std::rt::lang_start_internal
                                                   19: std::rt::lang_start
                                                   20: __libc_start_call_main
                                                   21: __libc_start_main@GLIBC_2.2.5
                                                   22: _start
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]: 2024-01-25T18:12:21.693111Z ERROR panic: thread 'main' panicked at 'failed to start /usr/libexec/xdg-desktop-portal-cosmic': src/main.rs:405
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    0: <backtrace::capture::Backtrace as core::default::Default>::default
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    1: log_panics::Config::install_panic_hook::{{closure}}
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    2: std::panicking::rust_panic_with_hook
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    3: std::panicking::begin_panic_handler::{{closure}}
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    4: std::sys_common::backtrace::__rust_end_short_backtrace
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    5: rust_begin_unwind
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    6: core::panicking::panic_fmt
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    7: cosmic_session::start_component::{{closure}}
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    8: cosmic_session::start::{{closure}}
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:    9: <core::pin::Pin<P> as core::future::future::Future>::poll
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   10: tokio::runtime::scheduler::current_thread::Context::enter
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   11: tokio::runtime::context::set_scheduler
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   12: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   13: tokio::runtime::runtime::Runtime::block_on
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   14: cosmic_session::main
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   15: std::sys_common::backtrace::__rust_begin_short_backtrace
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   16: std::rt::lang_start::{{closure}}
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   17: std::panicking::try
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   18: std::rt::lang_start_internal
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   19: std::rt::lang_start
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   20: __libc_start_call_main
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   21: __libc_start_main@GLIBC_2.2.5
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:   22: _start
Jan 25 13:12:21 kevinryzen /nix/store/6z8cf3nfr8dafnxkzdsq31dw4l5pzzwj-gdm-45.0.1/libexec/gdm-wayland-session[4645]:     
Jan 25 13:12:21 kevinryzen systemd[2133]: Stopped target Cosmic Session Target.
Jan 25 13:12:21 kevinryzen systemd[2133]: Stopped target Current graphical user session.

@samhug
Copy link
Contributor

samhug commented Jan 26, 2024

I tried this and it failed to start due to what appears to be a hardcoded path to xdg-desktop-portal-cosmic.

thread 'main' panicked at 'failed to start /usr/libexec/xdg-desktop-portal-cosmic': src/main.rs:405

Full Log

I believe this line needs to reference the full bin path, not just the package path:

xdg-desktop-portal-cosmic

The upstream flake uses /run/current-system/sw/bin/xdg-desktop-portal-cosmic instead of ${xdg-desktop-portal-cosmic}/bin/xdg-desktop-portal-cosmic. I'm not sure which one we want to use

@kevincox
Copy link
Contributor

IDK. There are tradeoffs. If you nixos-rebuild switch it may be nice to get the new portal. However IDK how stable the APIs between the portal and compositor is. It may be best to keep it version-locked so that you keep using the current version until you re-launch your session.

I would prefer to pin the exact version unless we hit some issue that requires us to reference the current version in /run/current-system/sw/bin/.

@nyabinary nyabinary force-pushed the cosmic-module branch 2 times, most recently from 84c49b9 to dbed9ee Compare February 26, 2024 17:18
@nyabinary nyabinary changed the title nixos/cosmic: init nixos/cosmic: init; nixos/cosmic-greeter: init Feb 26, 2024
@nyabinary
Copy link
Contributor Author

nyabinary commented Mar 1, 2024

Whoops :P
Attempt v2.0 here: #292601

@nyabinary nyabinary closed this Mar 1, 2024
@nyabinary nyabinary force-pushed the cosmic-module branch 4 times, most recently from 50f4f77 to 8785438 Compare March 1, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet