diff --git a/modules/desktop/addons/swaylock/default.nix b/modules/desktop/addons/swaylock/default.nix new file mode 100644 index 0000000..76b2691 --- /dev/null +++ b/modules/desktop/addons/swaylock/default.nix @@ -0,0 +1,22 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.aa.desktop.addons.swaylock; +in { + options.aa.desktop.addons.swaylock = with types; { + enable = mkEnableOption "swaylock"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [swaylock]; + + # 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 = {}; + }; +} diff --git a/modules/desktop/sway/default.nix b/modules/desktop/sway/default.nix index ca0643e..0bf32ef 100644 --- a/modules/desktop/sway/default.nix +++ b/modules/desktop/sway/default.nix @@ -30,9 +30,9 @@ in { gammastep.enable = true; mako.enable = true; rofi.enable = true; + swaylock.enable = true; waybar.enable = true; - # TODO # playerctl # light