infrastructure/modules/home/swaylock.nix
2023-04-18 06:02:41 -07:00

12 lines
339 B
Nix

{ config, lib, pkgs, ... }: with lib;
let cfg = config.programs.swaylock; in
{
options.programs.swaylock = {
colors = mkOption {
type = types.attrsOf types.str;
default = { };
};
};
config.programs.swaylock.settings = mapAttrs' (arg: color: nameValuePair ("${arg}-color") (removePrefix "#" color)) cfg.colors;
}