nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.13k stars 1.84k forks source link

bug: Shouldn't programs.swaylock.package allow null? #6090

Closed s0racat closed 4 days ago

s0racat commented 6 days ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

swaylock requires additional configuration for non NixOS and non-sway environments. Shouldn't such things be left to NixOS and the system?

Maintainer CC

@rcerc

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.60, NixOS, 24.11 (Vicuna), 24.11.20241113.24f0d4a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - nixpkgs: `/nix/store/c05d1sqfhkl93p3j5ykic68mgg1gsrvb-source`
rcerc commented 5 days ago

Thanks for reporting! I have filed #6095 to change this. In the meantime, you could set

package = pkgs.runCommandLocal "dummy" { } "mkdir $out";

Edit: Better alternative suggested below: pkgs.emptyDirectory.

s0racat commented 5 days ago

Thank you!

rycee commented 4 days ago

Instead of the pkgs.runCommandLocal … alternative above you can simply use pkgs.emptyDirectory. I think this is preferred in general over using a null.

rcerc commented 4 days ago

@rycee, I did not know about that! #6095 should be closed then?

s0racat commented 4 days ago

I understood. I will close this issue.