From f00ee62bdf66f482c803b2679bbd04dad1bfd1a3 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 28 Sep 2024 05:22:56 -0700 Subject: chore(nix): adjust flake --- flake.nix | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 6cb146d..b2a66a7 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,57 @@ { description = "Moe-Counter Compatible Website Hit Counter"; + inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; nix-gleam.url = "github:arnarg/nix-gleam"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + gitignore = { url = "github:hercules-ci/gitignore.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, flake-utils, nix-gleam, gitignore, ... }: - flake-utils.lib.eachDefaultSystem (system: + + outputs = + { + flake-utils, + gitignore, + nix-gleam, + nixpkgs, + self, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + inherit (gitignore.lib) gitignoreSource; + pkgs = import nixpkgs { inherit system; + overlays = [ nix-gleam.overlays.default ]; }; - inherit (gitignore.lib) gitignoreSource; in { - packages.default = pkgs.buildGleamApplication { - src = gitignoreSource ./.; - rebar3Package = pkgs.rebar3WithPlugins { - plugins = with pkgs.beamPackages; [ pc ]; + packages = { + default = pkgs.buildGleamApplication { + src = gitignoreSource ./.; + + rebar3Package = pkgs.rebar3WithPlugins { + plugins = with pkgs.beamPackages; [ pc ]; + }; }; + + mayu = self.packages.${system}.default; }; - devShell = pkgs.mkShell { - buildInputs = [ pkgs.gleam pkgs.rebar3 ]; + + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + gleam + rebar3 + ]; }; } ); -- cgit v1.2.3