Skip to content

Commit

Permalink
formatted with alejandra
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniD3v committed May 3, 2024
1 parent e795cda commit 7f24d8a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
16 changes: 8 additions & 8 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ pkgs ? import <nixpkgs> { } }:
let manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
{pkgs ? import <nixpkgs> {}}: 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 ./.;
}
pkgs.rustPlatform.buildRustPackage rec {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
}
33 changes: 18 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
}
10 changes: 5 additions & 5 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ pkgs ? import <nixpkgs> { } }:
{pkgs ? import <nixpkgs> {}}:
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
];
}
}

0 comments on commit 7f24d8a

Please sign in to comment.