2023-01-16 17:16:20 +00:00
|
|
|
{ pkgs, lib, ... }:
|
2021-01-27 04:18:30 +00:00
|
|
|
|
2023-08-04 04:54:49 +00:00
|
|
|
{
|
2021-04-07 03:56:19 +00:00
|
|
|
imports = [
|
2022-11-26 18:38:23 +00:00
|
|
|
./hardware-configuration.nix
|
2021-04-07 03:56:19 +00:00
|
|
|
];
|
2021-01-27 04:18:30 +00:00
|
|
|
|
2023-08-02 17:03:35 +00:00
|
|
|
beatific.hostName = "catacomb";
|
2024-04-30 04:51:26 +00:00
|
|
|
beatific.defaults.tvbSync = false;
|
2023-08-02 17:03:35 +00:00
|
|
|
|
2021-01-27 04:18:30 +00:00
|
|
|
boot = {
|
|
|
|
loader = {
|
2022-11-26 18:38:23 +00:00
|
|
|
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
2021-01-27 04:18:30 +00:00
|
|
|
grub.enable = false;
|
2022-11-26 18:38:23 +00:00
|
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
|
|
generic-extlinux-compatible.enable = true;
|
2021-01-27 04:18:30 +00:00
|
|
|
};
|
2022-11-26 18:38:23 +00:00
|
|
|
supportedFilesystems = ["zfs"];
|
2023-12-27 05:01:28 +00:00
|
|
|
kernelParams = [ "zfs.zfs_dmu_offset_next_sync=0" ];
|
2021-01-27 04:18:30 +00:00
|
|
|
};
|
2022-11-26 18:38:23 +00:00
|
|
|
|
|
|
|
system.stateVersion = "22.11"; # Read the usual warning
|
|
|
|
|
2021-01-27 04:18:30 +00:00
|
|
|
swapDevices = [ { device = "/swap"; size = 1024; } ];
|
2022-11-26 18:38:23 +00:00
|
|
|
|
2023-12-27 05:17:57 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2024-01-04 19:53:53 +00:00
|
|
|
lsof # list open files
|
|
|
|
smartmontools # provides smartctl
|
|
|
|
usbutils # provides lsusb
|
2021-01-27 04:18:30 +00:00
|
|
|
];
|
2022-11-26 18:38:23 +00:00
|
|
|
|
2021-01-27 04:18:30 +00:00
|
|
|
networking = {
|
2024-01-04 19:54:31 +00:00
|
|
|
hostId = "beeeeee5"; # this must be consistent for ZFS
|
2021-01-27 04:18:30 +00:00
|
|
|
firewall = {
|
|
|
|
enable = true;
|
2023-08-02 17:12:05 +00:00
|
|
|
allowedTCPPorts = [ 139 445 ];
|
2021-01-27 04:18:30 +00:00
|
|
|
allowedUDPPorts = [ 137 138 ];
|
|
|
|
};
|
|
|
|
};
|
2022-11-26 18:38:23 +00:00
|
|
|
|
2022-11-27 00:04:40 +00:00
|
|
|
services.cron = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-11-26 18:38:23 +00:00
|
|
|
|
2023-09-17 03:23:54 +00:00
|
|
|
services.openssh.settings.PasswordAuthentication = true;
|
2021-01-27 04:18:30 +00:00
|
|
|
|
|
|
|
services.rsyncd.enable = true;
|
|
|
|
|
|
|
|
services.zfs = {
|
|
|
|
autoScrub = {
|
|
|
|
enable = true;
|
|
|
|
pools = ["catapool"];
|
|
|
|
interval = "monthly";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
users.groups = {
|
|
|
|
nas = { gid = 1600; };
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users.tvb = {
|
|
|
|
uid = 1001;
|
2023-08-02 17:19:54 +00:00
|
|
|
extraGroups = [ "nas" ];
|
2023-09-17 03:24:22 +00:00
|
|
|
packages = [
|
|
|
|
(pkgs.writeShellScriptBin "yt-dlp" ''
|
2023-11-22 19:05:15 +00:00
|
|
|
exec $HOME/.env/bin/yt-dlp "$@"
|
2023-09-17 03:24:22 +00:00
|
|
|
'')
|
|
|
|
];
|
2021-01-27 04:18:30 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 23:12:58 +00:00
|
|
|
users.users.katydid = {
|
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1002;
|
|
|
|
};
|
|
|
|
|
2022-11-26 18:38:23 +00:00
|
|
|
nix.settings.cores = 4;
|
2021-01-27 04:18:30 +00:00
|
|
|
}
|