nixpkgs: follow nixos-unstable, update flake.lock

This commit is contained in:
jhonas 2022-02-22 15:09:03 +01:00
parent 4160fb8863
commit 953321ffe3
Signed by: teutat3s
GPG key ID: 924889A86D0B0FEB
4 changed files with 58 additions and 37 deletions

View file

@ -6,15 +6,18 @@
0. If you're already on NixOS and / or have worked with `flakes` before, jump to **2.**
1. [Install nix, the package manager](https://nixos.org/download.html)
1. Now, make sure you're ready to `nix` with flakes, this should give you some output:
1. Now, make sure you're ready to `nix` with flakes, this should give you
some output:
```
nix flake --help
```
2. Otherwise, proceed to enable flakes (still an experimental feature in `nix`):
2. Otherwise, proceed to enable flakes (still an experimental feature in
`nix`):
https://nixos.wiki/wiki/Flakes#Installing_flakes
2. Get this nix flake template, it will be setup in a new directory `./tritonshell` (feel free to adjust this):
2. Get this nix flake template, it will be setup in a new directory
`./tritonshell` (feel free to adjust this):
```
nix flake new --template "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main" ./tritonshell
cd tritonshell
@ -28,4 +31,10 @@ nix develop
**Optional**:
If you'd like to customize your new tritonshell with additional packages, you
can do so: just edit `flake.nix` and look for `extraDevshellPkgs`. Packages
added here will be pulled from the `nixos-unstable` channel, you can [search
for available packages here](https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hello).
TODO: add `nix-direnv`

View file

@ -1,12 +1,16 @@
{
"nodes": {
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1643393796,
"narHash": "sha256-+wb2OFWJjXUZw3HQezACc9Lj/5uuhNpUtrjDiIYw8H4=",
"lastModified": 1644227066,
"narHash": "sha256-FHcFZtpZEWnUh62xlyY3jfXAXHzJNEDLDzLsJxn+ve0=",
"owner": "numtide",
"repo": "devshell",
"rev": "fff3dc6e4538f6df85ee3027f13cc7730b23f61d",
"rev": "7033f64dd9ef8d9d8644c5030c73913351d2b660",
"type": "github"
},
"original": {
@ -30,18 +34,33 @@
"type": "github"
}
},
"nixpkgs": {
"flake-utils_2": {
"locked": {
"lastModified": 1643630271,
"narHash": "sha256-E49xk1KCW+0211Lnmhdt5WvVzUI3Se8Y74N6pUkraPU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "17f073ee6b61d2afcd2a3ce5c4e360436f68bef4",
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-21.11",
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1643381941,
"narHash": "sha256-pHTwvnN4tTsEKkWlXQ8JMY423epos8wUOhthpwJjtpc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5efc8ca954272c4376ac929f4c5ffefcc20551d5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -62,13 +81,13 @@
"type": "github"
}
},
"nixpkgsUnstable": {
"nixpkgs_2": {
"locked": {
"lastModified": 1643347846,
"narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=",
"lastModified": 1645433236,
"narHash": "sha256-4va4MvJ076XyPp5h8sm5eMQvCrJ6yZAbBmyw95dGyw4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41",
"rev": "7f9b6e2babf232412682c09e57ed666d8f84ac2d",
"type": "github"
},
"original": {
@ -81,10 +100,9 @@
"root": {
"inputs": {
"devshell": "devshell",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"nixpkgs20-09": "nixpkgs20-09",
"nixpkgsUnstable": "nixpkgsUnstable"
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2",
"nixpkgs20-09": "nixpkgs20-09"
}
}
},

View file

@ -3,11 +3,10 @@
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
inputs.nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nixpkgs20-09.url = "github:nixos/nixpkgs/release-20.09";
outputs = { self, flake-utils, devshell, nixpkgs, nixpkgsUnstable, nixpkgs20-09 }:
outputs = { self, flake-utils, devshell, nixpkgs, nixpkgs20-09 }:
flake-utils.lib.eachDefaultSystem (system: {
# Internal utility package with shell function and env vars helper.
@ -21,11 +20,6 @@
overlays = [ devshell.overlay ];
};
pkgsUnstable = import nixpkgsUnstable {
inherit system;
overlays = [ devshell.overlay ];
};
pkgs20-09 = import nixpkgs20-09 {
inherit system;
@ -34,11 +28,11 @@
# HINT: add your extra pkgs here,
# they'll get appended to devshell.packages in ./tritonshell.nix
extraDevshellPkgs = [
#pkgs.hello
extraDevshellPkgs = with pkgs; [
#hello
];
in
import ./tritonshell.nix { inherit extraDevshellPkgs devshell pkgs pkgsUnstable pkgs20-09 self system; };
import ./tritonshell.nix { inherit extraDevshellPkgs devshell pkgs pkgs20-09 self system; };
});
}

View file

@ -1,4 +1,4 @@
{ extraDevshellPkgs, devshell, pkgs, pkgsUnstable, pkgs20-09, self, system, ... }:
{ extraDevshellPkgs, devshell, pkgs, pkgs20-09, self, system, ... }:
pkgs.devshell.mkShell {
# devshell docs: https://numtide.github.io/devshell/modules_schema.html
name = "tritonshell";
@ -32,13 +32,13 @@ pkgs.devshell.mkShell {
help = "Per project developer environments";
}
{
package = pkgsUnstable.nodePackages.triton;
package = pkgs.nodePackages.triton;
category = "triton & manta tools";
name = "triton";
help = "Triton DC CLI (https://docs.joyent.com/public-cloud/api/triton-cli)";
help = "Triton DC CLI (https://docs.greenbaum.cloud/en/devops/triton-cli.html)";
}
{
package = pkgsUnstable.nodePackages.manta;
package = pkgs.nodePackages.manta;
category = "triton & manta tools";
name = "manta";
help = "Manta CLIs (https://apidocs.joyent.com/manta/index.html#cli)";