Add nix stuff

This commit is contained in:
Oystein Kristoffer Tveit 2022-10-14 15:11:27 +02:00
parent 34c14091ec
commit 894c220fbb
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
3 changed files with 51 additions and 0 deletions

26
flake.lock generated Normal file
View File

@ -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
}

12
flake.nix Normal file
View File

@ -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 {};
};
}

13
shell.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs ? import <nixpkgs> {}, ... }:
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.
}