Add tritonshell for nix package manager
This commit is contained in:
parent
bfc3d953a0
commit
8ab8a5523b
4 changed files with 145 additions and 0 deletions
4
.envrc
Normal file
4
.envrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
# reload when these files change
|
||||
cd tritonshell
|
||||
watch_file flake.nix
|
||||
use_flake
|
2
tritonshell/.gitignore
vendored
Normal file
2
tritonshell/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.direnv
|
||||
result
|
95
tritonshell/flake.lock
generated
Normal file
95
tritonshell/flake.lock
generated
Normal file
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1667210711,
|
||||
"narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669411043,
|
||||
"narHash": "sha256-LfPd3+EY+jaIHTRIEOUtHXuanxm59YKgUacmSzaqMLc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5dc7114b7b256d217fe7752f1614be2514e61bb8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"tritonshell-module": "tritonshell-module"
|
||||
}
|
||||
},
|
||||
"tritonshell-module": {
|
||||
"inputs": {
|
||||
"devshell": [
|
||||
"devshell"
|
||||
],
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1669581047,
|
||||
"narHash": "sha256-qs2VUUCCkWlc+5KvP/Vh2ToLKMkCjAws47bVT6rilG8=",
|
||||
"ref": "main",
|
||||
"rev": "341aa68b667a8fb9b77f8af319b7439e82c78793",
|
||||
"revCount": 53,
|
||||
"type": "git",
|
||||
"url": "https://git.greenbaum.cloud/dev/tritonshell"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "https://git.greenbaum.cloud/dev/tritonshell"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
44
tritonshell/flake.nix
Normal file
44
tritonshell/flake.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
description = "Example devshell using the tritonshell nix module";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
devshell.url = "github:numtide/devshell";
|
||||
devshell.inputs.flake-utils.follows = "flake-utils";
|
||||
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
tritonshell-module.url = "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main";
|
||||
tritonshell-module.inputs.devshell.follows = "devshell";
|
||||
tritonshell-module.inputs.flake-utils.follows = "flake-utils";
|
||||
tritonshell-module.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, flake-utils, devshell, tritonshell-module, nixpkgs }:
|
||||
flake-utils.lib.simpleFlake {
|
||||
inherit self nixpkgs;
|
||||
name = "infra-project";
|
||||
preOverlays = [ devshell.overlay ];
|
||||
shell = { pkgs }:
|
||||
pkgs.devshell.mkShell {
|
||||
imports = [ tritonshell-module.devshellModules.x86_64-linux.tritonshell ];
|
||||
# Now the tritonshell environment nix module options are available
|
||||
environment = {
|
||||
enable = true;
|
||||
# CUSTOMIZE if desired, default options are:
|
||||
#cnsBaseDomain = "greenbaum.zone";
|
||||
#dataCenters = [ "cgn-1" "lev-1" ];
|
||||
#mantaDomain = "eu-central.manta.greenbaum.cloud";
|
||||
#tritonApiDomain = "api.greenbaum.cloud";
|
||||
};
|
||||
|
||||
# Add additional packages you'd like to be available in your devshell
|
||||
# PATH here
|
||||
devshell.packages = with pkgs; [
|
||||
#nodejs
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue