From b68a8ee61290529157f9e4bb73f417947557484d Mon Sep 17 00:00:00 2001 From: August Date: Sun, 11 Oct 2026 17:36:55 +0000 Subject: [PATCH] Switch from shell.nix to flake.nix --- docs/DEVELOPMENT.MD | 2 +- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/docs/DEVELOPMENT.MD b/docs/DEVELOPMENT.MD index 5718b22..78abff3 100644 --- a/docs/DEVELOPMENT.MD +++ b/docs/DEVELOPMENT.MD @@ -61,7 +61,7 @@ install it before you can build an ISO automatically. To do so, you can run ### Dependencies -If you use NixOS or the Nix package manager, simply run `nix-shell` in the root +If you use NixOS or the Nix package manager, simply run `nix develop` in the root directory. All necessary dependencies will be made available. If not, the following dependencies will need to be manually installed: diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..53314f6 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1791739280, + "narHash": "sha256-1dwyb7Xh8eTR6ZP+C5u+DZatS7KROgozx8qo7CSZNMk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4c28db8c9abaf2a6a117f96cc16ddb17b8eb70cc", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9f02e35 --- /dev/null +++ b/flake.nix @@ -0,0 +1,29 @@ +{ + description = "Nix devshells!"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/master"; + }; + + outputs = {nixpkgs, ...}: let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { + devShells.${system}.default = pkgs.mkShell { + packages = with pkgs ; [ + bash + limine-full + xorriso + rustup + qemu + cargo-make + cargo-binutils + ]; + shellHook = '' + rustup default nightly; + rustup target add x86_64-unknown-none; + export LIMINEDIR="${pkgs.limine-full}/share/limine" + ''; + }; + }; +} \ No newline at end of file