1
1
Fork 0
nixos-configs/machine/catacomb/default.nix

83 lines
1.7 KiB
Nix

{ pkgs, lib, ... }:
{
imports = [
./hardware-configuration.nix
];
beatific.hostName = "catacomb";
beatific.defaults.tvbSync = false;
boot = {
loader = {
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
generic-extlinux-compatible.enable = true;
};
supportedFilesystems = ["zfs"];
kernelParams = [ "zfs.zfs_dmu_offset_next_sync=0" ];
};
system.stateVersion = "22.11"; # Read the usual warning
swapDevices = [ { device = "/swap"; size = 1024; } ];
environment.systemPackages = with pkgs; [
lsof # list open files
smartmontools # provides smartctl
usbutils # provides lsusb
];
networking = {
hostId = "beeeeee5"; # this must be consistent for ZFS
firewall = {
enable = true;
allowedTCPPorts = [ 139 445 ];
allowedUDPPorts = [ 137 138 ];
};
wireless = {
enable = true;
networks."mysterious humming noise".psk = "@MHN_PSK@";
environmentFile = "/root/wifi.env";
};
};
services.cron = {
enable = true;
};
services.openssh.settings.PasswordAuthentication = true;
services.rsyncd.enable = true;
services.zfs = {
autoScrub = {
enable = true;
pools = ["catapool"];
interval = "monthly";
};
};
users.groups = {
nas = { gid = 1600; };
};
users.users.tvb = {
uid = 1001;
extraGroups = [ "nas" ];
packages = [
(pkgs.writeShellScriptBin "yt-dlp" ''
exec $HOME/.env/bin/yt-dlp "$@"
'')
];
};
users.users.katydid = {
isNormalUser = true;
uid = 1002;
};
nix.settings.cores = 4;
}