Add shell.nix and direnv

This commit is contained in:
Alexander Bantyev 2021-03-10 18:53:44 +03:00
parent d37b65155d
commit c4cf85990a
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
5 changed files with 45 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ tramp
.\#*
result
*\.qcow2
.direnv

View File

@ -86,6 +86,22 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1606424373,
"narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"haskell-nix": {
"locked": {
"lastModified": 1587989559,
@ -369,6 +385,7 @@
"NUR": "NUR",
"base16-unclaimed-schemes": "base16-unclaimed-schemes",
"deploy-rs": "deploy-rs",
"flake-compat": "flake-compat_2",
"home-manager": "home-manager",
"lambda-launcher": "lambda-launcher",
"materia-theme": "materia-theme",

View File

@ -7,6 +7,10 @@
# nixpkgs-mesa.url = github:nixos/nixpkgs-channels/bdac777becdbb8780c35be4f552c9d4518fe0bdb;
lambda-launcher.url = "github:balsoft/lambda-launcher";
deploy-rs.url = "github:serokell/deploy-rs";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
NUR = {
url = "github:nix-community/NUR";
flake = false;
@ -74,6 +78,15 @@
defaultApp = deploy-rs.defaultApp;
devShell.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux;
mkShell {
buildInputs = [
nix.defaultPackage.x86_64-linux
deploy-rs.defaultPackage.x86_64-linux
nixfmt
];
};
deploy = {
user = "root";
nodes.T420-Laptop = {

13
shell.nix Normal file
View File

@ -0,0 +1,13 @@
(import
(
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{
src = ./.;
}).shellNix