2025-01-28 22:21:31 -06:00
|
|
|
{ flake, config, ... }:
|
|
|
|
let
|
|
|
|
inherit (flake.config.people)
|
2025-01-08 19:06:14 -06:00
|
|
|
user0
|
2025-01-28 22:21:31 -06:00
|
|
|
user2
|
2025-01-08 19:06:14 -06:00
|
|
|
;
|
2025-01-28 22:21:31 -06:00
|
|
|
inherit (flake.config.machines)
|
|
|
|
devices
|
|
|
|
;
|
|
|
|
hostname = config.networking.hostName;
|
2025-02-17 18:52:02 -06:00
|
|
|
jupiter = devices.jupiter.name;
|
|
|
|
ceres = devices.ceres.name;
|
|
|
|
saturn = devices.saturn.name;
|
|
|
|
callisto = devices.callisto.name;
|
2025-01-28 22:21:31 -06:00
|
|
|
|
|
|
|
userLogic =
|
2025-02-17 18:52:02 -06:00
|
|
|
if hostname == jupiter then
|
2025-01-28 22:21:31 -06:00
|
|
|
user0
|
2025-02-17 18:52:02 -06:00
|
|
|
else if hostname == ceres then
|
2025-01-30 13:40:42 -06:00
|
|
|
user0
|
2025-02-17 18:52:02 -06:00
|
|
|
else if hostname == saturn then
|
2025-01-28 22:21:31 -06:00
|
|
|
user2
|
|
|
|
else
|
|
|
|
"";
|
|
|
|
in
|
|
|
|
{
|
2024-10-11 17:38:05 -05:00
|
|
|
sops = {
|
2025-02-06 14:27:52 -06:00
|
|
|
defaultSopsFile = ../../../secrets/secrets.yaml;
|
2024-10-11 17:38:05 -05:00
|
|
|
validateSopsFiles = false;
|
|
|
|
age = {
|
|
|
|
keyFile = "/var/lib/sops-nix/key.txt";
|
|
|
|
generateKey = false;
|
|
|
|
};
|
2025-01-31 01:49:36 -06:00
|
|
|
secrets =
|
2025-02-17 18:52:02 -06:00
|
|
|
if hostname == callisto then
|
2025-01-31 01:49:36 -06:00
|
|
|
{ }
|
|
|
|
else
|
|
|
|
{
|
|
|
|
"ssh/private" = {
|
|
|
|
path = "/home/${userLogic}/.ssh/id_ed25519";
|
|
|
|
owner = userLogic;
|
|
|
|
};
|
|
|
|
"ssh/public" = {
|
|
|
|
path = "/home/${userLogic}/.ssh/id_ed25519.pub";
|
|
|
|
owner = userLogic;
|
|
|
|
};
|
|
|
|
"ssh/hosts" = {
|
|
|
|
path = "/home/${userLogic}/.ssh/known_hosts";
|
|
|
|
owner = userLogic;
|
|
|
|
};
|
|
|
|
# "claude-api-key" = {
|
|
|
|
# path = "/home/${user0}/.config/zed/claude-api-key";
|
|
|
|
# owner = user0;
|
|
|
|
# };
|
|
|
|
};
|
2024-10-11 17:38:05 -05:00
|
|
|
};
|
|
|
|
}
|