hosts/youko: move zfs pool
This commit is contained in:
parent
3622d231f8
commit
f369c754a3
3 changed files with 69 additions and 0 deletions
|
@ -6,6 +6,8 @@
|
||||||
./disks.nix
|
./disks.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./sway.nix
|
./sway.nix
|
||||||
|
./msmtp.nix
|
||||||
|
./nas.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
@ -28,5 +30,7 @@
|
||||||
settei.incus.enable = true;
|
settei.incus.enable = true;
|
||||||
virtualisation.podman.enable = true;
|
virtualisation.podman.enable = true;
|
||||||
hardware.keyboard.qmk.enable = true;
|
hardware.keyboard.qmk.enable = true;
|
||||||
|
|
||||||
|
networking.hostId = "b49ee8de";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
36
hosts/youko/msmtp.nix
Normal file
36
hosts/youko/msmtp.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# TODO: Potentially make this a common module?
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
mail = "alert@nrab.lol";
|
||||||
|
aliases = pkgs.writeText "mail-aliases" ''
|
||||||
|
${username}: nikodem@rabulinski.com
|
||||||
|
root: ${mail}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
age.secrets.alert-plaintext.file = ../../secrets/alert-plain-pass.age;
|
||||||
|
|
||||||
|
programs.msmtp = {
|
||||||
|
enable = true;
|
||||||
|
setSendmail = true;
|
||||||
|
defaults = {
|
||||||
|
inherit aliases;
|
||||||
|
tls = "on";
|
||||||
|
auth = "login";
|
||||||
|
tls_starttls = "off";
|
||||||
|
};
|
||||||
|
accounts = {
|
||||||
|
default = {
|
||||||
|
host = "mail.nrab.lol";
|
||||||
|
passwordeval = "cat ${config.age.secrets.alert-plaintext.path}";
|
||||||
|
user = mail;
|
||||||
|
from = mail;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
29
hosts/youko/nas.nix
Normal file
29
hosts/youko/nas.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
username,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
supportedFilesystems = [ "zfs" ];
|
||||||
|
zfs.extraPools = [ "yottapool" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
services.zfs = {
|
||||||
|
autoScrub.enable = true;
|
||||||
|
zed.settings = {
|
||||||
|
ZED_DEBUG_LOG = "/tmp/zed.debug.log";
|
||||||
|
ZED_EMAIL_ADDR = [ username ];
|
||||||
|
ZED_EMAIL_PROG = lib.getExe pkgs.msmtp;
|
||||||
|
ZED_EMAIL_OPTS = "@ADDRESS@";
|
||||||
|
|
||||||
|
ZED_NOTIFY_INTERVAL_SECS = 3600;
|
||||||
|
ZED_NOTIFY_VERBOSE = true;
|
||||||
|
|
||||||
|
ZED_USE_ENCLOSURE_LEDS = true;
|
||||||
|
ZED_SCRUB_AFTER_RESILVER = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue