2022-05-05 23:01:56 -04:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-04-28 22:43:50 -04:00
|
|
|
|
2022-12-21 14:18:03 -07:00
|
|
|
options = {
|
2023-02-20 17:49:00 -05:00
|
|
|
_1password = {
|
2022-12-21 14:18:03 -07:00
|
|
|
enable = lib.mkEnableOption {
|
|
|
|
description = "Enable 1Password.";
|
|
|
|
default = false;
|
|
|
|
};
|
2022-04-28 22:43:50 -04:00
|
|
|
};
|
|
|
|
};
|
2022-06-13 23:43:49 -04:00
|
|
|
|
2022-12-21 14:18:03 -07:00
|
|
|
config = lib.mkIf
|
2023-02-20 17:49:00 -05:00
|
|
|
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
2022-12-21 14:18:03 -07:00
|
|
|
unfreePackages = [ "1password" "_1password-gui" ];
|
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
home.packages = with pkgs; [ _1password-gui ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-28 22:43:50 -04:00
|
|
|
}
|