62 lines
1.5 KiB
Nix
62 lines
1.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let hostname = "nostromo";
|
|
in {
|
|
|
|
networking = {
|
|
interfaces = {
|
|
eno1.useDHCP = false;
|
|
eno2.useDHCP = false;
|
|
eno3.useDHCP = false;
|
|
eno4.useDHCP = false;
|
|
enp33s0f0.useDHCP = false;
|
|
enp33s0f1.useDHCP = false;
|
|
enp9s0f0.useDHCP = false;
|
|
enp9s0f1.useDHCP = false;
|
|
|
|
intif0 = { useDHCP = true; };
|
|
};
|
|
|
|
firewall.enable = false;
|
|
};
|
|
|
|
# Hopefully this'll help with NFS...
|
|
boot.kernelModules = [ "rpcsec_gss_krb5" ];
|
|
|
|
services.nfs = {
|
|
# See ../user-config.nix for the user@REALM -> user mapping
|
|
server = {
|
|
enable = true;
|
|
createMountPoints = false;
|
|
exports = let
|
|
exportList = [
|
|
"/export/documents 10.0.0.0/24(rw,sync,no_root_squash,no_subtree_check,fsid=10,sec=krb5p)"
|
|
"/export/downloads 10.0.0.0/24(rw,sync,no_root_squash,no_subtree_check,fsid=11,sec=krb5i)"
|
|
"/export/projects 10.0.0.0/24(rw,sync,no_root_squash,no_subtree_check,fsid=12,sec=krb5p)"
|
|
];
|
|
in ''
|
|
${concatStringsSep "\n" exportList}
|
|
'';
|
|
};
|
|
};
|
|
|
|
systemd.services.nfs-server = {
|
|
# Don't start on boot
|
|
wantedBy = mkForce [ "sea-store.target" ];
|
|
# Only start after filesystem mounts are available
|
|
after = [
|
|
"export-documents.mount"
|
|
"export-downloads.mount"
|
|
"export-projects.mount"
|
|
];
|
|
};
|
|
|
|
## Until I can figure out how to use one common host API, forget this
|
|
# fudo.ipfs = {
|
|
# enable = true;
|
|
# users = [ "niten" ];
|
|
# api-address = "/ip4/0.0.0.0/tcp/5001";
|
|
# };
|
|
}
|