-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add _1password home-manager module and enable it on gamer and l…
…aptop hosts
- Loading branch information
Showing
5 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ lib, config, ... }: | ||
let | ||
cfg = config.modules.security._1password; | ||
in | ||
{ | ||
options.modules.security._1password = { | ||
enable = lib.mkEnableOption "_1password"; | ||
}; | ||
|
||
config = lib.mkMerge [ | ||
(lib.mkIf cfg.enable { | ||
# TODO: See if I can get this to work with home.sessionVariables instead | ||
programs.fish.shellInit = '' | ||
set -gx OP_CONNECT_HOST (jq -r .host ${config.sops.secrets.op_connect.path}) | ||
set -gx OP_CONNECT_TOKEN (jq -r .token ${config.sops.secrets.op_connect.path}) | ||
''; | ||
}) | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{ ... }: | ||
{ | ||
imports = [ | ||
./_1password | ||
./gnugpg | ||
./ssh | ||
]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
{ config, ... }: | ||
{ ... }: | ||
{ | ||
modules = { | ||
development.enable = true; | ||
kubernetes.enable = true; | ||
# TODO: See if I can automate this based on the nixos module being enabled on the host | ||
security._1password.enable = true; | ||
}; | ||
|
||
# TODO: See if I can get this to work with home.sessionVariables instead | ||
programs.fish.shellInit = '' | ||
set -gx OP_CONNECT_HOST (jq -r .host ${config.sops.secrets.op_connect.path}) | ||
set -gx OP_CONNECT_TOKEN (jq -r .token ${config.sops.secrets.op_connect.path}) | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
{ config, ... }: | ||
{ ... }: | ||
{ | ||
modules = { | ||
development.enable = true; | ||
kubernetes.enable = true; | ||
security._1password.enable = true; | ||
}; | ||
|
||
programs.fish.shellInit = '' | ||
set -gx OP_CONNECT_HOST (jq -r .host ${config.sops.secrets.op_connect.path}) | ||
set -gx OP_CONNECT_TOKEN (jq -r .token ${config.sops.secrets.op_connect.path}) | ||
''; | ||
} |