summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-03-02 21:55:16 -0500
committerseth <[email protected]>2023-03-02 22:01:10 -0500
commit6ca203faa2702f0f6c759adb8aa23692f29ccaba (patch)
tree8df2cda1fbb5ff0c2d75f7151100ac6712528fa3 /flake.nix
initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..ed4b5f0
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,42 @@
+{
+ inputs = {
+ utils.url = "github:numtide/flake-utils";
+ naersk = {
+ url = "github:nix-community/naersk";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ outputs = {
+ nixpkgs,
+ utils,
+ naersk,
+ ...
+ }: let
+ supportedSystsems = with utils.lib.system; [
+ x86_64-linux
+ # x86_64-darwin
+ # aarch64-linux
+ # aarch64-darwin
+ ];
+ packageSet = pkgs:
+ with pkgs; {
+ treefetch = callPackage ./pkgs/treefetch.nix {inherit naersk;};
+ };
+ overrides = prev: {
+ discord-canary = import ./pkgs/discord-canary.nix prev;
+ };
+ in
+ utils.lib.eachSystem supportedSystsems (system: let
+ pkgs = import nixpkgs {inherit system;};
+ in {
+ formatter = pkgs.alejandra;
+ packages = let
+ p = packageSet pkgs;
+ in
+ p // {default = p.treefetch;};
+ })
+ // {
+ overlays.default = final: prev: packageSet final // overrides prev;
+ };
+}