-
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.
Include activation functions to setup password store
- Loading branch information
1 parent
a12326a
commit 237436c
Showing
6 changed files
with
52 additions
and
29 deletions.
There are no files selected for viewing
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
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
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,16 +1,7 @@ | ||
{ config, pkgs, ... }: | ||
let | ||
isDarwin = pkgs.stdenv.isDarwin; | ||
in | ||
{ | ||
{ config, pkgs, ... }: { | ||
home.file.".config/gopass/config".text = | ||
if isDarwin then '' | ||
[mounts] | ||
path = ${config.home.homeDirectory}/.password-store | ||
'' | ||
else | ||
'' | ||
[mounts] | ||
path = ${config.home.homeDirectory}/.local/share/.password-store | ||
''; | ||
'' | ||
[mounts] | ||
path = ${config.home.homeDirectory}/.password-store | ||
''; | ||
} |
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
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,28 @@ | ||
{ config, pkgs, ... }: { | ||
home.activation = { | ||
passwordStore = '' | ||
PW_DIR=${config.home.homeDirectory}/.password-store | ||
if [ ! -d "$PW_DIR" ]; then | ||
mkdir -p "$PW_DIR" | ||
fi | ||
cd $PW_DIR | ||
# the following PATH addition is to make sure that binaries like `git`, `emacs`, `ssh` are available for use | ||
export PATH="${config.home.path}/bin:/run/current-system/sw/bin:/etc/profiles/per-user/${config.home.username}/bin:$PATH" | ||
git init | ||
if git remote | grep -q origin; then | ||
git remote set-url origin [email protected]:rounakdatta/pass.git | ||
else | ||
git remote add origin [email protected]:rounakdatta/pass.git | ||
fi | ||
git fetch origin | ||
git pull origin master | ||
gopass-jsonapi configure --browser chrome --global=false --path=${config.home.homeDirectory}/.config/gopass | ||
gopass-jsonapi configure --browser firefox --global=false --path=${config.home.homeDirectory}/.config/gopass | ||
''; | ||
}; | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
imports = [ | ||
../../configs | ||
../commons/pass.nix | ||
]; | ||
|
||
home = { | ||
|