Compare commits

...

3 commits

Author SHA1 Message Date
c7cb13782c
Once again Jackett... 2025-01-12 13:39:54 +01:00
6f40a9fbde
camelot: Rework ZFS, add mailer 2025-01-12 13:32:44 +01:00
bb0c54ee26
Update flake lock 2025-01-12 10:35:30 +01:00
7 changed files with 87 additions and 26 deletions

View file

@ -12,6 +12,7 @@
./nextcloud.nix
./gotosocial.nix
./forgejo.nix
./zfs.nix
];
services.nginx = {
@ -48,6 +49,7 @@
};
keycloakDbPassword.file = ../../secrets/keycloak-db.age;
zfsMail.file = ../../secrets/zfs-mail.age;
};
my.server.blog.enable = true;

View file

@ -1,4 +1,9 @@
{ lib, config, ... }:
{
lib,
config,
extraInfo,
...
}:
{
boot.initrd.availableKernelModules = [
"xhci_pci"
@ -12,14 +17,6 @@
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "c97cef07";
boot.zfs.extraPools = [ "pool" ];
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
fileSystems = {
"/" = {

View file

@ -50,6 +50,7 @@
services.jackett = {
enable = true;
package = pkgs.jackett.overrideAttrs (_: _: { doCheck = false; });
openFirewall = true;
};

View file

@ -0,0 +1,52 @@
{
config,
extraInfo,
pkgs,
...
}:
{
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "c97cef07";
boot.zfs.extraPools = [ "pool" ];
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
programs.msmtp = {
enable = true;
setSendmail = true;
defaults = {
aliases = "/etc/aliases";
port = 465;
tls_trust_file = "/etc/ssl/certs/ca-certificates.crt";
tls = "on";
auth = "login";
tls_starttls = "off";
};
accounts = {
default = {
host = extraInfo.mail.zfs.smtpServer;
passwordeval = "cat ${config.age.secrets.zfsMail.path}";
user = extraInfo.mail.zfs.address;
from = extraInfo.mail.zfs.address;
};
};
};
services.zfs.zed.settings = {
ZED_DEBUG_LOG = "/tmp/zed.debug.log";
ZED_EMAIL_ADDR = [ "root" ];
ZED_EMAIL_PROG = "${pkgs.msmtp}/bin/msmtp";
ZED_EMAIL_OPTS = extraInfo.mail.personal.address;
ZED_NOTIFY_INTERVAL_SECS = 3600;
ZED_NOTIFY_VERBOSE = true;
ZED_USE_ENCLOSURE_LEDS = true;
ZED_SCRUB_AFTER_RESILVER = true;
};
}

34
flake.lock generated
View file

@ -44,11 +44,11 @@
},
"dalaran-fr": {
"locked": {
"lastModified": 1728150448,
"narHash": "sha256-miv+xsIv8jLJErxxc+la0l3/7tmkQibGWku345A1fjY=",
"rev": "71ff657b4c2375c20ec13b18a39778ee8c00b0b1",
"lastModified": 1736674436,
"narHash": "sha256-7qXmKQXfun7+2pN7rGwYTS/6XfjfNhMTlUqGSvndjs0=",
"rev": "a40370d8978c60f63211d5bc1bdc0597f6af1638",
"type": "tarball",
"url": "https://git.dalaran.fr/api/v1/repos/dala/dalaran.fr/archive/71ff657b4c2375c20ec13b18a39778ee8c00b0b1.tar.gz?rev=71ff657b4c2375c20ec13b18a39778ee8c00b0b1"
"url": "https://git.dalaran.fr/api/v1/repos/dala/dalaran.fr/archive/a40370d8978c60f63211d5bc1bdc0597f6af1638.tar.gz?rev=a40370d8978c60f63211d5bc1bdc0597f6af1638"
},
"original": {
"type": "tarball",
@ -79,11 +79,11 @@
},
"extra-config": {
"locked": {
"lastModified": 1735909779,
"narHash": "sha256-Io0thwq2X2M5jiw9SQO+VAbxS+hP6OJqxgI/qi2LkrI=",
"lastModified": 1736683904,
"narHash": "sha256-HgTgHiWmGxaolrZpHE+1Z7CdOWgD0k/T31AZusxMIdw=",
"ref": "refs/heads/main",
"rev": "aa3e249bbc51649702359af9ea6e8dc9f5ac4e66",
"revCount": 11,
"rev": "8a54c1cda37f0e2ad6696053e93d0c84f43d6da2",
"revCount": 12,
"type": "git",
"url": "ssh://forgejo@git.dalaran.fr/dala/nixos-config-extra.git"
},
@ -248,11 +248,11 @@
]
},
"locked": {
"lastModified": 1736420674,
"narHash": "sha256-GXwG0JOwQjRGtCF8tbt2ilH1dU5FZ4oro3Pff/TiDl0=",
"lastModified": 1736508663,
"narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "01f40d52d65318463d71aa485fe9ad6f26357b45",
"rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
"type": "github"
},
"original": {
@ -353,11 +353,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1736200483,
"narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
"lastModified": 1736549401,
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
"rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899",
"type": "github"
},
"original": {
@ -369,11 +369,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1736344531,
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
"lastModified": 1736523798,
"narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
"rev": "130595eba61081acde9001f43de3248d8888ac4a",
"type": "github"
},
"original": {

View file

@ -46,4 +46,8 @@ in
fuyuki
london
];
"zfs-mail.age".publicKeys = [
camelot
];
}

5
secrets/zfs-mail.age Normal file
View file

@ -0,0 +1,5 @@
age-encryption.org/v1
-> ssh-ed25519 1urzmQ kyj7ofD6U9RnLEBttrTB/+HmuCzRVEwnQ5I0fvU8lWY
WKy7iO7PjQurvG+VCV0bfVsNqbTAtODPuIWC0BNSu/A
--- +7QEzVzqxGrMhUDz+joaeAyf/JweahvIqdfmuLf6zIw
¹¢Â=x"2À…9ñ²þQ¥‡]ý¿Ž;4Gë<18>5>2ß-ðiL4kMûIV ˦L