diff --git a/nixos/flake.nix b/nixos/flake.nix index 80814dc..d58b95c 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -84,5 +84,64 @@ Tibo-NixFat.modules = [ ./hosts/Tibo-NixFat ]; Tibo-NixTest.modules = [ ./hosts/Tibo-NixTest ]; }; + + outputsBuilder = channels: { + devShells = { + default = channels.nixpkgs.mkShell { + name = "devShell"; + packages = with channels.nixpkgs; [ + nodejs + ]; + }; + unstable = let + pkgs = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + in channels.nixpkgs.mkShell { + name = "Unstable"; + packages = with pkgs; [ + anytype + ]; + }; + rust = let + pkgs = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + in channels.nixpkgs.mkShell { + name = "Rust Shell"; + packages = with pkgs; [ + rustc + cargo + rustup + + (jetbrains.plugins.addPlugins jetbrains.rust-rover [ "github-copilot" ]) + ]; + }; + webdev = let + pkgs = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + in channels.nixpkgs.mkShell { + name = "Web development Shell"; + packages = with pkgs; [ + nodejs + playwright-test + playwright-driver + playwright-driver.browsers + + # IDE's + (jetbrains.plugins.addPlugins jetbrains.webstorm [ "github-copilot" ]) + ]; + + shellHook = '' + export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers} + export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true + ''; + }; + }; + }; }; } diff --git a/nixos/shells/c/default.nix b/nixos/shells/c/default.nix new file mode 100644 index 0000000..09a7f1d --- /dev/null +++ b/nixos/shells/c/default.nix @@ -0,0 +1,30 @@ +{ + description = "C Flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, flake-utils, nixpkgs }: + flake-utils.lib.eachDefaultSystem (system: + let + lib = import lib; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + cmake + gcc + gnumake + valgrind + + # You might want to use your own IDE. + (jetbrains.plugins.addPlugins jetbrains.clion [ "github-copilot" ]) + ]; + }; + }); +} diff --git a/nixos/shells/java/default.nix b/nixos/shells/java/default.nix new file mode 100644 index 0000000..676c946 --- /dev/null +++ b/nixos/shells/java/default.nix @@ -0,0 +1,26 @@ +{ + description = "Java Flake"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + ( system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + jdk8 + openjdk17 + + # You might want to use your own IDE. + (jetbrains.plugins.addPlugins jetbrains.idea-ultimate [ "github-copilot" ]) + ]; + }; + }); +} diff --git a/nixos/shells/latex/default.nix b/nixos/shells/latex/default.nix new file mode 100644 index 0000000..e2cb799 --- /dev/null +++ b/nixos/shells/latex/default.nix @@ -0,0 +1,24 @@ +{ + description = "LaTeX Flake"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils}: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + texlive.combined.scheme-full + pgfplots + biber + ]; + }; + } + ); +} diff --git a/nixos/shells/rust/default.nix b/nixos/shells/rust/default.nix new file mode 100644 index 0000000..68f7825 --- /dev/null +++ b/nixos/shells/rust/default.nix @@ -0,0 +1,24 @@ +{ + description = "Rust Flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + cargo + rustc + ]; + shellHook = '' + ''; + }; + }); +}