Compare commits

...

13 Commits

Author SHA1 Message Date
David Crompton 4d186c69bc JupyterHub: Added MATLAB Kernel & Web App 2024-02-07 17:20:01 -05:00
David Crompton fca8aacba7 Matlab: System Wide MATLAB Installation 2024-02-07 14:00:16 -05:00
David Crompton af5774ba66 Matlab License Server
Update Matlab License to Include "SERVER {hostname} {HostID} 27000"

Update MATLAB License for DAEMON line

Matlab: Update Concurrent License

Matlab: Cleanup Config

Matlab: Hide HOSTID in secrets
2024-02-07 14:00:11 -05:00
David Crompton 9fd4f2c67c JupyterHub: Machine learning toolkits addition 2024-02-02 18:27:57 -05:00
David Crompton fb5ebf1be0 Add JupyterHub Extension (e.g. Collaboration) 2024-01-23 14:06:26 -05:00
David Crompton 9e7069e2d9 Revert System MATLAB (Almost Ready) 2024-01-17 17:23:08 -05:00
David Crompton f5d3abb2b3 Add gcc to jupyter path 2024-01-17 17:20:04 -05:00
David Crompton 6b290b11b4 Systemwide Matlab Installation 2024-01-16 23:37:56 -05:00
David Crompton 9adfae87ee Jupyterhub: QOL & NEST Fix (MPI remove) 2024-01-16 15:00:48 -05:00
David Crompton 22e4f6b232 Jupyterhub: Temporary mne-python issue 2024-01-16 13:57:25 -05:00
David Crompton 3e488d7da0 24.05 Preparation 2024-01-16 11:22:24 -05:00
David Crompton cd6c4635b3 JupyterHub: Fix python kernel definition 2024-01-16 11:17:40 -05:00
David Crompton fe1b1adf8c NixOS 23.05 -> 23.11
flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/70bdadeb94ffc8806c0570eb5c2695ad29f0e421' (2024-01-03)
  → 'github:NixOS/nixpkgs/b8dd8be3c790215716e7c12b247f45ca525867e2' (2024-01-15)
2024-01-16 11:11:06 -05:00
16 changed files with 912 additions and 117 deletions

View File

