diff --git a/default.nix b/default.nix index 6831937..a6c99f0 100644 --- a/default.nix +++ b/default.nix @@ -1,9 +1,9 @@ -{ pkgs ? import { } }: -let manifest = (pkgs.lib.importTOML ./Cargo.toml).package; +{pkgs ? import {}}: let + manifest = (pkgs.lib.importTOML ./Cargo.toml).package; in -pkgs.rustPlatform.buildRustPackage rec { - pname = manifest.name; - version = manifest.version; - cargoLock.lockFile = ./Cargo.lock; - src = pkgs.lib.cleanSource ./.; -} \ No newline at end of file + pkgs.rustPlatform.buildRustPackage rec { + pname = manifest.name; + version = manifest.version; + cargoLock.lockFile = ./Cargo.lock; + src = pkgs.lib.cleanSource ./.; + } diff --git a/flake.nix b/flake.nix index 6456e56..fb0d9a1 100644 --- a/flake.nix +++ b/flake.nix @@ -4,20 +4,23 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; systems.url = "github:nix-systems/default-linux"; }; - outputs = { self, nixpkgs, systems }: - let - forAllSystems = nixpkgs.lib.genAttrs (import systems); - pkgsFor = nixpkgs.legacyPackages; - in { - packages = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./. { }; - }); - devShells = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./shell.nix { }; - }); - nixosModules = { - matugen = import ./module.nix self; - default = self.nixosModules.matugen; - }; + outputs = { + self, + nixpkgs, + systems, + }: let + forAllSystems = nixpkgs.lib.genAttrs (import systems); + pkgsFor = nixpkgs.legacyPackages; + in { + packages = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./. {}; + }); + devShells = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./shell.nix {}; + }); + nixosModules = { + matugen = import ./module.nix self; + default = self.nixosModules.matugen; }; + }; } diff --git a/shell.nix b/shell.nix index ae7efa1..9827ff0 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,11 @@ -{ pkgs ? import { } }: +{pkgs ? import {}}: pkgs.mkShell { # Get dependencies from the main package - inputsFrom = [ (pkgs.callPackage ./default.nix { }) ]; + inputsFrom = [(pkgs.callPackage ./default.nix {})]; # Additional tooling buildInputs = with pkgs; [ rust-analyzer # LSP Server - rustfmt # Formatter - clippy # Linter + rustfmt # Formatter + clippy # Linter ]; -} \ No newline at end of file +}