initial whatsapp conf

This commit is contained in:
Henry Hiles 2025-06-08 22:37:04 -04:00
parent 52ba359c4e
commit 031af4ee92
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
4 changed files with 161 additions and 60 deletions

View file

@ -0,0 +1,47 @@
{
pkgs,
inputs,
config,
...
}: let
settings = {
appservice = {
as_token = "$CUSTOM_AS_TOKEN";
hs_token = "$CUSTOM_HS_TOKEN";
};
backfill = {
enabled = true;
max_initial_messages = 50;
max_catchup_messages = 20;
unread_hours_threshold = 300;
};
homeserver = {
domain = config.services.grapevine.settings.server_name;
address = config.services.grapevine.settings.server_discovery.client.base_url;
};
bridge = {
encryption = {
allow = true;
default = true;
require = false;
};
permissions = {
config.services.grapevine.settings.server_name = "user";
"@quadradical:${config.services.grapevine.settings.server_name}" = "admin";
};
};
};
in {
imports = [inputs.nix-matrix-appservices.nixosModule];
services.matrix-appservices.services.whatsapp = {
port = 8081;
format = "mautrix-go";
serviceConfig.EnvironmentFile = config.age.secrets."whatsapp.age".path;
package = pkgs.mautrix-whatsapp.override {withGoolm = true;};
inherit settings;
};
}

142
flake.lock generated
View file

@ -27,7 +27,9 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1743295082, "lastModified": 1743295082,
@ -49,7 +51,7 @@
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
@ -194,6 +196,21 @@
"type": "github" "type": "github"
} }
}, },
"devshell": {
"locked": {
"lastModified": 1642188268,
"narHash": "sha256-DNz4xScpXIn7rSDohdayBpPR9H9OWCMDOgTYegX081k=",
"owner": "numtide",
"repo": "devshell",
"rev": "696acc29668b644df1740b69e1601119bf6da83b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -298,6 +315,22 @@
} }
}, },
"flake-compat_4": { "flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"locked": { "locked": {
"lastModified": 1747046372, "lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
@ -481,7 +514,9 @@
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nix-filter": "nix-filter", "nix-filter": "nix-filter",
"nixpkgs": "nixpkgs_3", "nixpkgs": [
"nixpkgs"
],
"rocksdb": "rocksdb" "rocksdb": "rocksdb"
}, },
"locked": { "locked": {
@ -621,13 +656,51 @@
"type": "github" "type": "github"
} }
}, },
"nix-matrix-appservices": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_4",
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1683490239,
"narHash": "sha256-QKzpvl2XrqbobWq/I/smDa9hEniwctjJybXPVILHP0w=",
"owner": "coffeetables",
"repo": "nix-matrix-appservices",
"rev": "e795d2fbc61da45d49802bb3e8f8d0c70ddc1e68",
"type": "gitlab"
},
"original": {
"owner": "coffeetables",
"repo": "nix-matrix-appservices",
"type": "gitlab"
}
},
"nixlib": {
"locked": {
"lastModified": 1643502816,
"narHash": "sha256-Wrbt6Gs+hjXD3HUICPBJHKnHEUqiyx8rzHCgvqC1Bok=",
"owner": "divnix",
"repo": "nixpkgs.lib",
"rev": "ebed7ec5bcb5d01e298535989c6c321df18b631a",
"type": "github"
},
"original": {
"owner": "divnix",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1734435836, "lastModified": 1726042813,
"narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=", "narHash": "sha256-LnNKCCxnwgF+575y0pxUdlGZBO/ru1CtGHIqQVfvjlA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4989a246d7a390a859852baddb1013f825435cee", "rev": "159be5db480d1df880a0135ca0bfed84c2f88353",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -654,38 +727,6 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1726042813,
"narHash": "sha256-LnNKCCxnwgF+575y0pxUdlGZBO/ru1CtGHIqQVfvjlA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "159be5db480d1df880a0135ca0bfed84c2f88353",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1742889210,
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1749143949, "lastModified": 1749143949,
"narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=", "narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=",
@ -701,22 +742,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": {
"locked": {
"lastModified": 1748460289,
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": [
@ -789,7 +814,8 @@
"grapevine": "grapevine", "grapevine": "grapevine",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nh": "nh", "nh": "nh",
"nixpkgs": "nixpkgs_4", "nix-matrix-appservices": "nix-matrix-appservices",
"nixpkgs": "nixpkgs_2",
"programsdb": "programsdb", "programsdb": "programsdb",
"stylix": "stylix", "stylix": "stylix",
"wrapper-manager": "wrapper-manager" "wrapper-manager": "wrapper-manager"
@ -819,12 +845,14 @@
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme_2", "firefox-gnome-theme": "firefox-gnome-theme_2",
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_3", "home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_5", "nixpkgs": [
"nixpkgs"
],
"nur": "nur", "nur": "nur",
"systems": "systems_4", "systems": "systems_4",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",

View file

@ -1,8 +1,22 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
agenix-cli.url = "github:cole-h/agenix-cli"; grapevine = {
grapevine.url = "gitlab:matrix/grapevine?ref=olivia/openid-api&host=gitlab.computer.surgery"; url = "gitlab:matrix/grapevine?ref=olivia/openid-api&host=gitlab.computer.surgery";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-matrix-appservices = {
url = "gitlab:coffeetables/nix-matrix-appservices";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix-cli = {
url = "github:cole-h/agenix-cli";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = { agenix = {
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -11,7 +25,6 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
stylix.url = "github:danth/stylix";
firefox-gnome-theme = { firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme"; url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false; flake = false;

13
secrets/whatsapp.age Normal file
View file

@ -0,0 +1,13 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSAwZjhT
aVFGN21KODAvTXplMGFSbzdKbDk5RnE5bjlNcDRCTzhWdEp3RXdNCmlYTXR5SERW
ak5CdE15WHRDVy94OWo0akVMelg2VUF6eWNKU0pFWkMyLzQKLT4gcVQrMitVRS1n
cmVhc2UKRG4rRU5CV3ROVGUxaXVLck9XT3VYRmFMV0hHcjFTSXpoWTdUNmRtN3NV
WGxGT2tjakMrc0w0ZUNMbUhmcXlsYwovejNHNjQyZ253bXJ0MzZsN2pHeGRLSWNs
MUx4WGphMkF2bm5qZC9uWmhIaFBNT0sKLS0tIFFuZDB2WU5wSldlMzQwWUc0VXFJ
RHFjQ1VmNVNiSXUwUzJMYzFXWWdVQXMKZjck4OpDmt6YFrKrm9hXbckAeUV7OKwK
K991ndhqdgEQbHK2R10HsTWOz2KkWpgTIaJ5NDwNJ4XqCAE+/KHPEBYMhMx1xwFw
iJU0fzz2pMDn9SJHBMSBqjMHbhI2ncg+N/dCLmqVqwPvc4efMBEI/8YAAdfinPFK
OAsrOgZyRgt7nHjE4knlchidredIrERzmy5Jjg2iYF0L1/161OOZfHF018FJc8sd
yclmKxJSsKDsbM5vsXpuuPrPj666IuP4oG4=
-----END AGE ENCRYPTED FILE-----