@ -39,16 +39,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1704290814, "lastModified": 1705331948,
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", "narHash": "sha256-qjQXfvrAT1/RKDFAMdl8Hw3m4tLVvMCc8fMqzJv0pP4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", "rev": "b8dd8be3c790215716e7c12b247f45ca525867e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -1,7 +1,7 @@
{ {
inputs = { inputs = {
nixpkgs = { nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-23.05"; url = "github:NixOS/nixpkgs/nixos-23.11";
}; };
nixpkgs-unstable = { nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable"; url = "github:NixOS/nixpkgs/nixos-unstable";

View File

@ -20,6 +20,7 @@
./nosleep.nix ./nosleep.nix
]; ];
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
sops.defaultSopsFile = ./secrets/system.yaml; sops.defaultSopsFile = ./secrets/system.yaml;
# Support NTFS(3g) # Support NTFS(3g)

View File

@ -21,7 +21,7 @@
]; ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.initrd.services.swraid.enable = true; boot.swraid.enable = true;
# Cache and Thin Provisioning Support # Cache and Thin Provisioning Support
services.lvm.boot.thin.enable = true; services.lvm.boot.thin.enable = true;

View File

@ -1,5 +1,4 @@
{ config, lib, pkgs, ...}: { { config, lib, pkgs, ...}: {
config = {
# Make sure opengl is enabled # Make sure opengl is enabled
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
@ -21,7 +20,8 @@
# Use the open source version of the kernel module # Use the open source version of the kernel module
# Only available on driver 515.43.04+ # Only available on driver 515.43.04+
open = true; # Seems to cause some issues with Tensorflow/CUDA/PyTorch
open = false;
# Enable the nvidia settings menu # Enable the nvidia settings menu
nvidiaSettings = true; nvidiaSettings = true;
@ -32,15 +32,15 @@
# Allow Unfree, Nvidia, CUDA, and derived packages. # Allow Unfree, Nvidia, CUDA, and derived packages.
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.config.cudaSupport = true;
# Use Prebuilt Cached Versions of CUDA Packages # Use Prebuilt Cached Versions of CUDA Packages
nix.settings = { nix.settings = {
trusted-substituters = [ substituters = [
"https://cuda-maintainers.cachix.org" "https://cuda-maintainers.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
]; ];
}; };
};
} }

View File

@ -1,57 +1,150 @@
{ config, lib, pkgs, nix-matlab, ... }: let { config, lib, pkgs, nix-matlab, ... }: let
license-manager = pkgs.stdenv.mkDerivation rec { # The matlab installation is held in the MATLAB_INSTALL_DIR MATLAB
pname = "matlab-license-server"; # updates and toolboxes can primarily be handled with the matlab_mpm
version = "R2023b"; # tool defined below. This file, alongside the matlab_install.txt
# describe the current version of MATLAB available on the
# system. Nix *can* fetch MATLAB and all its toolboxes, however not
# all MATLAB toolboxes can be installed via commands, some *must* be
# installed graphically, and otherwise are unsupported. So, for now,
# we try to make installation as documented and reproducible as
# possible.
MATLAB_INSTALL_DIR = "/opt/MATLAB";
# MATLAB Package Manager: MPM
#
# This tool is used to guarantee (nearly)
# reproducible installations of MATLAB, and to easily allow for
# controlling what version of MATLAB is currently installed
matlab-mpm = pkgs.stdenv.mkDerivation rec {
pname = "matlab-package-manager";
version = "2023.12.1";
src = pkgs.fetchurl { src = pkgs.fetchurl {
url = "https://ssd.mathworks.com/supportfiles/downloads/${version}/license_manager/${version}/daemons/glnxa64/mathworks_network_license_manager_glnxa64.zip"; url = "https://ssd.mathworks.com/supportfiles/downloads/mpm/${version}/glnxa64/mpm";
hash = "sha256-Btl3ETzTtAV+cjqwXf4AE4QJCtssN1s6dmmcpR1EQxY="; hash = "sha256-NlfPLDnpRIaKLLuIZAudnFHBKL04gzmypzp98QOa6+g=";
}; };
nativeBuildInputs = [
pkgs.autoPatchelfHook nativeBuildInputs = with pkgs; [
autoPatchelfHook
]; ];
unpackPhase = ''
${pkgs.unzip}/bin/unzip $src buildInputs = with pkgs; [
gawk
gnugrep
unzip
linux-pam
libz
];
unpackPhase = "cp $src ./mpm";
buildPhase = ''
tail -n +$(head -n20 ./mpm | grep "tail -n" | awk '{print $3}' | grep -o -E "[0-9]+") ./mpm > ./mpm.zip
''; '';
installPhase = '' installPhase = ''
mkdir $out unzip -d $out ./mpm.zip
cp -r * $out/ '';
addAutoPatchelfSearchPath $out/*
passthru = {
executable = "bin/glnxa64/mpm";
};
};
# Environment with the dependencies needed to run matlab (and
# matlab's installers)
matlab-env = pkgs.buildFHSUserEnv {
name = "matlab-env";
targetPkgs = (ps: nix-matlab.targetPkgs ps);
};
# Script used to get the most up to date version of the desired MATLAB
matlab-update-script = pkgs.writeScriptBin "matlab_update_installation.sh" ''
#!${pkgs.bash}/bin/bash
if [ "''${EUID:-$(id -u)}" -ne 0 ]; then
echo "Please make sure to run this script as root"
exit -1
fi
if [ ! -d "${MATLAB_INSTALL_DIR}" ]; then
echo "Make sure that '${MATLAB_INSTALL_DIR}' exists"
exit -1
fi
cd ${MATLAB_INSTALL_DIR}
cp ${./matlab/install_file.txt} ./install_file.txt
sed -e "s#@MATLAB_INSTALL_DIR@#${MATLAB_INSTALL_DIR}#" -i ./install_file.txt
${matlab-env}/bin/${matlab-env.name} -c '${matlab-mpm}/${matlab-mpm.executable} install --inputfile ./install_file.txt'
'';
desktopItem = pkgs.makeDesktopItem {
desktopName = "Matlab";
name = "matlab";
# We use substituteInPlace after we run `install`
# -desktop is needed, see:
# https://www.mathworks.com/matlabcentral/answers/20-how-do-i-make-a-desktop-launcher-for-matlab-in-linux#answer_25
exec = "@out@/bin/matlab -desktop %F";
icon = "matlab";
# Most of the following are copied from octave's desktop launcher
categories = [
"Utility"
"TextEditor"
"Development"
"IDE"
];
mimeTypes = [
"text/x-octave"
"text/x-matlab"
];
keywords = [
"science"
"math"
"matrix"
"numerical computation"
"plotting"
];
};
# Produce acessible executables to "f", e.g. "matlab" or "mex"
matlab-run = f: pkgs.buildFHSUserEnv {
name = f;
targetPkgs = nix-matlab.targetPkgs;
# If making MATLAB available, create Application Icon etc.
extraInstallCommands = pkgs.lib.strings.optionalString (f == "matlab") ''
install -Dm644 ${desktopItem}/share/applications/matlab.desktop $out/share/applications/matlab.desktop
substituteInPlace $out/share/applications/matlab.desktop \
--replace "@out@" ${placeholder "out"}
install -Dm644 ${nix-matlab}/icons/hicolor/256x256/matlab.png $out/share/icons/hicolor/256x256/matlab.png
install -Dm644 ${nix-matlab}/icons/hicolor/512x512/matlab.png $out/share/icons/hicolor/512x512/matlab.png
install -Dm644 ${nix-matlab}/icons/hicolor/64x64/matlab.png $out/share/icons/hicolor/64x64/matlab.png
'';
runScript = pkgs.writeScript "matlab-run-${f}-script" ''
export QT_QPA_PLATFORM=xcb
${MATLAB_INSTALL_DIR}/bin/${f} "$@"
''; '';
}; };
matlab-server = pkgs.buildFHSUserEnv {
name = "matlab-server";
targetPkgs = (ps: nix-matlab.targetPkgs ps ++ [
license-manager
]);
runScript = pkgs.writeScript "matlab-server" (nix-matlab.shellHooksCommon + ''
exec $MATLAB_INSTALL_DIR/bin/matlab "$@"
'');
};
matlab-server-shell = pkgs.buildFHSUserEnv {
name = "matlab-server-shell";
targetPkgs = (ps: nix-matlab.targetPkgs ps ++ [
license-manager
]);
runScript = pkgs.writeScript "matlab-server-shell" (nix-matlab.shellHooksCommon + ''
echo license-server is in:
echo ${license-manager}
echo Make sure it is installed (matlab-server user)
exec bash
'');
};
in { in {
environment.systemPackages = (with nix-matlab.packages.x86_64-linux; [ environment.sessionVariables = {
inherit MATLAB_INSTALL_DIR;
};
nixpkgs.overlays = [
(final: prev: {
inherit matlab-update-script;
matlab = (matlab-run "matlab");
matlab-mex = (matlab-run "mex");
})
];
environment.systemPackages =(with pkgs; [
matlab-update-script
matlab matlab
matlab-shell
matlab-server
matlab-server-shell
matlab-mlint
matlab-mex matlab-mex
]) ++ (with pkgs; [
octaveFull octaveFull
]); ]);
} }

View File

@ -0,0 +1,387 @@
########################################################################
## Configuration File for Installing R2023b MathWorks Products
########################################################################
##
## Use this file to configure an installation of MathWorks products
## and support packages from the command line using the
## MATLAB Package Manager (mpm). For example, you can set the
## products and support packages you want to install and the
## folder where you want to install them.
##
## To configure your MATLAB installation:
##
## 1. Set configuration parameters by uncommenting lines that
## start with a single '#' and updating the values. The
## comments above each parameter describe the valid values.
##
## 2. Run mpm from the command line, using the --inputfile option
## to specify the full path to this configuration file.
##
## mpm install --inputfile <full_path_to_this_file>
##
## You can download template input files for all supported releases from
## https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md
##
########################################################################
########################################################################
## RELEASE
########################################################################
##
## By default, mpm installs the latest versions of R2023b
## MathWorks products and support packages.
##
## To install a specific update for R2023b, set the desired update
## number (for example, 1, 2, 3, and so on) and uncomment the
## following line. An updateLevel of 0 installs the general release.
# Needs to be fixed value to allow for consistent hash output
# Check https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/updates/r2023b/r2023b-updates-release-notes.pdf
# or relevant page to matlab version for existing update numbers
updateLevel=6
########################################################################
## SPECIFY DESTINATION FOLDER
########################################################################
##
## Specify the full path to the folder where you want to install MATLAB.
## If you are adding products or support packages to an existing MATLAB
## installation, specify the full path to the folder where MATLAB is installed.
##
## Example:
## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX
## (Linux) destinationFolder=/usr/local/RXXXX
## (macOS) destinationFolder=/Applications
##
## Set the desired value for destinationFolder and
## uncomment the following line.
# This will be substited with the output path of the nix derivation:
# https://nixos.org/manual/nixpkgs/stable/#fun-substitute
destinationFolder=@MATLAB_INSTALL_DIR@
########################################################################
## INSTALL PRODUCTS
########################################################################
##
## Uncomment the lines for the products you want to install.
product.5G_Toolbox
product.AUTOSAR_Blockset
product.Aerospace_Blockset
product.Aerospace_Toolbox
product.Antenna_Toolbox
product.Audio_Toolbox
product.Automated_Driving_Toolbox
product.Bioinformatics_Toolbox
product.Bluetooth_Toolbox
#product.C2000_Microcontroller_Blockset
#product.Communications_Toolbox
#product.Computer_Vision_Toolbox
#product.Control_System_Toolbox
product.Curve_Fitting_Toolbox
product.DDS_Blockset
product.DSP_HDL_Toolbox
product.DSP_System_Toolbox
#product.Data_Acquisition_Toolbox
product.Database_Toolbox
product.Datafeed_Toolbox
product.Deep_Learning_HDL_Toolbox
product.Deep_Learning_Toolbox
product.Econometrics_Toolbox
#product.Embedded_Coder
product.Filter_Design_HDL_Coder
#product.Financial_Instruments_Toolbox
product.Financial_Toolbox
product.Fixed-Point_Designer
product.Fuzzy_Logic_Toolbox
product.GPU_Coder
#product.Global_Optimization_Toolbox
#product.HDL_Coder
#product.HDL_Verifier
product.Image_Acquisition_Toolbox
#product.Image_Processing_Toolbox
#product.Industrial_Communication_Toolbox
#product.Instrument_Control_Toolbox
#product.LTE_Toolbox
#product.Lidar_Toolbox
product.MATLAB
product.MATLAB_Coder
product.MATLAB_Compiler
product.MATLAB_Compiler_SDK
#product.MATLAB_Parallel_Server
#product.MATLAB_Production_Server
product.MATLAB_Report_Generator
product.MATLAB_Test
product.MATLAB_Web_App_Server
product.Mapping_Toolbox
product.Medical_Imaging_Toolbox
#product.Mixed-Signal_Blockset
#product.Model_Predictive_Control_Toolbox
#product.Model-Based_Calibration_Toolbox
#product.Motor_Control_Blockset
product.Navigation_Toolbox
product.Optimization_Toolbox
product.Parallel_Computing_Toolbox
product.Partial_Differential_Equation_Toolbox
product.Phased_Array_System_Toolbox
#product.Polyspace_Bug_Finder
#product.Polyspace_Bug_Finder_Server
#product.Polyspace_Code_Prover
#product.Polyspace_Code_Prover_Server
#product.Polyspace_Test
#product.Powertrain_Blockset
#product.Predictive_Maintenance_Toolbox
#product.RF_Blockset
#product.RF_PCB_Toolbox
#product.RF_Toolbox
#product.ROS_Toolbox
#product.Radar_Toolbox
#product.Reinforcement_Learning_Toolbox
#product.Requirements_Toolbox
product.Risk_Management_Toolbox
product.Robotics_System_Toolbox
#product.Robust_Control_Toolbox
#product.Satellite_Communications_Toolbox
product.Sensor_Fusion_and_Tracking_Toolbox
product.SerDes_Toolbox
product.Signal_Integrity_Toolbox
#product.Signal_Processing_Toolbox
product.SimBiology
product.SimEvents
product.Simscape
product.Simscape_Battery
#product.Simscape_Driveline
#product.Simscape_Electrical
#product.Simscape_Fluids
#product.Simscape_Multibody
product.Simulink
#product.Simulink_3D_Animation
#product.Simulink_Check
#product.Simulink_Coder
product.Simulink_Compiler
product.Simulink_Control_Design
product.Simulink_Coverage
product.Simulink_Design_Optimization
product.Simulink_Design_Verifier
#product.Simulink_Desktop_Real-Time
product.Simulink_Fault_Analyzer
product.Simulink_PLC_Coder
#product.Simulink_Real-Time
product.Simulink_Report_Generator
product.Simulink_Test
product.SoC_Blockset
#product.Spreadsheet_Link
product.Stateflow
product.Statistics_and_Machine_Learning_Toolbox
product.Symbolic_Math_Toolbox
product.System_Composer
#product.System_Identification_Toolbox
product.Text_Analytics_Toolbox
#product.UAV_Toolbox
#product.Vehicle_Dynamics_Blockset
#product.Vehicle_Network_Toolbox
product.Vision_HDL_Toolbox
#product.WLAN_Toolbox
#product.Wavelet_Toolbox
#product.Wireless_HDL_Toolbox
#product.Wireless_Testbench
########################################################################
## INSTALL SUPPORT PACKAGES
########################################################################
##
## Uncomment the lines for the support packages you want to install.
#product._Automated_Driving_Toolbox_Model_for_Lidar_Lane_Detection
#product.ASIC_Testbench_for_HDL_Verifier
#product.Aerospace_Blockset_Interface_for_Unreal_Engine_Projects
#product.Automated_Driving_Toolbox_Importer_for_Zenrin_Japan_Map_API_3.0_(Itsumo_NAVI_API_3.0)_Service
#product.Automated_Driving_Toolbox_Interface_for_Unreal_Engine_4_Projects
#product.CI/CD_Automation_for_Simulink_Check
#product.Communications_Toolbox_Support_Package_for_Analog_Devices_ADALM-Pluto_Radio
#product.Communications_Toolbox_Support_Package_for_RTL-SDR_Radio
#product.Communications_Toolbox_Support_Package_for_USRP_Embedded_Series_Radio
#product.Communications_Toolbox_Support_Package_for_USRP_Radio
#product.Communications_Toolbox_Support_Package_for_Xilinx_Zynq-Based_Radio
#product.Communications_Toolbox_Wireless_Network_Simulation_Library
#product.Component_Deployment_Guideline_for_Embedded_Coder
#product.Computer_Vision_Toolbox_Automated_Visual_Inspection_Library
#product.Computer_Vision_Toolbox_Interface_for_OpenCV_in_MATLAB
#product.Computer_Vision_Toolbox_Interface_for_OpenCV_in_Simulink
#product.Computer_Vision_Toolbox_Model_for_Inflated-3D_Video_Classification
#product.Computer_Vision_Toolbox_Model_for_Mask_R-CNN_Instance_Segmentation
#product.Computer_Vision_Toolbox_Model_for_Object_Keypoint_Detection
#product.Computer_Vision_Toolbox_Model_for_R(2+1)D_Video_Classification
#product.Computer_Vision_Toolbox_Model_for_SOLOv2_Instance_Segmentation
#product.Computer_Vision_Toolbox_Model_for_SlowFast_Video_Classification
#product.Computer_Vision_Toolbox_Model_for_Text_Detection
#product.Computer_Vision_Toolbox_Model_for_Vision_Transformer_Network
#product.Computer_Vision_Toolbox_Model_for_YOLO_v2_Object_Detection
#product.Computer_Vision_Toolbox_Model_for_YOLO_v3_Object_Detection
#product.Computer_Vision_Toolbox_Model_for_YOLO_v4_Object_Detection
#product.Computer_Vision_Toolbox_OCR_Language_Data
#product.Data_Acquisition_Toolbox_Support_Package_for_Analog_Devices_ADALM1000_Hardware
#product.Data_Acquisition_Toolbox_Support_Package_for_Digilent_Analog_Discovery_Hardware
#product.Data_Acquisition_Toolbox_Support_Package_for_Measurement_Computing_Hardware
#product.Data_Acquisition_Toolbox_Support_Package_for_National_Instruments_NI-DAQmx_Devices
#product.Data_Acquisition_Toolbox_Support_Package_for_Windows_Sound_Cards
#product.Database_Toolbox_Interface_for_Neo4j_Bolt_Protocol
#product.Deep_Learning_HDL_Toolbox_Support_Package_for_Intel_FPGA_and_SoC_Devices
#product.Deep_Learning_HDL_Toolbox_Support_Package_for_Xilinx_FPGA_and_SoC_Devices
#product.Deep_Learning_Toolbox_Converter_for_ONNX_Model_Format
#product.Deep_Learning_Toolbox_Converter_for_PyTorch_Model_Format
#product.Deep_Learning_Toolbox_Converter_for_TensorFlow_models
#product.Deep_Learning_Toolbox_Importer_for_Caffe_Models
#product.Deep_Learning_Toolbox_Interface_for_TensorFlow_Lite
#product.Deep_Learning_Toolbox_Model_Quantization_Library
#product.Deep_Learning_Toolbox_Model_for_AlexNet_Network
#product.Deep_Learning_Toolbox_Model_for_DarkNet-19_Network
#product.Deep_Learning_Toolbox_Model_for_DarkNet-53_Network
#product.Deep_Learning_Toolbox_Model_for_DenseNet-201_Network
#product.Deep_Learning_Toolbox_Model_for_EfficientNet-b0_Network
#product.Deep_Learning_Toolbox_Model_for_GoogLeNet_Network
#product.Deep_Learning_Toolbox_Model_for_Inception-ResNet-v2_Network
#product.Deep_Learning_Toolbox_Model_for_Inception-v3_Network
#product.Deep_Learning_Toolbox_Model_for_MobileNet-v2_Network
#product.Deep_Learning_Toolbox_Model_for_NASNet-Large_Network
#product.Deep_Learning_Toolbox_Model_for_NASNet-Mobile_Network
#product.Deep_Learning_Toolbox_Model_for_Places365-GoogLeNet_Network
#product.Deep_Learning_Toolbox_Model_for_ResNet-101_Network
#product.Deep_Learning_Toolbox_Model_for_ResNet-18_Network
#product.Deep_Learning_Toolbox_Model_for_ResNet-50_Network
#product.Deep_Learning_Toolbox_Model_for_ShuffleNet_Network
#product.Deep_Learning_Toolbox_Model_for_VGG-16_Network
#product.Deep_Learning_Toolbox_Model_for_VGG-19_Network
#product.Deep_Learning_Toolbox_Model_for_Xception_Network
#product.Deep_Learning_Toolbox_Verification_Library
#product.Embedded_Coder_Interface_to_QEMU_Emulator
#product.Embedded_Coder_Support_Package_For_Linux_Applications
#product.Embedded_Coder_Support_Package_for_ARM_Cortex-A_Processors
#product.Embedded_Coder_Support_Package_for_ARM_Cortex-M_Processors
#product.Embedded_Coder_Support_Package_for_ARM_Cortex-R_Processors
#product.Embedded_Coder_Support_Package_for_BeagleBone_Black_Hardware
#product.Embedded_Coder_Support_Package_for_Infineon_AURIX_TC4x_Microcontrollers
#product.Embedded_Coder_Support_Package_for_Intel_SoC_Devices
#product.Embedded_Coder_Support_Package_for_STMicroelectronics_STM32_Processors
#product.Embedded_Coder_Support_Package_for_Xilinx_Zynq_Platform
#product.Ephemeris_Data_for_Aerospace_Toolbox
#product.Extended_Tire_Features_for_Vehicle_Dynamics_Blockset
#product.FMU_Builder_For_Simulink
#product.GPU_Coder_Interface_for_Deep_Learning_Libraries
#product.GUIDE_to_App_Designer_Migration_Tool_for_MATLAB
#product.Geoid_Data_for_Aerospace_Toolbox
#product.HDL_Coder_Support_Package_for_Intel_FPGA_Boards
#product.HDL_Coder_Support_Package_for_Intel_SoC_Devices
#product.HDL_Coder_Support_Package_for_Microchip_FPGA_and_SoC_Devices
#product.HDL_Coder_Support_Package_for_Xilinx_FPGA_Boards
#product.HDL_Coder_Support_Package_for_Xilinx_RFSoC_Devices
#product.HDL_Coder_Support_Package_for_Xilinx_Zynq_Platform
#product.HDL_Verifier_Support_Package_for_Intel_FPGA_Boards
#product.HDL_Verifier_Support_Package_for_Microsemi_FPGA_Boards
#product.HDL_Verifier_Support_Package_for_Xilinx_FPGA_Boards
#product.Image_Acquisition_Toolbox_Support_Package_for_DCAM_Hardware
#product.Image_Acquisition_Toolbox_Support_Package_for_Kinect_for_Windows_Sensor
#product.Image_Acquisition_Toolbox_Support_Package_for_Matrox_Hardware
#product.Image_Acquisition_Toolbox_Support_Package_for_National_Instruments_Frame_Grabbers
#product.Image_Acquisition_Toolbox_Support_Package_for_OS_Generic_Video_Interface
#product.Image_Acquisition_Toolbox_Support_Package_for_Point_Grey_Hardware
#product.Image_Acquisition_Toolbox_Support_Package_for_Teledyne_DALSA_Sapera_Hardware
#product.Image_Processing_Toolbox_Hyperspectral_Imaging_Library
#product.Image_Processing_Toolbox_Image_Data
#product.Instrument_Control_Toolbox_Support_Package_for_IVI_and_VXIplug&play_Drivers
#product.Instrument_Control_Toolbox_Support_Package_for_Keysight_(Agilent)_IO_Libraries_and_VISA_Interface
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_NI-845x_I2C/SPI_Interface
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_NI-DCPower_Power_Supplies
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_NI-DMM_Digital_Multimeters
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_NI-FGEN_Function_Generators
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_NI-SCOPE_Oscilloscopes
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_NI-SWITCH_Hardware
#product.Instrument_Control_Toolbox_Support_Package_for_National_Instruments_VISA_and_ICP_Interfaces
#product.Instrument_Control_Toolbox_Support_Package_for_Rohde_Schwarz_VISA_Interface
#product.Instrument_Control_Toolbox_Support_Package_for_Total_Phase_Aardvark_I2C/SPI_Interface
#product.Integro-Differential_Modeling_Framework_for_MATLAB
#product.Lidar_Toolbox_Support_Package_for_Ouster_Lidar_Sensors
#product.Lidar_Toolbox_Support_Package_for_Velodyne_LiDAR_Sensors
#product.MATLAB_Basemap_Data_-_bluegreen
#product.MATLAB_Basemap_Data_-_colorterrain
#product.MATLAB_Basemap_Data_-_grayland
#product.MATLAB_Basemap_Data_-_grayterrain
#product.MATLAB_Basemap_Data_-_landcover
#product.MATLAB_Client_for_MATLAB_Production_Server
#product.MATLAB_Coder_Interface_for_Deep_Learning_Libraries
#product.MATLAB_Coder_Interface_for_Visual_Studio_Code_Debugging
#product.MATLAB_Coder_Support_Package_for_NVIDIA_Jetson_and_NVIDIA_DRIVE_Platforms
#product.MATLAB_Support_Package_for_Android_Sensors
#product.MATLAB_Support_Package_for_Apple_iOS_Sensors
#product.MATLAB_Support_Package_for_Arduino_Hardware
#product.MATLAB_Support_Package_for_BeagleBone_Black_Hardware
#product.MATLAB_Support_Package_for_LEGO_MINDSTORMS_EV3_Hardware
#product.MATLAB_Support_Package_for_Quantum_Computing
#product.MATLAB_Support_Package_for_Raspberry_Pi_Hardware
#product.MATLAB_Support_Package_for_USB_Webcams
#product.MATLAB_Support_for_MinGW-w64_C/C++_Compiler
#product.Medical_Imaging_Toolbox_Interface_for_Cellpose_
#product.Mixed-Signal_Blockset_Models
#product.Modelscape_for_MATLAB
#product.Powertrain_Blockset_Drive_Cycle_Data
#product.RF_Blockset_Models_for_Analog_Devices_RF_Transceivers
#product.ROS_Toolbox_Support_Package_for_TurtleBot-Based_Robots
#product.Radar_Toolbox_Support_Package_for_Texas_Instruments_mmWave_Radar_Sensors
#product.Robotics_System_Toolbox_Robot_Library_Data
#product.Robotics_System_Toolbox_Support_Package_for_KINOVA_Gen3_Manipulators
#product.Robotics_System_Toolbox_Support_Package_for_Universal_Robots_UR_Series_Manipulators
#product.Scenario_Builder_for_Automated_Driving_Toolbox
#product.Scenario_Variant_Generator_for_Automated_Driving_Toolbox
#product.Signal_Processing_Toolbox_Support_Package_for_Linux_IIO_Devices
#product.Simulink_Coder_Support_Package_for_ARM_Cortex-based_VEX_Microcontroller
#product.Simulink_Coder_Support_Package_for_BeagleBone_Blue_Hardware
#product.Simulink_Coder_Support_Package_for_NXP_FRDM-K64F_Board
#product.Simulink_Coder_Support_Package_for_NXP_FRDM-KL25Z_Board
#product.Simulink_Coder_Support_Package_for_STMicroelectronics_Nucleo_Boards
#product.Simulink_Coder_Support_Package_for_VEX_EDR_V5_Robot_Brain
#product.Simulink_Interface_for_Siemens_MF-Tyre/MF-Swift_Tire_Model
#product.Simulink_Real-Time_XIL_Support_Package
#product.Simulink_Support_Package_for_Android_Devices
#product.Simulink_Support_Package_for_Arduino_Hardware
#product.Simulink_Support_Package_for_LEGO_MINDSTORMS_EV3_Hardware
#product.Simulink_Support_Package_for_Parrot_Minidrones
#product.Simulink_Support_Package_for_Raspberry_Pi_Hardware
#product.Simulink_Test_Support_Package_for_ASAM_XIL
#product.SoC_Blockset_Support_Package_for_AMD-Xilinx_Versal_ACAP_Devices
#product.SoC_Blockset_Support_Package_for_Embedded_Linux_Devices
#product.SoC_Blockset_Support_Package_for_Infineon_AURIX_Microcontrollers
#product.SoC_Blockset_Support_Package_for_Intel_Devices
#product.SoC_Blockset_Support_Package_for_Xilinx_Devices
#product.Source_control_integration_with_Microsoft(R)_Source-Code_Control_Interface_(MSSCCI)_for_MATLAB_and_Simulink
#product.Streaming_Data_Framework_for_MATLAB_Production_Server
#product.Text_Analytics_Toolbox_Model_for_BERT-Base_Multilingual_Cased_Network
#product.Text_Analytics_Toolbox_Model_for_BERT-Base_Network
#product.Text_Analytics_Toolbox_Model_for_BERT-Large_Network
#product.Text_Analytics_Toolbox_Model_for_BERT-Mini_Network
#product.Text_Analytics_Toolbox_Model_for_BERT-Small_Network
#product.Text_Analytics_Toolbox_Model_for_BERT-Tiny_Network
#product.Text_Analytics_Toolbox_Model_for_fastText_English_16_Billion_Token_Word_Embedding
#product.Text_Analytics_Toolbox_Model_from_UDify_Data
#product.UAV_Toolbox_Interface_for_Unreal_Engine_Projects
#product.UAV_Toolbox_Support_Package_for_PX4_Autopilots
#product.Variant_Manager_for_Simulink
#product.Vehicle_Dynamics_Blockset_Interface_for_Unreal_Engine_4_Projects
#product.Vehicle_Dynamics_Blockset_Maneuver_Data
#product.Vision_HDL_Toolbox_Support_Package_for_Xilinx_Zynq-Based_Hardware
#product.WINNER_II_Channel_Model_for_Communications_Toolbox
#product.Wireless_Testbench_Support_Package_for_NI_USRP_Radios
########################################################################
## CHECKSUM
########################################################################
##
## NOTE: DO NOT edit this field. MathWorks uses this field to
## check the integrity of the input file. Changing the value
## of the checksum field invalidates this input file.
?checksum=UjIwMjNi

View File

@ -0,0 +1,20 @@
{
"data": "ENC[AES256_GCM,data:JrTc6ZePtcii5ygWjkFatJUJNiEUa6eFzsWVJWdPwDche9O68oD+rDpHe5CTjWzsXQB9,iv:+LkH3EAi8aUzABBLQ/FJwFPtEvgUb+MN2LFvehN+2/M=,tag:C2M9ChEdpKehzMaM5Gd3bA==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1cvmffz227lhsvy4ufh0gnkfsvs5f27hv5l90m0lf4558uphteefsj2t74j",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvb0FWYmUwN2QvdWdWbTNS\nSll1VWVRQVRJb1FVT2YyeWVEV1A0dVljS2pZCndRTnNUYk82dytNMjdIQWZ1b3pu\nRjBQZXIwVVlza01lMlNtVlhtRm9JTTQKLS0tIHZZdEtRL1I0djhOL2dkSkhleW83\nWHM4cUZKY1M0QnpCRTMzMDRIWHJTbFEKI85Z0wTXVkUE3KtTjfyzSYCDT2EQmZWf\nSq8FZuUlzGfVfh+R+gUZ1g8V76gNwzHI55MM+CEBh6EuVSyotY0AEA==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2024-02-07T16:50:53Z",
"mac": "ENC[AES256_GCM,data:wzjlt/EoF1KJ3oDw/bqkPAxTO+hGS4eWtHERD6HT0FkseHVoXVo+n53SDAkj7z8vnsx3au8QhP8FL8JWoyDVf0SrHHk7W8cqV203eUnVapJsV9IanOvCfvcENrQ2eLV8R97t3nUfyfcABUK45fL6ku6jZ3sKsS2U1eS7/atENmU=,iv:fUWBcvAcckCnEKfYQeSebYQS+0jzzvlXtBen2VL+Lqc=,tag:Fap2p5nRewKbVXa0eEUUbg==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.8.1"
}
}

File diff suppressed because one or more lines are too long

View File

@ -10,5 +10,7 @@
./servers/overleaf.nix ./servers/overleaf.nix
# Basic remote editting in jupyer notebooks # Basic remote editting in jupyer notebooks
./servers/jupyterhub.nix ./servers/jupyterhub.nix
# MATLAB License Server
./servers/matlab-license-server.nix
]; ];
} }

View File

@ -43,9 +43,8 @@ in {
port = 5432; port = 5432;
ensureUsers = [{ ensureUsers = [{
name = "gitea"; name = "gitea";
ensurePermissions = { # Ensures gitea user owns a db called gitea
"DATABASE \"gitea\"" = "ALL PRIVILEGES"; ensureDBOwnership = true;
};
ensureClauses = { ensureClauses = {
createdb = true; createdb = true;
}; };

View File

@ -1,9 +1,4 @@
{ config, lib, pkgs, nixpkgs-unstable, ... }: { { config, lib, pkgs, nixpkgs-unstable, ... }: {
imports = [
"${nixpkgs-unstable}/nixos/modules/services/web-apps/guacamole-server.nix"
"${nixpkgs-unstable}/nixos/modules/services/web-apps/guacamole-client.nix"
];
services.guacamole-server.enable = true; services.guacamole-server.enable = true;
services.guacamole-server.package = pkgs.unstable.guacamole-server; services.guacamole-server.package = pkgs.unstable.guacamole-server;
services.guacamole-server.port = 4822; services.guacamole-server.port = 4822;
@ -58,9 +53,8 @@
]; ];
ensureUsers = [{ ensureUsers = [{
name = "guacamole"; name = "guacamole";
ensurePermissions = { # Ensures guacamole user owns a db called guacamole
"DATABASE \"guacamole\"" = "ALL PRIVILEGES"; ensureDBOwnership = true;
};
ensureClauses = { ensureClauses = {
createdb = true; createdb = true;
}; };

View File

@ -1,51 +1,251 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: let
aiomcache = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "aio-memcache";
version = "0.8.1";
src = pkgs.fetchFromGitHub {
owner = "aio-libs";
repo = "aiomcache";
rev = "v${version}";
hash = "sha256-oRMN1seEjFSsq4wjkIXHM7Osq8y/5WFExGCEr6eM9vc=";
};
propagatedBuildInputs = with pkgs.python3.pkgs; [
python-memcached
];
# Networking required
doCheck = false;
};
aiohttp-session = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "aiohttp-session";
version = "2.12.0";
src = pkgs.fetchFromGitHub {
owner = "aio-libs";
repo = "aiohttp-session";
rev = "v${version}";
hash = "sha256-7MNah4OIQnoxLoZkLOdeu5uCwSyPMhc6Wsht8dFconc=";
};
propagatedBuildInputs = with pkgs.python3.pkgs; [
aiohttp
aiomcache
cryptography
multidict
pynacl
redis
yarl
];
# Checks require networking
doCheck = false;
};
matlab-proxy = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "matlab_proxy";
version = "0.12.1";
format = "wheel";
src = pkgs.python3.pkgs.fetchPypi {
inherit pname version format;
dist = "py3";
python = "py3";
hash = "sha256-TDZUJEXJYF5Vh2BG5o13H3wdh/WdVdoESXqL89ckc6I=";
};
propagatedBuildInputs = with pkgs.python3.pkgs; [
aiohttp
aiohttp-session
psutil
# For Xvfb, for plots and graphics
pkgs.xorg.xorgserver
];
};
simpervisor = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "simpervisor";
version = "1.0.0";
format = "pyproject";
src = pkgs.fetchFromGitHub {
owner = "jupyterhub";
repo = "simpervisor";
rev = "v${version}";
hash = "sha256-73vkiQtOT0M9Vww1nYZ76JR2koWt/NPIav46k1fHOzc=";
};
nativeBuildInputs = with pkgs.python3.pkgs; [
hatchling
];
};
jupyter-server-proxy = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "jupyter_server_proxy";
version = "4.1.0";
format = "pyproject";
src = pkgs.python3.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-LPrDtCMv5xROjmApa0+GFwi08TspJgos8ol2v45hf3A=";
};
nativeBuildInputs = with pkgs.python3.pkgs; [
hatchling
hatch-jupyter-builder
hatch-nodejs-version
jupyterlab
];
propagatedBuildInputs = with pkgs.python3.pkgs; [
notebook
simpervisor
aiohttp
];
# tests require network
doCheck = false;
};
jupyter-matlab-proxy = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "jupyter_matlab_proxy";
version = "0.11.0";
format = "wheel";
src = pkgs.python3.pkgs.fetchPypi {
inherit pname version format;
python = "py3";
dist = "py3";
hash = "sha256-KzQgs1zXGPjONCnLvCNQkQBkkkn9J29YFi8BHbh+D1I=";
};
propagatedBuildInputs = with pkgs.python3.pkgs; [
jupyter-server-proxy
simpervisor
matlab-proxy
psutil
requests
ipykernel
];
};
in {
services.jupyterhub = { services.jupyterhub = {
enable = true; enable = true;
port = 6501; port = 6501;
# https://github.com/jupyterhub/systemdspawner # https://github.com/jupyterhub/systemdspawner
# Configuration options defined ^ # Configuration options defined ^
# mem_limit must be higher to allow for MATLAB
extraConfig = '' extraConfig = ''
c.SystemdSpawner.mem_limit = '2G' c.SystemdSpawner.mem_limit = '8G'
c.SystemdSpawner.cpu_limit = 1.0 c.SystemdSpawner.cpu_limit = 2.0
''; c.SystemdSpawner.isolate_devices = False
kernels = { c.SystemdSpawner.extra_paths = [
python = { '${pkgs.buildEnv {
python3 = let name = "jupyterhub-system-spawner-env";
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ paths = with pkgs; [
# Necessary for use as a kernel gcc
ipykernel # For MATLAB Kernel
matlab
# Common Python Libraries # For matlab-proxy-app
numpy (pkgs.python3.withPackages (p: with p; [
scipy # For pkg_resources
scikit-learn setuptools
pandas matlab-proxy
matplotlib jupyter-matlab-proxy
seaborn ]))
# Neural Data Processing Libraries
mne-python
nibabel
neo
# Neurosimulators
neuronpy
nest
brian2
]));
in {
displayName = "Python 3 for Computational Neuroscience";
argv = [
"${env.interpreter}"
"-m"
"ipykernel_launcher"
"-f"
"{connection_file}"
]; ];
language = "python"; }}/bin']
logo32 = "${env}/${env.sitePackages}/ipykernel/resources/logo-32x32.png"; c.SystemdSpawner.environment["MATLAB_INSTALL_DIR"] = "${config.environment.sessionVariables.MATLAB_INSTALL_DIR}"
logo64 = "${env}/${env.sitePackages}/ipykernel/resources/logo-64x64.png"; c.SystemdSpawner.environment["LM_LICENSE_FILE"] = "${config.environment.sessionVariables.LM_LICENSE_FILE}"
}; c.SystemdSpawner.environment["MLM_LICENSE_FILE"] = "${config.environment.sessionVariables.MLM_LICENSE_FILE}"
# c.SystemdSpawner.environment["MWI_JUPYTER_LOG_LEVEL"] = "DEBUG"
'';
# Extra Paths used to add gcc et al for packages like Brian2
# https://github.com/jupyterhub/systemdspawner#extra_paths
jupyterlabEnv = pkgs.python3.withPackages (p: with p; [
jupyterhub
jupyterlab
# Extensions:
jupyter-collaboration
jupyter-server-mathjax
jupyter-console
jupyterlab-lsp
python-lsp-server
# MATLAB Proxy Needs to be here in order to modify and add the "launch matlab" etc.
jupyter-matlab-proxy # <-- This in effect adds the kernel
]);
kernels = {
python3 = let
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
# Necessary for use as a kernel
ipykernel
ipdb
# Interactive widgets
ipywidgets
# Show images/media
mediapy
# Progress bars etc. for in Jupyter/IPython
halo
# Common Python Libraries
numpy
scipy
scikit-learn
pandas
# Tables displayed in Jupyter: like Pandas Dataframes
ipytablewidgets
matplotlib
ipympl
matplotlib-inline
seaborn
# Neural Data Processing Libraries
# Temporarily broken?: https://github.com/NixOS/nixpkgs/issues/259812
# mne-python
nibabel
# View niftis!
ipyniivue
neo
# Neurosimulators
neuronpy
# nest with MPI is incompatible with Jupyter:
# https://www.nest-simulator.org/pynest-api/_modules/nest.html
# see pynestkernel comments about their workaround
(nest.override {
withMpi = false;
})
brian2
# Machine learning toolkits:
tensorflow
tensorboard
keras
edward
transformers
tflearn
torch
torchvision
torchsde
torchmetrics
torchio
torchdiffeq
botorch
lion-pytorch
])).override (args: { ignoreCollisions = true; });
# Odd collision between tensorboard of torch & tensorflow
# need to resolve later
in {
displayName = "Python 3 for Computational Neuroscience";
argv = [
"${env.interpreter}"
"-m"
"ipykernel_launcher"
"-f"
"{connection_file}"
];
language = "python";
logo32 = "${env}/${env.sitePackages}/ipykernel/resources/logo-32x32.png";
logo64 = "${env}/${env.sitePackages}/ipykernel/resources/logo-64x64.png";
}; };
}; };
}; };
@ -57,5 +257,4 @@
''; '';
}; };
}; };
} }

View File

@ -0,0 +1,91 @@
{ config, lib, pkgs, ... }: let
# Make sure that the license manager version matches the currently
# issued license to KCNHUB in the License Centre.
license-manager = pkgs.stdenv.mkDerivation rec {
pname = "matlab-license-server";
version = "R2023b";
src = pkgs.fetchurl {
url = "https://ssd.mathworks.com/supportfiles/downloads/${version}/license_manager/${version}/daemons/glnxa64/mathworks_network_license_manager_glnxa64.zip";
hash = "sha256-Btl3ETzTtAV+cjqwXf4AE4QJCtssN1s6dmmcpR1EQxY=";
};
nativeBuildInputs = [
pkgs.autoPatchelfHook
];
unpackPhase = ''
${pkgs.unzip}/bin/unzip $src
'';
installPhase = ''
mkdir $out
cp -r * $out/
addAutoPatchelfSearchPath $out/*
'';
};
matlab-server-user = "matlab-server";
homedir = "/var/lib/${matlab-server-user}";
# Make sure this is up to date with the latest license file
# by editting secrets/matlab-network.lic
NETWORK_LICENSE = config.sops.secrets.matlab-network-license.path;
PORT = 27000;
in {
users.users.${matlab-server-user} = {
isSystemUser = true;
home = homedir;
useDefaultShell = true;
group = matlab-server-user;
};
users.groups.${matlab-server-user} = {};
sops.secrets.matlab-license = {
sopsFile = ../secrets/matlab.lic;
format = "binary";
owner = matlab-server-user;
restartUnits = [ "matlab-license-server.service" ];
};
sops.secrets.matlab-network-license = {
sopsFile = ../secrets/matlab-network.lic;
format = "binary";
owner = matlab-server-user;
mode = "0444";
restartUnits = [ "matlab-license-server.service" ];
};
systemd.services.matlab-license-server = {
# Start on boot
enable = true;
# When multi user login is loaded, matlab-server user can be used
wantedBy = [ "multi-user.target" ];
# The license server has to be after networking is available
after = [ "network.target" ];
description = "MATLAB License Server";
serviceConfig = {
Type = "forking";
User = matlab-server-user;
Group = matlab-server-user;
RuntimeDirectory = matlab-server-user;
WorkingDirectory = homedir;
ExecStartPre = pkgs.writeScript "matlab-license-serverify" ''
#!${pkgs.bash}/bin/bash
head -n1 ${NETWORK_LICENSE} > ${homedir}/license.lic
echo 'DAEMON MLM DAEMON MLM ${license-manager}/etc/glnxa64/MLM' >> ${homedir}/license.lic
cat ${config.sops.secrets.matlab-license.path} >> ${homedir}/license.lic
'';
ExecStart = "${license-manager}/etc/glnxa64/lmgrd -c ${homedir}/license.lic";
};
};
environment.sessionVariables = {
LM_LICENSE_FILE = NETWORK_LICENSE;
MLM_LICENSE_FILE = NETWORK_LICENSE;
};
networking.firewall.allowedTCPPorts = [
PORT
];
networking.firewall.allowedUDPPorts = [
PORT
];
}

View File

@ -5,7 +5,6 @@
./users/carol.nix ./users/carol.nix
./users/alan.nix ./users/alan.nix
./users/spandan.nix ./users/spandan.nix
./users/matlab-server.nix
./users/frances.nix ./users/frances.nix
./users/srikar.nix ./users/srikar.nix
./users/zhenyangsun.nix ./users/zhenyangsun.nix

View File

@ -1,10 +0,0 @@
{ pkgs, ... }: {
users.users.matlab-server = {
isNormalUser = true;
homeSize = "15g";
homeProjectId = 105;
packages = with pkgs; [
];
};
}