aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-03-13 03:18:48 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-03-13 03:18:48 +0100
commit47222396e0444271aa4778afb60f157ddd98cc0e (patch)
treebfcbf5b527cf624bcfa03e736d6f1bfd02cedbe8
parentmodules/{plymouth,ly}: Use better animations (diff)
downloadnixos-config-47222396e0444271aa4778afb60f157ddd98cc0e.zip
modules/ly: Make the river desktop target available to ly
As `ly` runs under `root`, it obviously cannot access `soispha`'s desktop target files.
-rw-r--r--modules/by-name/ly/ly/module.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/by-name/ly/ly/module.nix b/modules/by-name/ly/ly/module.nix
index 809eb256..0c8f5f85 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,8 @@ in {
animation = "matrix";
+ custom_sesions = "${customSessionsDir}";
+
# Clear the password on failure.
clear_password = true;