1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-11 05:39:44 +01:00

rofi-pass: add package option

This commit is contained in:
Robert Walter 2023-09-19 20:24:36 +00:00 committed by Mikilio
parent bd2e251fa3
commit 92d368d971
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -7,11 +7,14 @@ let
cfg = config.programs.rofi.pass; cfg = config.programs.rofi.pass;
in { in {
meta.maintainers = [ maintainers.seylerius ]; meta.maintainers = with maintainers; [ seylerius robwalt ];
options.programs.rofi.pass = { options.programs.rofi.pass = {
enable = mkEnableOption "rofi integration with password-store"; enable = mkEnableOption "rofi integration with password-store";
package =
mkPackageOption pkgs "rofi-pass" { example = "pkgs.rofi-pass-wayland"; };
stores = mkOption { stores = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
@ -37,7 +40,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ pkgs.rofi-pass ]; home.packages = [ cfg.package ];
xdg.configFile."rofi-pass/config".text = optionalString (cfg.stores != [ ]) xdg.configFile."rofi-pass/config".text = optionalString (cfg.stores != [ ])
("root=" + (concatStringsSep ":" cfg.stores) + "\n") + cfg.extraConfig ("root=" + (concatStringsSep ":" cfg.stores) + "\n") + cfg.extraConfig