This commit is contained in:
FabricSoul 2025-06-08 00:17:35 -04:00
commit 8454c03655
3 changed files with 53 additions and 19 deletions

View file

@ -0,0 +1,21 @@
# hosts/common/optional/nfs.nix
{...}: {
# Enable NFS server
services.nfs.server = {
enable = true;
# Define your exports
exports = ''
/nas 192.168.2.101(rw,sync,no_root_squash,no_subtree_check) 100.0.0.0/8(rw,sync,no_root_squash,no_subtree_check)
'';
# Enable NFSv4 (recommended)
# Remove this line if you need to stick with NFSv2/v3 only
createMountPoints = true;
};
# Ensure the directories exist
systemd.tmpfiles.rules = [
"d /nas 0755 root root -"
];
}

View file

@ -12,15 +12,24 @@
# Common configurations
../common/global
../common/optional/docker.nix
../common/optional/nfs.nix
];
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = ["zfs"];
boot.zfs.extraPools = ["nas"];
services.zfs.autoScrub.enable = true;
services.zfs.trim.enable = true;
# Networking
networking = {
hostName = "tatara";
hostId = "b47100bc";
networkmanager.enable = true;
useDHCP = lib.mkDefault true;
};

View file

@ -1,25 +1,29 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = ["zfs"];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/057be728-a74c-4a73-b102-247aba6155a7";
fileSystems."/" = {
device = "/dev/disk/by-uuid/057be728-a74c-4a73-b102-247aba6155a7";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7B70-EE8A";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7B70-EE8A";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};