diff options
| author | seth <[email protected]> | 2023-05-17 02:54:40 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-17 02:54:40 -0400 |
| commit | 423914276f9623786e1d33e486b26a1406115067 (patch) | |
| tree | 0e4b9453d7d03343168ed0e1d3a6e380caf3e124 /templates/full/nix/packages/default.nix | |
| parent | e727e435f50027c30d3311020c64ead42c146d66 (diff) | |
templates: init basic & full
Diffstat (limited to 'templates/full/nix/packages/default.nix')
| -rw-r--r-- | templates/full/nix/packages/default.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/full/nix/packages/default.nix b/templates/full/nix/packages/default.nix new file mode 100644 index 0000000..78e10db --- /dev/null +++ b/templates/full/nix/packages/default.nix @@ -0,0 +1,23 @@ +{self, ...}: let + version = builtins.substring 0 8 self.lastModifiedDate; + + packageFn = pkgs: { + hello = pkgs.callPackage ./hello.nix {inherit version;}; + }; +in { + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + flake.overlays = final: _: packageFn final; + + perSystem = {pkgs, ...}: { + packages = let + p = packageFn pkgs; + in + p // {default = p.hello;}; + }; +} |
