From e557b36cee03f965f4e1f800e19312e2c246182e Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Sun, 26 Mar 2023 08:36:56 -0700 Subject: [PATCH] Added swaylock config --- modules/desktop/addons/swaylock/default.nix | 22 +++++++++++++++++++++ modules/desktop/sway/default.nix | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/desktop/addons/swaylock/default.nix 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