summaryrefslogtreecommitdiff
path: root/profiles/core
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-02-11 22:18:08 +0100
committerMike Vink <mike@pionative.com>2024-02-11 22:18:08 +0100
commit6becf0ceea7782d8fce32203b7299b495f74ba3a (patch)
treedccd85bc2f09bf55fe82c0a8a0b53e5495bef3f2 /profiles/core
parent86aff11de7edf77d0aa69e9f211325162a6fed0b (diff)
sync passwords
Diffstat (limited to 'profiles/core')
-rw-r--r--profiles/core/home.nix2
-rw-r--r--profiles/core/secrets.nix9
-rw-r--r--profiles/core/syncthing.nix9
3 files changed, 17 insertions, 3 deletions
diff --git a/profiles/core/home.nix b/profiles/core/home.nix
index 7ad543e..55c9587 100644
--- a/profiles/core/home.nix
+++ b/profiles/core/home.nix
@@ -136,7 +136,7 @@
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
- ssh-add -l > /dev/null || ssh-add
+ ssh-add -l > /dev/null || ssh-add ~/.ssh/id_ed25519_sk
'';
shellAliases = {
k9s = "k9s ";
diff --git a/profiles/core/secrets.nix b/profiles/core/secrets.nix
index c1253bf..e5f5cc8 100644
--- a/profiles/core/secrets.nix
+++ b/profiles/core/secrets.nix
@@ -1,4 +1,4 @@
-{machine,inputs,lib,pkgs,...}: with lib;
+{machine,inputs,config,lib,pkgs,...}: with lib;
let
getSecrets = dir:
mapAttrs' (name: _: let
@@ -36,7 +36,12 @@ in
};
hm = {
- programs.password-store.enable = true;
+ programs.password-store = {
+ enable = true;
+ settings = {
+ PASSWORD_STORE_DIR = "${config.synced.password-store.path}/password-store";
+ };
+ };
};
};
}
diff --git a/profiles/core/syncthing.nix b/profiles/core/syncthing.nix
index 7135fad..e076d8d 100644
--- a/profiles/core/syncthing.nix
+++ b/profiles/core/syncthing.nix
@@ -1,6 +1,10 @@
{machine, config, lib,...}: with lib; let
group = if machine.isDarwin then (builtins.toString config.ivi.gid) else config.ivi.group;
in {
+ imports = [
+ (mkAliasOptionModule [ "synced" ] [ "services" "syncthing" "settings" "folders" ])
+ ];
+
services.syncthing = {
enable = true;
user = ivi.username;
@@ -48,6 +52,11 @@ in {
devices = allNames;
versioning = trashcan;
};
+ password-store = {
+ path = "${config.ivi.home}/sync/password-store";
+ devices = allNames;
+ versioning = trashcan;
+ };
};
};
};