dotfiles/flake.nix

63 lines
1.7 KiB
Nix
Raw Normal View History

2021-12-27 22:23:10 -05:00
{
description = "walkah's dotfiles";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2022-06-22 16:32:51 -04:00
flake-utils.url = "github:numtide/flake-utils";
2023-07-26 13:04:43 -04:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2021-12-27 22:23:10 -05:00
};
2023-07-26 13:04:43 -04:00
outputs = { self, nixpkgs, home-manager, flake-utils, pre-commit-hooks, ... }:
2022-06-22 16:32:51 -04:00
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]
(system:
let pkgs = nixpkgs.legacyPackages.${system};
in
{
homeConfigurations = {
walkah = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
2022-06-22 16:32:51 -04:00
};
};
2023-07-24 16:50:53 -04:00
2023-02-18 14:24:13 -05:00
packages.homeConfigurations = self.homeConfigurations.${system};
2022-06-22 16:32:51 -04:00
packages.default =
self.homeConfigurations.${system}.walkah.activationPackage;
2023-07-24 16:50:53 -04:00
2023-07-26 13:04:43 -04:00
checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
deadnix.enable = true;
nixpkgs-fmt.enable = true;
statix.enable = true;
};
};
};
2023-07-24 16:50:53 -04:00
devShells.default = pkgs.mkShell {
name = "dotfiles";
buildInputs = with pkgs; [
2023-07-26 13:04:43 -04:00
deadnix
2023-07-24 16:50:53 -04:00
nil
nixpkgs-fmt
2023-07-26 13:04:43 -04:00
statix
2023-07-24 16:50:53 -04:00
];
2023-07-26 13:04:43 -04:00
inherit (self.checks.${system}.pre-commit-check) shellHook;
2023-07-24 16:50:53 -04:00
};
2022-06-22 16:32:51 -04:00
});
2021-12-27 22:23:10 -05:00
}