diff options
Diffstat (limited to '')
| -rw-r--r-- | modules/by-name/ly/ly/module.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/by-name/ly/ly/module.nix b/modules/by-name/ly/ly/module.nix index 809eb256..8835a2a2 100644 --- a/modules/by-name/ly/ly/module.nix +++ b/modules/by-name/ly/ly/module.nix @@ -14,6 +14,23 @@ ... }: let cfg = config.soispha.programs.ly; + + # HACK: We search for the generate river desktop file, which should exist <2026-03-13> + riverDesktop = + lib.lists.findFirst + (x: lib.strings.hasSuffix "river.desktop" x) + null + config.home-manager.users.soispha.home.packages; + + customSessionsDir = + pkgs.runCommand "custom-sessions" {} + /* + bash + */ + '' + mkdir "$out"; + cp "${riverDesktop}/share/applications/river.desktop" "$out" + ''; in { options.soispha.programs.ly = { enable = lib.mkEnableOption "ly"; @@ -27,6 +44,16 @@ in { }; config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = riverDesktop != null; + message = '' + There seems to be no `river.desktop` file generated. You will not be able to + log-into river without it. + ''; + } + ]; + services.displayManager.ly = { enable = true; x11Support = false; @@ -39,6 +66,12 @@ in { animation = "matrix"; + custom_sessions = "${customSessionsDir}"; + + # Clear the screen before starting up (otherwise error messages might linger on + # it.) + start_cmd = "clear"; + # Clear the password on failure. clear_password = true; |
