From 894c220fbb9f81b8a3d4940ee987287c79202379 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 14 Oct 2022 15:11:27 +0200 Subject: [PATCH] Add nix stuff --- flake.lock | 26 ++++++++++++++++++++++++++ flake.nix | 12 ++++++++++++ shell.nix | 13 +++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2b5e23b --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1665613119, + "narHash": "sha256-VTutbv5YKeBGWou6ladtgfx11h6et+Wlkdyh4jPJ3p0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e06bd4b64bbfda91d74f13cb5eca89485d47528f", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.05", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..78848c7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,12 @@ +{ + description = "scalable stuff"; + + inputs.nixpkgs.url = "nixpkgs/nixos-22.05"; + + outputs = { self, nixpkgs }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShells.${system}.default = pkgs.callPackage ./shell.nix {}; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..e9b9e7b --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +{ pkgs ? import {}, ... }: +pkgs.mkShell { + packages = with pkgs; [ + scala + sbt + ]; + + shellHook = '' + export PS1="\[\e[31m\][\[\e[m\]\[\e[35m\]l\[\e[m\]\[\e[33m\]m\[\e[m\]\[\e[32m\]a\[\e[m\]\[\e[36m\]o\[\e[m\]\[\e[34m\]>\[\e[m\] " + ''; + + # TODO: move the ivy2 package cache here so it doesn't mess up the home dir. +}