Compare commits
16 Commits
stable
...
wip/signal
Author | SHA1 | Date | |
---|---|---|---|
10d69fb0a4 | |||
98ae1a8513 | |||
72a2ab78f3 | |||
487af9b492 | |||
472d25c056 | |||
9eafacad12 | |||
0eb46a3179 | |||
ddb184b5ff | |||
194a6b6cf4 | |||
016384aa2b | |||
b4e19c037e | |||
bd504f6c83 | |||
bdd309eb15 | |||
eedc1170ec | |||
5a586c6e3c | |||
371bcad650 |
44
flake.lock
generated
44
flake.lock
generated
@@ -60,37 +60,38 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-FaeqnQPm3MIXkQsNsGTB4A9lN82YKpLkmVHgdJyJNGg=",
|
"narHash": "sha256-ERkw+xJQ2mZMztI8hzWjilnvHQtKHslNyuG9TXM/lCI=",
|
||||||
"path": "nixpatches",
|
"path": "/nix/store/zy5rd2m4ww1wwllfq8sgwvdslganf1ks-source/nixpatches",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "nixpatches",
|
"path": "/nix/store/zy5rd2m4ww1wwllfq8sgwvdslganf1ks-source/nixpatches",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673612960,
|
"lastModified": 1673704454,
|
||||||
"narHash": "sha256-DWR7hrbecJKmUJCswk9MXZta710mq+3jZwTvHU/UfyY=",
|
"narHash": "sha256-5Wdj1MgdOgn3+dMFIBtg+IAYZApjF8JzwLWDPieg0C4=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e285dd0ca97c264003867c7329f0d1f4f028739c",
|
"rev": "a83ed85c14fcf242653df6f4b0974b7e1c73c6c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"ref": "nixos-22.11",
|
"ref": "nixos-22.11",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673100377,
|
"lastModified": 1673740915,
|
||||||
"narHash": "sha256-mT76pTd0YFxT6CwtPhDgHJhuIgLY+ZLSMiQpBufwMG4=",
|
"narHash": "sha256-MMH8zONfqahgHly3K8/A++X34800rajA/XgZ2DzNL/M=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9f11a2df77cb945c115ae2a65f53f38121597d73",
|
"rev": "7c65528c3f8462b902e09d1ccca23bb9034665c2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -102,17 +103,18 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unpatched": {
|
"nixpkgs-unpatched": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673540789,
|
"lastModified": 1673631141,
|
||||||
"narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
|
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
|
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
@@ -134,11 +136,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673481602,
|
"lastModified": 1673752321,
|
||||||
"narHash": "sha256-P80X38fOM2MtoYdgkyuksGOQPDhIhNJW2W2jMeMIZzE=",
|
"narHash": "sha256-EFfXY1ZHJq4FNaNQA9x0djtu/jiOhBbT0Xi+BT06cJw=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "32187b33ac6ec9b628dcd08dd941a715e6241dda",
|
"rev": "e18eefd2b133a58309475298052c341c08470717",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
37
flake.nix
37
flake.nix
@@ -1,33 +1,44 @@
|
|||||||
# FLAKE FEEDBACK:
|
# FLAKE FEEDBACK:
|
||||||
# - flake input url schemes (like `github:nixos/nixpkgs`, or `nixpkgs/nixos-22.11`) are confusing and opaque.
|
# - if flake inputs are meant to be human-readable, a human should be able to easily track them down given the URL.
|
||||||
# - use established URI formats like https://github.com/<owner>/<repo>.
|
# - this is not the case with registry URLs, like `nixpkgs/nixos-22.11`.
|
||||||
# - or reuse `fetchGit*` idioms from nixpkgs.
|
# - this is marginally the case with schemes like `github:nixos/nixpkgs`.
|
||||||
# - but please don't just invent something new.
|
# - given the *existing* `git+https://` scheme, i propose expressing github URLs similarly:
|
||||||
# - need a way to apply local patches to inputs.
|
# - `github+https://github.com/nixos/nixpkgs/tree/nixos-22.11`
|
||||||
# - this could be part of the `inputs` proper, or something like `builtins.applyPatches`.
|
# - need some way to apply local patches to inputs.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# DEVELOPMENT DOCS:
|
# DEVELOPMENT DOCS:
|
||||||
# - <https://nixos.wiki/wiki/Flakes>
|
# - Flake docs: <https://nixos.wiki/wiki/Flakes>
|
||||||
|
# - Flake RFC: <https://github.com/tweag/rfcs/blob/flakes/rfcs/0049-flakes.md>
|
||||||
|
# - Discussion: <https://github.com/NixOS/rfcs/pull/49>
|
||||||
# - <https://serokell.io/blog/practical-nix-flakes>
|
# - <https://serokell.io/blog/practical-nix-flakes>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# XXX: use the `github:` scheme instead of the more readable git+https: because it's *way* more efficient
|
||||||
|
# preferably, i would rewrite the human-readable https URLs to nix-specific github: URLs with a helper,
|
||||||
|
# but `inputs` is required to be a strict attrset: not an expression.
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs-stable.url = "nixpkgs/nixos-22.11";
|
# <https://github.com/nixos/nixpkgs/tree/nixos-22.11>
|
||||||
nixpkgs-unpatched.url = "nixpkgs/nixos-unstable";
|
nixpkgs-stable.url = "github:nixos/nixpkgs?ref=nixos-22.11";
|
||||||
|
|
||||||
|
# <https://github.com/nixos/nixpkgs/tree/nixos-unstable>
|
||||||
|
nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
url = "path:nixpatches";
|
url = "./nixpatches";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unpatched";
|
inputs.nixpkgs.follows = "nixpkgs-unpatched";
|
||||||
};
|
};
|
||||||
mobile-nixos = {
|
mobile-nixos = {
|
||||||
|
# <https://github.com/nixos/mobile-nixos>
|
||||||
url = "github:nixos/mobile-nixos";
|
url = "github:nixos/mobile-nixos";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-22.05";
|
# <https://github.com/nix-community/home-manager/tree/release-22.05>
|
||||||
|
url = "github:nix-community/home-manager?ref=release-22.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
|
# <https://github.com/Mic92/sops-nix>
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
@@ -71,6 +82,7 @@
|
|||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
self.overlays.passthru
|
self.overlays.passthru
|
||||||
|
self.overlays.pins
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -108,10 +120,11 @@
|
|||||||
overlays = rec {
|
overlays = rec {
|
||||||
default = pkgs;
|
default = pkgs;
|
||||||
pkgs = import ./overlays/pkgs.nix;
|
pkgs = import ./overlays/pkgs.nix;
|
||||||
|
pins = import ./overlays/pins.nix; # TODO: move to `nixpatches/` input
|
||||||
passthru =
|
passthru =
|
||||||
let
|
let
|
||||||
stable = next: prev: {
|
stable = next: prev: {
|
||||||
stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform}";
|
stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform.system}";
|
||||||
};
|
};
|
||||||
mobile = (import "${mobile-nixos}/overlay/overlay.nix");
|
mobile = (import "${mobile-nixos}/overlay/overlay.nix");
|
||||||
uninsane = uninsane-dot-org.overlay;
|
uninsane = uninsane-dot-org.overlay;
|
||||||
|
@@ -30,6 +30,9 @@
|
|||||||
"/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget.
|
"/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget.
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# some services which use private directories error if the parent (/var/lib/private) isn't 700.
|
||||||
|
sane.fs."/var/lib/private".dir.acl.mode = "0700";
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# time.timeZone = "America/Los_Angeles";
|
# time.timeZone = "America/Los_Angeles";
|
||||||
|
@@ -21,6 +21,10 @@
|
|||||||
sane.ids.freshrss.uid = 2401;
|
sane.ids.freshrss.uid = 2401;
|
||||||
sane.ids.freshrss.gid = 2401;
|
sane.ids.freshrss.gid = 2401;
|
||||||
sane.ids.mediawiki.uid = 2402;
|
sane.ids.mediawiki.uid = 2402;
|
||||||
|
sane.ids.signald.uid = 2403;
|
||||||
|
sane.ids.signald.gid = 2403;
|
||||||
|
sane.ids.mautrix-signal.uid = 2404;
|
||||||
|
sane.ids.mautrix-signal.gid = 2404;
|
||||||
|
|
||||||
sane.ids.colin.uid = 1000;
|
sane.ids.colin.uid = 1000;
|
||||||
sane.ids.guest.uid = 1100;
|
sane.ids.guest.uid = 1100;
|
||||||
|
@@ -46,6 +46,8 @@
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
# provide access to certs
|
# provide access to certs
|
||||||
|
# TODO: this should just be `acme`. then we also add nginx to the `acme` group.
|
||||||
|
# why is /var/lib/acme/* owned by `nginx` group??
|
||||||
users.users.ejabberd.extraGroups = [ "nginx" ];
|
users.users.ejabberd.extraGroups = [ "nginx" ];
|
||||||
|
|
||||||
security.acme.certs."uninsane.org".extraDomainNames = [
|
security.acme.certs."uninsane.org".extraDomainNames = [
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./discord-puppet.nix
|
./discord-puppet.nix
|
||||||
# ./irc.nix
|
# ./irc.nix
|
||||||
|
./signal.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sane.persist.sys.plaintext = [
|
sane.persist.sys.plaintext = [
|
||||||
|
35
hosts/servo/services/matrix/signal.nix
Normal file
35
hosts/servo/services/matrix/signal.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# config options:
|
||||||
|
# - <https://github.com/mautrix/signal/blob/master/mautrix_signal/example-config.yaml>
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.signald.enable = true;
|
||||||
|
services.mautrix-signal.enable = true;
|
||||||
|
services.mautrix-signal.environmentFile =
|
||||||
|
config.sops.secrets.mautrix_signal_env.path;
|
||||||
|
|
||||||
|
services.mautrix-signal.settings.signal.socket_path = "/run/signald/signald.sock";
|
||||||
|
services.mautrix-signal.settings.homeserver.domain = "uninsane.org";
|
||||||
|
services.mautrix-signal.settings.bridge.permissions."@colin:uninsane.org" = "admin";
|
||||||
|
services.matrix-synapse.settings.app_service_config_files = [
|
||||||
|
# auto-created by mautrix-signal service
|
||||||
|
"/var/lib/mautrix-signal/signal-registration.yaml"
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services.mautrix-signal.serviceConfig = {
|
||||||
|
# allow communication to signald
|
||||||
|
SupplementaryGroups = [ "signald" ];
|
||||||
|
ReadWritePaths = [ "/run/signald" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
sane.persist.sys.plaintext = [
|
||||||
|
{ user = "mautrix-signal"; group = "mautrix-signal"; directory = "/var/lib/mautrix-signal"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
sops.secrets.mautrix_signal_env = {
|
||||||
|
sopsFile = ../../../../secrets/servo/mautrix_signal_env.bin;
|
||||||
|
format = "binary";
|
||||||
|
mode = "0440";
|
||||||
|
owner = config.users.users.mautrix-signal.name;
|
||||||
|
group = config.users.users.matrix-synapse.name;
|
||||||
|
};
|
||||||
|
}
|
@@ -4,6 +4,7 @@
|
|||||||
./duplicity.nix
|
./duplicity.nix
|
||||||
./dyn-dns.nix
|
./dyn-dns.nix
|
||||||
./kiwix-serve.nix
|
./kiwix-serve.nix
|
||||||
|
./mautrix-signal.nix
|
||||||
./nixserve.nix
|
./nixserve.nix
|
||||||
./trust-dns.nix
|
./trust-dns.nix
|
||||||
];
|
];
|
||||||
|
174
modules/services/mautrix-signal.nix
Normal file
174
modules/services/mautrix-signal.nix
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
dataDir = "/var/lib/mautrix-signal";
|
||||||
|
registrationFile = "${dataDir}/signal-registration.yaml";
|
||||||
|
cfg = config.services.mautrix-signal;
|
||||||
|
settingsFormat = pkgs.formats.json {};
|
||||||
|
settingsFile =
|
||||||
|
settingsFormat.generate "mautrix-signal-config.json" cfg.settings;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.mautrix-signal = {
|
||||||
|
enable = mkEnableOption (lib.mdDoc "Mautrix-Signal, a Matrix-Signal puppeting bridge");
|
||||||
|
|
||||||
|
settings = mkOption rec {
|
||||||
|
apply = recursiveUpdate default;
|
||||||
|
inherit (settingsFormat) type;
|
||||||
|
default = {
|
||||||
|
# defaults based on this upstream example config:
|
||||||
|
# - <https://github.com/mautrix/signal/blob/master/mautrix_signal/example-config.yaml>
|
||||||
|
homeserver = {
|
||||||
|
address = "http://localhost:8008";
|
||||||
|
software = "standard";
|
||||||
|
# domain = "SETME";
|
||||||
|
};
|
||||||
|
|
||||||
|
appservice = rec {
|
||||||
|
address = "http://${hostname}:${toString port}";
|
||||||
|
hostname = "localhost";
|
||||||
|
port = 29328;
|
||||||
|
|
||||||
|
database = "sqlite:///${dataDir}/mautrix-signal.db";
|
||||||
|
database_opts = {};
|
||||||
|
bot_username = "signalbot";
|
||||||
|
};
|
||||||
|
|
||||||
|
bridge = {
|
||||||
|
username_template = "signal_{userid}";
|
||||||
|
permissions."*" = "relay";
|
||||||
|
double_puppet_server_map = {};
|
||||||
|
login_shared_secret_map = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
logging = {
|
||||||
|
version = 1;
|
||||||
|
|
||||||
|
formatters.precise.format = "[%(levelname)s@%(name)s] %(message)s";
|
||||||
|
|
||||||
|
handlers.console = {
|
||||||
|
class = "logging.StreamHandler";
|
||||||
|
formatter = "precise";
|
||||||
|
};
|
||||||
|
|
||||||
|
# log to console/systemd instead of file
|
||||||
|
root = {
|
||||||
|
level = "INFO";
|
||||||
|
handlers = ["console"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
homeserver = {
|
||||||
|
address = "http://localhost:8008";
|
||||||
|
domain = "mydomain.example";
|
||||||
|
};
|
||||||
|
|
||||||
|
bridge.permissions = {
|
||||||
|
"@admin:mydomain.example" = "admin";
|
||||||
|
"mydomain.example" = "user";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
{file}`config.yaml` configuration as a Nix attribute set.
|
||||||
|
Configuration options should match those described in
|
||||||
|
[example-config.yaml](https://github.com/mautrix/signale/blob/master/mautrix_signal/example-config.yaml).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environmentFile = mkOption {
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
default = null;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
File containing environment variables to be passed to the mautrix-signal service,
|
||||||
|
in which secret tokens can be specified securely by defining values for e.g.
|
||||||
|
`MAUTRIX_SIGNAL_APPSERVICE_AS_TOKEN`,
|
||||||
|
`MAUTRIX_SIGNAL_APPSERVICE_HS_TOKEN`
|
||||||
|
|
||||||
|
These environment variables can also be used to set other options by
|
||||||
|
replacing hierarchy levels by `.`, converting the name to uppercase
|
||||||
|
and prepending `MAUTRIX_SIGNAL_`.
|
||||||
|
For example, the first value above maps to
|
||||||
|
{option}`settings.appservice.as_token`.
|
||||||
|
|
||||||
|
The environment variable values can be prefixed with `json::` to have
|
||||||
|
them be parsed as JSON. For example, `login_shared_secret_map` can be
|
||||||
|
set as follows:
|
||||||
|
`MAUTRIX_SIGNAL_BRIDGE_LOGIN_SHARED_SECRET_MAP=json::{"example.com":"secret"}`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceDependencies = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
|
||||||
|
defaultText = literalExpression ''
|
||||||
|
optional config.services.matrix-synapse.enable "matrix-synapse.service"
|
||||||
|
'';
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
List of Systemd services to require and wait for when starting the application service.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
users.groups.mautrix-signal = {};
|
||||||
|
|
||||||
|
users.users.mautrix-signal = {
|
||||||
|
group = "mautrix-signal";
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.mautrix-signal = {
|
||||||
|
description = "Mautrix-Signal, a Matrix-Signal puppeting bridge.";
|
||||||
|
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
wants = [ "network-online.target" ] ++ cfg.serviceDependencies;
|
||||||
|
after = [ "network-online.target" ] ++ cfg.serviceDependencies;
|
||||||
|
path = [ pkgs.ffmpeg ]; # voice messages need `ffmpeg`
|
||||||
|
|
||||||
|
# environment.HOME = dataDir;
|
||||||
|
|
||||||
|
preStart = ''
|
||||||
|
# generate the appservice's registration file if absent
|
||||||
|
if [ ! -f '${registrationFile}' ]; then
|
||||||
|
${pkgs.mautrix-signal}/bin/mautrix-signal \
|
||||||
|
--generate-registration \
|
||||||
|
--no-update \
|
||||||
|
--base-config='${pkgs.mautrix-signal}/${pkgs.mautrix-signal.pythonModule.sitePackages}/mautrix_signal/example-config.yaml' \
|
||||||
|
--config='${settingsFile}' \
|
||||||
|
--registration='${registrationFile}'
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
Restart = "always";
|
||||||
|
|
||||||
|
User = "mautrix-signal";
|
||||||
|
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
|
||||||
|
PrivateTmp = true;
|
||||||
|
WorkingDirectory = pkgs.mautrix-signal;
|
||||||
|
StateDirectory = baseNameOf dataDir;
|
||||||
|
UMask = "0027";
|
||||||
|
EnvironmentFile = cfg.environmentFile;
|
||||||
|
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.mautrix-signal}/bin/mautrix-signal \
|
||||||
|
--config='${settingsFile}' \
|
||||||
|
--no-update
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -1,15 +1,14 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-22.11";
|
nixpkgs = {};
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }@inputs:
|
||||||
let
|
let
|
||||||
patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches {
|
patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches {
|
||||||
name = "nixpkgs-patched-uninsane";
|
name = "nixpkgs-patched-uninsane";
|
||||||
src = nixpkgs;
|
src = nixpkgs;
|
||||||
patches = import ./list.nix {
|
patches = import ./list.nix {
|
||||||
inherit (nixpkgs.legacyPackages.${system}) fetchpatch;
|
inherit (nixpkgs.legacyPackages.${system}) fetchpatch fetchurl;
|
||||||
inherit (nixpkgs.lib) fakeHash;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
patchedFlakeFor = system: import "${patchedPkgsFor system}/flake.nix";
|
patchedFlakeFor = system: import "${patchedPkgsFor system}/flake.nix";
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ fakeHash, fetchpatch }: [
|
{ fetchpatch, fetchurl }: [
|
||||||
# librewolf: build with `MOZ_REQUIRE_SIGNING=false`
|
# librewolf: build with `MOZ_REQUIRE_SIGNING=false`
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://github.com/NixOS/nixpkgs/pull/199134.diff";
|
url = "https://github.com/NixOS/nixpkgs/pull/199134.diff";
|
||||||
@@ -13,12 +13,6 @@
|
|||||||
sha256 = "sha256-t4sG+xLDaxbJ/mV5G18N4ag8EC3IXPgtN5FJGANh1Dc=";
|
sha256 = "sha256-t4sG+xLDaxbJ/mV5G18N4ag8EC3IXPgtN5FJGANh1Dc=";
|
||||||
})
|
})
|
||||||
|
|
||||||
# kiwix-tools: init at 3.4.0
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs/pull/206254.diff";
|
|
||||||
sha256 = "sha256-Cendm7a23qj/YRBj5qVM8jhl9oTpztaDEkXcSG4dJys=";
|
|
||||||
})
|
|
||||||
|
|
||||||
# whalebird: 4.6.5 -> 4.7.4
|
# whalebird: 4.6.5 -> 4.7.4
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
# url = "https://git.uninsane.org/colin/nixpkgs/compare/master...pr.whalebird-4.7.4.diff";
|
# url = "https://git.uninsane.org/colin/nixpkgs/compare/master...pr.whalebird-4.7.4.diff";
|
||||||
@@ -26,6 +20,12 @@
|
|||||||
sha256 = "sha256-L9Ie80loaP6yl5ZFnJ1b5WMDpvO1QFE8tbrW5HBauko=";
|
sha256 = "sha256-L9Ie80loaP6yl5ZFnJ1b5WMDpvO1QFE8tbrW5HBauko=";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# nixos/mx-puppet-discord: move to matrix category
|
||||||
|
(fetchurl {
|
||||||
|
url = "https://git.uninsane.org/colin/nixpkgs/commit/87c877fff84717478a96d1b0c65bd2febd350dea.diff";
|
||||||
|
sha256 = "sha256-E5TonCj3f8j7kxApBq/suNT5mB7z8uD00NzI34Qh2SE=";
|
||||||
|
})
|
||||||
|
|
||||||
./2022-12-19-i2p-aarch64.patch
|
./2022-12-19-i2p-aarch64.patch
|
||||||
|
|
||||||
# # kaiteki: init at 2022-09-03
|
# # kaiteki: init at 2022-09-03
|
||||||
|
24
overlays/pins.nix
Normal file
24
overlays/pins.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
(next: prev: {
|
||||||
|
inherit (next.stable)
|
||||||
|
# TODO(unpin): broken on 2023/01/14 via mtxclient dep, aarch64-only:
|
||||||
|
# error: builder for '/nix/store/gwidl0c9ksxjgx0dgwnjssix4ikq73v5-mtxclient-0.9.0.drv' failed with exit code 2;
|
||||||
|
# last 10 log lines:
|
||||||
|
# > make[2]: *** [CMakeFiles/matrix_client.dir/build.make:370: CMakeFiles/matrix_client.dir/lib/structs/events/encrypted.cpp.o] Error 1
|
||||||
|
# > In file included from /build/source/include/mtxclient/crypto/client.hpp:17,
|
||||||
|
# > from /build/source/lib/crypto/utils.cpp:17:
|
||||||
|
# > /build/source/include/mtx/identifiers.hpp:12:10: fatal error: compare: No such file or directory
|
||||||
|
# > 12 | #include <compare>
|
||||||
|
# > | ^~~~~~~~~
|
||||||
|
# > compilation terminated.
|
||||||
|
# > make[2]: *** [CMakeFiles/matrix_client.dir/build.make:132: CMakeFiles/matrix_client.dir/lib/crypto/utils.cpp.o] Error 1
|
||||||
|
# > make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/matrix_client.dir/all] Error 2
|
||||||
|
# > make: *** [Makefile:136: all] Error 2
|
||||||
|
# For full logs, run 'nix log /nix/store/gwidl0c9ksxjgx0dgwnjssix4ikq73v5-mtxclient-0.9.0.drv'.
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/4i2d1qdh4x6n23h1jbcbhm8q9q2hch9a-nheko-0.11.0.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/k4f7k7cvjp8rb7clhlfq3yxgs6lbfmk7-home-manager-path.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/67d9k554188lh4ddl4ar6j74mpc3r4sv-home-manager-generation.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/5qjxzhsw1jvh2d7jypbcam9409ivb472-user-environment.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/hrb3qpdbisqh0lzlyz1g9g4164khmqwn-etc.drv' failed to build
|
||||||
|
# error: 1 dependencies of derivation '/nix/store/ny21xyicbgim5wy7ksg2hibd9gn7i01b-nixos-system-moby-23.05pre-git.drv' failed to build
|
||||||
|
nheko;
|
||||||
|
})
|
32
secrets/servo/mautrix_signal_env.bin
Normal file
32
secrets/servo/mautrix_signal_env.bin
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"data": "ENC[AES256_GCM,data:5n4FNKyblSOQCC17LmLNfF49+z6ZxX9bAv/xTsyQTR+NglhEtUa+JFziu2Il0w2pscAO37sBvE9SvsM9jNG0v4GxlxlLrgEuam6Tf7Ch71lDdxDXJWMTR032WqMF7q6rYbflw8D4fkpQ9yDbgDJUErrds1JvbNhcv6oqoJ/TuhiQZLakNTprtRkw4gCDJDsyDakhv440EK80o/O1CnO+xnSmBj6mLxljQ0EeFzwhjVr1UlhWJ4wQC8TNAAvYN5gILYP0U11kROI=,iv:JZougqWF29K9mDE0kwe03FGad1CglSlxQt5xM9l7wK8=,tag:DQXUPqMvvnqP2kyYikI2ZQ==,type:str]",
|
||||||
|
"sops": {
|
||||||
|
"kms": null,
|
||||||
|
"gcp_kms": null,
|
||||||
|
"azure_kv": null,
|
||||||
|
"hc_vault": null,
|
||||||
|
"age": [
|
||||||
|
{
|
||||||
|
"recipient": "age1tnl4jfgacwkargzeqnhzernw29xx8mkv73xh6ufdyde6q7859slsnzf24x",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2M01sL1JsODFvVWRHOVZX\nTk1wQlRkclFVZnlKK2lBOUQ1M053SUZxUVYwCjVkVmoxdkRvd3YvQmxvMmd6Ly9k\nWlZGc3M1Yi9lZ3ZRUFJiYWNlRjZ6M2cKLS0tIElTRnplV25wTmFkSVU1clRNa0NZ\nNW5IaDJWYVNCdDNhYTFSU0J6RUJQN28K4XJGpANIuIfHZuk4cinpsPeZ8mMI2jBH\nT2JGyRNm9Jyr3muV8oC/I22fAKLev8f9Svc+o/VAO4R6ZTWmTwk+dA==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1j2pqnl8j0krdzk6npe93s4nnqrzwx978qrc0u570gzlamqpnje9sc8le2g",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkQnpqLy83eW9HaExkYWxL\nMHRKY3FsemZQcmVwVWx0a0YvRCtCclZrT1ZRCjJ6UVVjSm85TnVTaHFMRlg0YkNa\nOEQ4eUNyV0lEalVXbi9TVDZLUEVvaXcKLS0tICtvaHhHdmRIY2NNTFBZZ2taS0lX\nak45eW5oT2tIWVNRNmkxbUQ5K2lublUKkLfW5vRfjTpfTOeirLXRik9SJDm92pUX\nXcv9L5klKUb0O3+T0pwb9rYFfhk4eGSxS6ZFQnGrLv0lLTRZq6eocw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1z8fauff34cdecr6sjkre260luzxcca05kpcwvhx988d306tpcejsp63znu",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhM25NNlRaNDJYZlJkMjVh\nelZPekdjSHJ4ZnZEbnBCZGV4OVN2RVJCOHpNCnVFWFBNTkd4SkJ0SkdvcUdYUzRF\ncnpPUUQyWEpMU0FqQyszTXp0ZFhQeFkKLS0tIDFua2dscEtxQmdUTm14OWlqMjBI\nSXY5cTJEajd3WmNMNlB1eGtQN3RHUEEK3+zoziFJq/rzpnz8ROL5oGqnHUpJTXG8\nhCQEIOA6dO6PjoXUKd6B8bVPzlDLO5daPh0TS5NGiMlZ8qQe706Syw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1tzlyex2z6t88tg9h82943e39shxhmqeyr7ywhlwpdjmyqsndv3qq27x0rf",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByc1EzcmVzeHYyTkQ3N2Uw\nTERtdENyeGNONVpjU0FKRE1wR0RlSnhNUjM0ClU4MGwvQjFhM2xXYkNITjFMUHdF\naU50YWVjU08zWXhweXVOWU13enpMQlUKLS0tIDdIRm5GV2IxU1AxcFZldDBBeTBt\nZnRJV25IbGo5R1RySmx4ampnNzdYU0EK7PF9BEGfX6T+1Wit9MG+02sGZTXRUR0M\noVC+oHsCAojhnMP17xyDosnJQqwrNKFwKMQbH7mqBW5Ku4hGy56cGQ==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lastmodified": "2023-01-16T11:17:12Z",
|
||||||
|
"mac": "ENC[AES256_GCM,data:SqOusB8Hd713NYDOkRq2Ju6q4ClN0zOeeCTCAAv+EorKHN7vgz15LuCNWj7iLX4EWrWufzHhG7JFtm6q5h64hxlfzisx3JCtMLRlb40PkDip+2gShH7X4eWcdsRw7/a40e2Qnp/hiXrhH11P1pMqbn6drUPmLy307CyRzThVrcw=,iv:gFcF4i4dqk4rOus4ZKUojD/AAkIuWzGDfqEQTej83Co=,tag:AYknOJm7QTEBR6OzN8dsiw==,type:str]",
|
||||||
|
"pgp": null,
|
||||||
|
"unencrypted_suffix": "_unencrypted",
|
||||||
|
"version": "3.7.3"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user