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

67 lines
1.6 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-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 = {
# See lib/fudo/users.nix for the user@REALM -> user mapping
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=11,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
};
fudo.ipfs = {
enable = true;
users = [ "niten" ];
api-address = "/ip4/0.0.0.0/tcp/5001";
};
virtualisation = {
libvirtd = {
enable = true;
qemuPackage = pkgs.qemu_kvm;
onShutdown = "shutdown";
};
};
}