Compare commits

...

5 Commits

Author SHA1 Message Date
chn
5944409604 devices.srv1: add users 2024-09-26 15:31:59 +08:00
chn
198fccc7bf packages.sbatch-tui: fix 2024-09-26 15:23:59 +08:00
chn
cf3882becc modules.packages: fix prebuild-packages 2024-09-26 13:51:57 +08:00
chn
c80617c6c0 modules.services.nfs: fix 2024-09-26 13:27:16 +08:00
chn
4fea6edcad fix build 2024-09-26 12:47:46 +08:00
6 changed files with 9 additions and 20 deletions

View File

@ -66,7 +66,7 @@ inputs:
setupFirewall = true;
};
};
user.users = [ "chn" ];
user.users = [ "chn" "xll" "zem" "yjq" "gb" "wp" "hjp" "wm" ];
};
};
}

View File

@ -25,7 +25,7 @@ inputs:
publicKey = "Br+ou+t9M9kMrnNnhTvaZi2oNFRygzebA1NqcHWADWM=";
wireguardIp = "192.168.83.9";
};
nfs = { root = "/"; exports = "/home"; accessLimit = "192.168.178.0/24"; };
nfs = { root = "/"; exports = [ "/home" ]; accessLimit = "192.168.178.0/24"; };
};
packages.packages._prebuildPackages =
[ inputs.topInputs.self.nixosConfigurations.srv1-node1.pkgs.localPackages.vasp.intel ];

View File

@ -24,19 +24,9 @@ inputs:
excludePythonPackages))
(builtins.concatLists (builtins.map (packageFunction: packageFunction pythonPackages)
(_pythonPackages ++ extraPythonPackages)))))
(inputs.pkgs.callPackage ({ stdenv }: stdenv.mkDerivation
{
name = "prebuild-packages";
propagateBuildInputs = inputs.lib.lists.subtractLists excludePrebuildPackages
(_prebuildPackages ++ extraPrebuildPackages);
phases = [ "installPhase" ];
installPhase =
''
runHook preInstall
mkdir -p $out
runHook postInstall
'';
}) {})
(inputs.pkgs.writeTextDir "share/prebuild-packages"
(builtins.concatStringsSep "\n" (builtins.map builtins.toString
(inputs.lib.lists.subtractLists excludePrebuildPackages (_prebuildPackages ++ extraPrebuildPackages)))))
];
};
}

View File

@ -18,7 +18,7 @@ inputs:
nfs.server =
{
enable = true;
exports = "${nfs.root} ${nfs.accessLimit}(rw,no_root_squash,fsid=0,sync,crossmnt)"
exports = "${nfs.root} ${nfs.accessLimit}(rw,no_root_squash,fsid=0,sync,crossmnt)\n"
+ builtins.concatStringsSep "\n" (builtins.map
(export: "${export} ${nfs.accessLimit}(rw,no_root_squash,sync,crossmnt)")
nfs.exports);

View File

@ -1,6 +1,5 @@
inputs:
{
imports = inputs.localLib.findModules ./.;
options.nixos.system.fileSystems.mount.nfs = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.attrsOf types.nonEmptyStr); default = null;

View File

@ -138,10 +138,10 @@ int main()
state.job_name, state.output_file, state.vasp_version_entries[state.vasp_version_selected]
);
else state.submit_command =
"sbatch --ntasks={}\n--cpus-per-task={}\n--hint=nomultithread\n--job-name='{}'\n--output='{}'"
"\n--wrap=\"vasp-intel srun vasp-{}\""_f
"sbatch --ntasks={}\n--cpus-per-task={}\n--export=ALL,OMP_NUM_THREADS={}\n--hint=nomultithread\n--job-name='{}'\n"
"--output='{}'\n--wrap=\"vasp-intel srun --mpi=pmix vasp-{}\""_f
(
state.mpi_threads, state.openmp_threads, state.job_name, state.output_file,
state.mpi_threads, state.openmp_threads, state.openmp_threads, state.job_name, state.output_file,
state.vasp_version_entries[state.vasp_version_selected]
);