mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
flake'ify shell.nix
This commit is contained in:
parent
c43dc3f15f
commit
9fec349961
4 changed files with 39 additions and 14 deletions
2
.envrc
2
.envrc
|
|
@ -1 +1 @@
|
|||
use nix
|
||||
use flake
|
||||
22
flake.lock
generated
22
flake.lock
generated
|
|
@ -59,6 +59,21 @@
|
|||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1649676176,
|
||||
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1619345332,
|
||||
"narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=",
|
||||
|
|
@ -73,7 +88,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"flake-utils_3": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
|
|
@ -148,7 +163,7 @@
|
|||
},
|
||||
"neovim-flake": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -383,7 +398,7 @@
|
|||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -404,6 +419,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"flake-utils": "flake-utils",
|
||||
"hercules-ci-agent": "hercules-ci-agent",
|
||||
"himalaya": "himalaya",
|
||||
"home-manager": "home-manager",
|
||||
|
|
|
|||
20
flake.nix
20
flake.nix
|
|
@ -6,6 +6,8 @@
|
|||
darwin.url = "github:lnl7/nix-darwin/master";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-utils.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixos-hardware.url = github:NixOS/nixos-hardware/master;
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -163,6 +165,22 @@
|
|||
air = defaultMacosSystem;
|
||||
sky = defaultMacosSystem;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
} //
|
||||
inputs.flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" ] (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
treefmt
|
||||
nixpkgs-fmt
|
||||
# To enable webhint to analyze source files
|
||||
nodejs
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
treefmt
|
||||
nixpkgs-fmt
|
||||
# To enable webhint to analyze source files
|
||||
nodejs
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue