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 configurations
../common/global ../common/global
../common/optional/docker.nix ../common/optional/docker.nix
../common/optional/nfs.nix
]; ];
# Bootloader # Bootloader
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = 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
networking = { networking = {
hostName = "tatara"; hostName = "tatara";
hostId = "b47100bc";
networkmanager.enable = true; networkmanager.enable = true;
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;
}; };

View file

@ -1,30 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.supportedFilesystems = ["zfs"];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/057be728-a74c-4a73-b102-247aba6155a7"; device = "/dev/disk/by-uuid/057be728-a74c-4a73-b102-247aba6155a7";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/7B70-EE8A"; device = "/dev/disk/by-uuid/7B70-EE8A";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's