From 2effa9fbdc0112678d2cfb0fe5650db58884e884 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Fri, 28 Jul 2023 10:02:26 -0400 Subject: [PATCH] Add Matlab Compat --- flake.lock | 38 +++++++++++++++++++++++++++++ flake.nix | 8 +++++- machines/kcnhub/configuration.nix | 4 --- machines/kcnhub/packages.nix | 1 + machines/kcnhub/packages/matlab.nix | 8 ++++++ 5 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 machines/kcnhub/packages/matlab.nix diff --git a/flake.lock b/flake.lock index a43fd02..7712eed 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,42 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "nix-matlab": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690470066, + "narHash": "sha256-/z/TDmKE6wKRiyi/qwp3SG6jmFBIg2EvjrF2GldAmOs=", + "owner": "doronbehar", + "repo": "nix-matlab", + "rev": "8b48ad6bf6843f7c2fb9aae6032aa9b8267f7830", + "type": "gitlab" + }, + "original": { + "owner": "doronbehar", + "repo": "nix-matlab", + "type": "gitlab" + } + }, "nixpkgs": { "locked": { "lastModified": 1690470004, @@ -34,6 +71,7 @@ }, "root": { "inputs": { + "nix-matlab": "nix-matlab", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix" } diff --git a/flake.nix b/flake.nix index 45e3360..86d3d02 100644 --- a/flake.nix +++ b/flake.nix @@ -8,10 +8,16 @@ # Follow the system nixpkgs inputs.nixpkgs.follows = "nixpkgs"; }; + nix-matlab = { + url = "gitlab:doronbehar/nix-matlab"; + # Follow the system nixpkgs + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, sops-nix }: { + outputs = { self, nixpkgs, sops-nix, nix-matlab }@attrs: { nixosConfigurations.kcnhub = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = attrs; modules = [ ./machines/kcnhub/configuration.nix sops-nix.nixosModules.sops diff --git a/machines/kcnhub/configuration.nix b/machines/kcnhub/configuration.nix index c676176..5ad26d1 100644 --- a/machines/kcnhub/configuration.nix +++ b/machines/kcnhub/configuration.nix @@ -1,7 +1,3 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, pkgs, ... }: { diff --git a/machines/kcnhub/packages.nix b/machines/kcnhub/packages.nix index e808cef..fab6418 100644 --- a/machines/kcnhub/packages.nix +++ b/machines/kcnhub/packages.nix @@ -2,5 +2,6 @@ imports = [ ./packages/office.nix ./packages/terminal.nix + ./packages/matlab.nix ]; } diff --git a/machines/kcnhub/packages/matlab.nix b/machines/kcnhub/packages/matlab.nix new file mode 100644 index 0000000..53bcc26 --- /dev/null +++ b/machines/kcnhub/packages/matlab.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, nix-matlab, ... }: { + environment.systemPackages = with nix-matlab.packages.x86_64-linux; [ + matlab + matlab-shell + matlab-mlint + matlab-mex + ]; +}