home: add coop-ofd

This commit is contained in:
chayleaf 2023-11-27 00:20:43 +07:00
parent 3891aa6596
commit df2640d138
Signed by: chayleaf
GPG key ID: 78171AD46227E68E
3 changed files with 77 additions and 3 deletions

View file

@ -16,6 +16,49 @@
"type": "gitlab"
}
},
"coop-ofd": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1701018061,
"narHash": "sha256-qvDuKQSzNtoODLcms/0xczHzE5FPBcPJI+aXQ+Eqw/M=",
"owner": "chayleaf",
"repo": "coop-ofd",
"rev": "fbc3fde3090962ae5e9a5669dab28dbc89dd16a0",
"type": "github"
},
"original": {
"owner": "chayleaf",
"repo": "coop-ofd",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
"coop-ofd",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700327093,
"narHash": "sha256-OgYvlBABxJYWhZ/HBd0bPVcIEkT+xDhDCpRYqtVhYWY=",
"owner": "ipetkov",
"repo": "crane",
"rev": "ae7cd510e508ee03d792005c2f1c0a3ff25ecb80",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -49,6 +92,22 @@
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1668681692,
@ -137,7 +196,7 @@
},
"maubot": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"nixpkgs": [
"nixpkgs"
]
@ -212,7 +271,7 @@
"nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
],
@ -348,7 +407,8 @@
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"coop-ofd": "coop-ofd",
"flake-compat": "flake-compat_2",
"home-manager": "home-manager",
"impermanence": "impermanence",
"maubot": "maubot",

View file

@ -17,6 +17,10 @@
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
coop-ofd = {
url = "github:chayleaf/coop-ofd";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@ -57,6 +61,7 @@
outputs = inputs@
{ self
, coop-ofd
, nixpkgs
, nixos-hardware
, mobile-nixos
@ -76,6 +81,7 @@
devNft = false;
devNixRt = false;
devMaubot = false;
devCoopOfd = false;
# IRL-related stuff I'd rather not put into git
priv =
if builtins.pathExists ./private.nix then (import ./private.nix { })
@ -154,6 +160,7 @@
nixos-mailserver.nixosModules.default
./system/devices/radxa-rock5a-server.nix
(if devMaubot then import /${devPath}/maubot.nix/module else maubot.nixosModules.default)
(if devCoopOfd then import /${devPath}/coop-ofd else coop-ofd).nixosModules.default
./system/modules/scanservjs.nix
];
};

View file

@ -42,6 +42,10 @@ in {
# services.keycloak.plugins = [ pkgs.keycloak.plugins.keycloak-metrics-spi ];
services.keycloak.settings.metrics-enabled = true;
services.coop-ofd = {
enable = true;
config.listener = "127.0.0.1:25783";
};
services.nginx.virtualHosts."home.${cfg.domainName}" = {
quic = true;
enableACME = true;
@ -65,6 +69,9 @@ in {
proxyPass = "http://127.0.0.1:631/";
proxyWebsockets = true;
};
locations."/money/" = {
proxyPass = "http://${config.services.coop-ofd.config.listener}/";
};
};
services.nginx.virtualHosts."hydra.${cfg.domainName}" = {
quic = true;