From 0c670125c33b5218286d5d493269f1dcc58eb784 Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Sun, 26 Jan 2025 12:57:38 +0100 Subject: [PATCH] Added matlab --- flake.lock | 44 ++++++++++++++++++-- flake.nix | 10 +++++ modules/base/default.nix | 1 - user-modules/browser/qutebrowser/default.nix | 17 -------- user-modules/development/default.nix | 2 +- user-modules/development/ide/matlab.nix | 22 ++++++++++ users/jan.nix | 1 + 7 files changed, 75 insertions(+), 22 deletions(-) create mode 100644 user-modules/development/ide/matlab.nix diff --git a/flake.lock b/flake.lock index cc87a0d..b517a77 100644 --- a/flake.lock +++ b/flake.lock @@ -104,6 +104,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -117,7 +133,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_2": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1733328505, @@ -454,6 +470,27 @@ "type": "github" } }, + "nix-matlab": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737840943, + "narHash": "sha256-64j4mytkcPjd+k8KwDRzti/mc5cOJgY/LeOxbAykoag=", + "owner": "doronbehar", + "repo": "nix-matlab", + "rev": "4151ee1768ae1842f3505c0927eefbc977fcf046", + "type": "gitlab" + }, + "original": { + "owner": "doronbehar", + "repo": "nix-matlab", + "type": "gitlab" + } + }, "nixpkgs": { "locked": { "lastModified": 1737469691, @@ -505,7 +542,7 @@ "nixvim": { "inputs": { "devshell": "devshell", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "git-hooks": "git-hooks", "home-manager": "home-manager_2", @@ -576,6 +613,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nix-matlab": "nix-matlab", "nixpkgs": "nixpkgs", "nixvim": "nixvim", "nur": "nur", @@ -589,7 +627,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_2", "git-hooks": "git-hooks_2", "gnome-shell": "gnome-shell", diff --git a/flake.nix b/flake.nix index 4541140..4a97997 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ url = "github:nix-community/NUR"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-matlab = { + url = "gitlab:doronbehar/nix-matlab"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -22,6 +26,7 @@ stylix, nixvim, nur, + nix-matlab, ... }: let @@ -38,6 +43,11 @@ stylix.homeManagerModules.stylix nixvim.homeManagerModules.nixvim nur.modules.homeManager.default + { + nixpkgs.overlays = [ + nix-matlab.overlay + ]; + } ]; } ]; diff --git a/modules/base/default.nix b/modules/base/default.nix index 699aa85..e22aa7d 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -84,7 +84,6 @@ in nix.settings.experimental-features = "nix-command flakes"; networking.useDHCP = true; nixpkgs.hostPlatform = "x86_64-linux"; - networking.firewall.allowedTCPPortRanges = [ { from = 10000; diff --git a/user-modules/browser/qutebrowser/default.nix b/user-modules/browser/qutebrowser/default.nix index 628ddeb..3e3064e 100644 --- a/user-modules/browser/qutebrowser/default.nix +++ b/user-modules/browser/qutebrowser/default.nix @@ -19,23 +19,6 @@ in config = mkIf cfg.enable { default.browser = mkIf cfg.default "org.qutebrowser.qutebrowser.desktop"; - # TODO: Remove once nixpkgs updates - # nixpkgs.config.packageOverrides = pkgs: { - # python3 = pkgs.python3.override { - # packageOverrides = self: super: { - # pykeepass = super.pykeepass.overrideAttrs (attrs: { - # version = "4.1.0.post1"; - # src = pkgs.fetchFromGitHub { - # owner = "libkeepass"; - # repo = "pykeepass"; - # rev = "refs/tags/v4.1.0.post1"; - # hash = "sha256-64is/XoRF/kojqd4jQIAQi1od8TRhiv9uR+WNIGvP2A="; - # }; - # }); - # }; - # }; - # }; - programs.qutebrowser = { enable = true; diff --git a/user-modules/development/default.nix b/user-modules/development/default.nix index a77922f..44d2797 100644 --- a/user-modules/development/default.nix +++ b/user-modules/development/default.nix @@ -2,7 +2,7 @@ { imports = [ - # Import systemwide configuration files. + ./ide/matlab.nix ./utilities/docker.nix ]; } diff --git a/user-modules/development/ide/matlab.nix b/user-modules/development/ide/matlab.nix new file mode 100644 index 0000000..fd89e6e --- /dev/null +++ b/user-modules/development/ide/matlab.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + ... +}: + +with lib; +let + cfg = config.modules.matlab; +in +{ + options.modules.matlab = { + enable = mkEnableOption "matlab"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + matlab + ]; + }; +} diff --git a/users/jan.nix b/users/jan.nix index ef39829..88ef9da 100644 --- a/users/jan.nix +++ b/users/jan.nix @@ -88,6 +88,7 @@ neovim.enable = true; vscode.enable = true; docker.enable = true; + matlab.enable = true; # Languages haskell.enable = false;