Skip to content

fix(nix/greeter): skip invalid customThemeFile in preStart#1997

Merged
LuckShiba merged 2 commits intoAvengeMedia:masterfrom
z1-0:master
Mar 15, 2026
Merged

fix(nix/greeter): skip invalid customThemeFile in preStart#1997
LuckShiba merged 2 commits intoAvengeMedia:masterfrom
z1-0:master

Conversation

@z1-0
Copy link
Contributor

@z1-0 z1-0 commented Mar 14, 2026

Avoid attempting to copy a null/empty/missing customThemeFile path by validating the jq result and file existence before cp.

The default implementation of wrap systemd script in Nix is "set -e", so the code is interrupted here.

Avoid attempting to copy a null/empty/missing customThemeFile path by validating the jq result and file existence before cp.

Update distro/nix/greeter.nix

Co-authored-by: Lucas <43530291+LuckShiba@users.noreply.github.com>
@Purian23
Copy link
Collaborator

Happy to merge when you all think it's good to go

@z1-0
Copy link
Contributor Author

z1-0 commented Mar 14, 2026

Changes addressed, PTAL

If this PR is accepted, I will submit the same changes to the dms module in the nixpkgs repo

@LuckShiba
Copy link
Collaborator

It seems to work in my system. I added back the -f once I realized -r may return true if it's a directory. LGTM!

@Purian23
Copy link
Collaborator

@LuckShiba, please me sure I didn't break anything via 1661d32

@LuckShiba
Copy link
Collaborator

Re-testing now!

@LuckShiba
Copy link
Collaborator

Seems to work with 1661d32.

@LuckShiba LuckShiba merged commit 0e2162c into AvengeMedia:master Mar 15, 2026
2 checks passed
bbedward pushed a commit that referenced this pull request Mar 20, 2026
* fix(nix/greeter): skip invalid customThemeFile in preStart

Avoid attempting to copy a null/empty/missing customThemeFile path by validating the jq result and file existence before cp.

Update distro/nix/greeter.nix

Co-authored-by: Lucas <43530291+LuckShiba@users.noreply.github.com>

* nix/greeter: update customTheme verification

---------

Co-authored-by: Lucas <43530291+LuckShiba@users.noreply.github.com>
Co-authored-by: LuckShiba <luckshiba@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants