From fa9f05fac56a5ec80fcc39e804cb73f201d43a19 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Sat, 9 Mar 2024 21:10:03 +0100 Subject: [PATCH] add nix dev shell --- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 25 ++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..cdd10e3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1709703039, + "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 4b3f280..9a90439 100644 --- a/flake.nix +++ b/flake.nix @@ -21,5 +21,30 @@ (flakePkg "github:nix-community/zon2nix") ]; }; + + devShells.default = nixpkgs.legacyPackages.${system}.mkShell { + buildInputs = with pkgs; [ + # packages required to build scripts + # TODO: build scripts with nix instead + pkg-config + wayland + wayland-protocols + libgit2 + libGL + roswell + ] ++ + # shorthands for setup.rkt + builtins.map + (cmd: pkgs.writeShellScriptBin cmd '' + ./setup.rkt ${cmd} + '') [ + "install-scripts" + "install-plugins" + "install-lsps-paru" + "setup-nvim-config" + "setup-nix" + "confgen" + ]; + }; }); }