nixos-config/config/host-config/nostromo.nix

62 lines
1.5 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-04-21 10:50:09 -07:00
with lib;
let hostname = "nostromo";
in {
networking = {
2021-04-21 10:55:09 -07:00
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;
2021-04-21 10:55:09 -07:00
intif0 = { useDHCP = true; };
};
2021-11-28 12:39:03 -08:00
firewall.enable = false;
};
2021-10-18 21:55:24 -07:00
# Hopefully this'll help with NFS...
boot.kernelModules = [ "rpcsec_gss_krb5" ];
2021-10-18 21:55:24 -07:00
services.nfs = {
2021-11-28 12:39:03 -08:00
# See ../user-config.nix for the user@REALM -> user mapping
2021-10-18 21:55:24 -07:00
server = {
enable = true;
createMountPoints = false;
exports = let
exportList = [
2021-10-19 10:04:35 -07:00
"/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)"
2021-10-18 21:55:24 -07:00
];
in ''
${concatStringsSep "\n" exportList}
'';
};
};
systemd.services.nfs-server = {
2021-10-19 10:04:35 -07:00
# Don't start on boot
2021-10-18 21:55:24 -07:00
wantedBy = mkForce [ "sea-store.target" ];
# Only start after filesystem mounts are available
after = [
"export-documents.mount"
"export-downloads.mount"
"export-projects.mount"
];
2021-10-18 21:55:24 -07:00
};
2021-11-05 07:06:08 -07:00
## 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";
# };
}