refactor: reduce duplication and improve consistency across hosts
- Centralize home-manager _module.args in profiles/nixos.nix via sharedModules - Add lib/secrets.nix with mkSyncthingSecrets helper for DRY secret definitions - Move syncthing device IDs to lib/constants.nix - Standardize hostname handling (Darwin hosts now use hostname arg) - Add missing networking.hostName to tahani - Fix redundant string interpolations
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
{user, ...}: {
|
||||
sops.secrets = {
|
||||
tahani-syncthing-cert = {
|
||||
sopsFile = ../../secrets/tahani-syncthing-cert;
|
||||
format = "binary";
|
||||
owner = user;
|
||||
path = "/home/${user}/.config/syncthing/cert.pem";
|
||||
{
|
||||
user,
|
||||
hostname,
|
||||
...
|
||||
}: let
|
||||
secrets = import ../../lib/secrets.nix;
|
||||
in {
|
||||
sops.secrets =
|
||||
secrets.mkSyncthingSecrets {
|
||||
inherit hostname user;
|
||||
isDarwin = false;
|
||||
}
|
||||
// {
|
||||
tahani-paperless-password = {
|
||||
sopsFile = ../../secrets/tahani-paperless-password;
|
||||
format = "binary";
|
||||
};
|
||||
};
|
||||
tahani-syncthing-key = {
|
||||
sopsFile = ../../secrets/tahani-syncthing-key;
|
||||
format = "binary";
|
||||
owner = user;
|
||||
path = "/home/${user}/.config/syncthing/key.pem";
|
||||
};
|
||||
tahani-paperless-password = {
|
||||
sopsFile = ../../secrets/tahani-paperless-password;
|
||||
format = "binary";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user