Configured wallpaper for swaylock

This commit is contained in:
Alejandro Angulo 2023-03-29 22:58:04 -07:00
parent 2a6f844ff1
commit 207364a427
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
2 changed files with 7 additions and 3 deletions

View file

@ -7,6 +7,7 @@
}:
with lib; let
cfg = config.aa.desktop.addons.swaylock;
user_cfg = config.home-manager.users.${config.aa.user.name};
in {
options.aa.desktop.addons.swaylock = with types; {
enable = mkEnableOption "swaylock";
@ -15,6 +16,12 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [swaylock];
aa.home.extraOptions = {
programs.swaylock.settings = {
image = "${user_cfg.xdg.dataHome}/${config.aa.desktop.sway.wallpaperPath}";
};
};
# Workaround for https://github.com/NixOS/nixpkgs/issues/158025
# This comment specifically: https://github.com/NixOS/nixpkgs/issues/158025#issuecomment-1344766809
security.pam.services.swaylock = {};