Init
This commit is contained in:
commit
c8991b8e7e
3 changed files with 49 additions and 0 deletions
23
flake.lock
generated
Normal file
23
flake.lock
generated
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1759143120,
|
||||
"narHash": "sha256-Lz9jvhswQu/niKVttNvOds0w+OS+2x63NivPVJng5G4=",
|
||||
"type": "tarball",
|
||||
"url": "https://mirrors.cernet.edu.cn/nix-channels/nixos-unstable/nixexprs.tar.xz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://mirrors.cernet.edu.cn/nix-channels/nixos-unstable/nixexprs.tar.xz"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
17
flake.nix
Normal file
17
flake.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
description = "My personal nix packages";
|
||||
|
||||
inputs.nixpkgs.url = "https://mirrors.cernet.edu.cn/nix-channels/nixos-unstable/nixexprs.tar.xz";
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
system = "x86_64-linux";
|
||||
myOverlay = import ./overlays/my-pkgs.nix;
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ myOverlay ];
|
||||
};
|
||||
in {
|
||||
overlays = [ myOverlay ];
|
||||
packages.${system} = pkgs;
|
||||
};
|
||||
}
|
||||
9
overlays/my-pkgs.nix
Normal file
9
overlays/my-pkgs.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
self: super: let
|
||||
pkgsDir = ./../pkgs;
|
||||
pkgNames = builtins.attrNames (builtins.readDir pkgsDir);
|
||||
myPkgs = builtins.listToAttrs (map (name: {
|
||||
name = name; value = super.callPackage (pkgsDir + "/" + name) {};
|
||||
}) pkgNames);
|
||||
|
||||
in
|
||||
super // myPkgs
|
||||
Loading…
Add table
Add a link
Reference in a new issue