> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/1password/configure-shell-plugins-using-nix.md).

# Nixを使ってシェルプラグインを設定する

### **Nixを使ってシェルプラグインを設定する** <a href="#id-5yrrf6o4lmni" id="id-5yrrf6o4lmni"></a>

Nixを使ってシェル設定を管理している場合は、Nix設定内で1Password Shellプラグインをネイティブに設定できます。

* 1\. 1Password Shell Plugins フレークをフレーク入力に追加します。
* {
* description = "My NixOS system flake";
* inputs = {
* nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
* \# import the 1Password Shell Plugins Flake
* \_1password-shell-plugins.url = "github:1Password/shell-plugins";
* \# the rest of your flake inputs here
* };
* outputs = inputs@{ nixpkgs, ... }: {
* \# the rest of your flake here
* }
* }
* 2\. flakeの出力設定のどこかに適切なモジュールをインポートして使います。
  * ホームマネージャーなしの NixOS
* {
* \# import the NixOS module
* imports = \[ inputs.\_1password-shell-plugins.nixosModules.default ];
* programs.\_1password-shell-plugins = {
* \# enable 1Password shell plugins for bash, zsh, and fish shell
* enable = true;
* \# the specified packages as well as 1Password CLI will be
* \# automatically installed and configured to use shell plugins
* plugins = with pkgs; \[ gh awscli2 cachix ];
* };
* \# this can also be \`programs.bash\` or \`programs.fish\`
* programs.zsh = {
* enable = true;
* \# the rest of your shell configuration here
* };
* }
  * ホームマネージャーありのNix
* {
* \# import the home-manager module
* imports = \[ inputs.\_1password-shell-plugins.hmModules.default ];
* programs.\_1password-shell-plugins = {
* \# enable 1Password shell plugins for bash, zsh, and fish shell
* enable = true;
* \# the specified packages as well as 1Password CLI will be
* \# automatically installed and configured to use shell plugins
* plugins = with pkgs; \[ gh awscli2 cachix ];
* };
* \# this can also be \`programs.bash\` or \`programs.fish\`
* programs.zsh = {
* enable = true;
* \# the rest of your shell configuration here
* };
* }
* 3\. 更新された設定を適用します。
  * NixOS（NixOS モジュールとしてホームマネージャーを含む）
* \~/path/to/flake/directory/はflake.nixファイルを含むディレクトリーへのパスであり、my-computerはシステム設定として使うflake出力の名前です。
* sudo nixos-rebuild switch --flake "\~/path/to/flake/directory/.#my-computer"
  * スタンドアロンのホームマネージャーありのNix
* \~/path/to/flake/directory/はflake.nixファイルを含むディレクトリーへのパスであり、my-computerはシステム設定として使うflake出力の名前です。
* $ home-manager switch --flake "\~/path/to/flake/directory/.#my-computer"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.dxable.com/1password/configure-shell-plugins-using-nix.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
