summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-01-24 01:56:28 -0500
committerseth <[email protected]>2024-01-24 05:35:36 -0500
commit4967396702ad723d86a8d6792052cfdcad090ccf (patch)
treea80f6184f3396b68e420c601e48d51b9027a8ec8 /flake.nix
parentf91cb79249520f21b3ab5bc254607e00760179f9 (diff)
tree-wide: better support legacy nix
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix26
1 files changed, 6 insertions, 20 deletions
diff --git a/flake.nix b/flake.nix
index 9cd5074..a66c833 100644
--- a/flake.nix
+++ b/flake.nix
@@ -31,8 +31,6 @@
system,
...
}: let
- overlay = lib.fix (final: self.overlays.default final pkgs);
-
/*
this filters out packages that may be broken or not supported
on the current system. packages that have no `broken` or `platforms`
@@ -41,30 +39,18 @@
isValid = _: v:
lib.elem pkgs.system (v.meta.platforms or [pkgs.system]) && !(v.meta.broken or false);
- pkgs' = lib.filterAttrs isValid overlay;
+ pkgs' = lib.filterAttrs isValid (import ./. {
+ nixpkgs = pkgs;
+ inherit system;
+ });
in
pkgs' // {default = pkgs'.treefetch;}
);
formatter = forAllSystems (pkgs: pkgs.alejandra);
- overlays.default = final: prev: (import ./pkgs final prev);
-
- templates = let
- # string -> string -> {}
- toTemplate = name: description: {
- path = builtins.path {
- path = ./templates/${name};
- name = "${name}-template";
- };
+ overlays.default = final: prev: import ./overlay.nix final prev;
- inherit description;
- };
- in
- builtins.mapAttrs toTemplate {
- basic = "minimal boilerplate for my flakes";
- full = "big template for complex flakes (using flake-parts)";
- nixos = "minimal boilerplate for flake-based nixos configuration";
- };
+ templates = import ./templates;
};
}