home-lab/machines/sleeper-service/configuration.nix
Geir Okkenhaug Jerstad c392df4a93 Add ZFS support to sleeper-service
- Replace ext4 with ZFS pool 'filepool' for enhanced data integrity
- Add ZFS auto-scrub and TRIM services for file server
- Configure proper ZFS datasets: root, nix, var, storage
- Add networking hostId (a1b2c3d4) required for ZFS
- Update NFS and Transmission to use ZFS mount points
- Change file ownership to 'sma' user for server configuration
- Add comprehensive ZFS setup documentation

Ready for deployment with proper file server storage backend.
2025-06-05 17:16:32 +02:00

66 lines
No EOL
1.3 KiB
Nix

{ config, pkgs, inputs, unstable, ... }: {
imports = [
./hardware-configuration.nix
../../modules/network/network-sleeper-service.nix
# Security modules
../../modules/security/ssh-keys.nix
# Services
../../modules/services/nfs.nix
../../modules/system/transmission.nix
# User modules - server only needs sma user
../../modules/users/sma.nix
];
# Boot configuration with ZFS support
boot.loader.grub = {
enable = true;
zfsSupport = true;
efiSupport = true;
efiInstallAsRemovable = true;
devices = [ "nodev" ];
};
# ZFS services for file server
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
# Time and locale
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";
# Console configuration
console = {
font = "Lat2-Terminus16";
keyMap = "no";
};
# Enable unfree packages
nixpkgs.config.allowUnfree = true;
# Basic system packages
environment.systemPackages = with pkgs; [
wget
curl
git
htop
eza
bat
ripgrep
du-dust
fd
ncdu
tree
];
programs.zsh.enable = true;
# Firewall configuration
networking.firewall.allowedTCPPorts = [ 22 ]; # SSH only (Transmission disabled temporarily)
system.stateVersion = "25.05";
}