feat: add self-hosted cache server

This commit is contained in:
danny 2025-09-25 19:58:19 +08:00
parent 05bc6a185f
commit 69705431bf
16 changed files with 313 additions and 95 deletions

View file

@ -3,7 +3,16 @@
documentation.nixos.enable = false;
nix = {
settings = {
substituters = [
"https://cache.net.dn/dn-main"
];
trusted-public-keys = [
"dn-main:ZjQmZEOWpe0TjZgHGwkgtPdOUXpN82RL9wy30EW1V7k="
];
warn-dirty = false;
trusted-users = [
"@wheel"
];
experimental-features = [
"nix-command"
"flakes"

View file

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
services.printing = {
enable = true;
drivers = with pkgs; [
gutenprint
gutenprintBin
brlaser
brgenml1lpr
brgenml1cupswrapper
splix
hplip
epson-escpr2
epson-escpr
];
};
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
}

View file

@ -103,7 +103,7 @@ in
acme."letsencrypt" = mkIf (acmeConf != null) acmeConf;
session.auth = {
mechanisms = "[PLAIN LOGIN OAUTHBEARER]";
mechanisms = "[plain login oauthbearer]";
directory = mkCondition "listener != 'smtp'" "'ldap'" false;
require = mkCondition "listener != 'smtp'" true false;
};
@ -117,12 +117,6 @@ in
"in-memory" = {
type = "memory";
principals = [
{
name = "danny";
class = "individual";
secret = "%{file:${adminPassFile}}%";
email = [ "danny@${domain}" ];
}
{
name = "postmaster";
class = "individual";