This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/applications/1password.nix

26 lines
687 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
cfg = config.this.application.onepassword;
graphical = config.this.graphical;
enable = (cfg.gui.enable || cfg.cli.enable);
in with lib; {
options = {
this.application.onepassword.gui.enable = mkOption {
default = graphical.enable;
type = with types; bool;
};
this.application.onepassword.cli.enable = mkOption {
default = (graphical.enable || cfg.gui.enable);
type = with types; bool;
};
};
2022-03-24 22:38:01 +00:00
config = mkIf enable {
home-manager.users.james = {
2022-03-24 22:38:01 +00:00
home.packages = with pkgs;
optionals (cfg.gui.enable) [ _1password-gui ]
++ optionals (cfg.cli.enable) [ _1password ];
};
};
}