
- 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.
66 lines
No EOL
1.3 KiB
Nix
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";
|
|
} |