{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
# Core
impermanence.url = "github:nix-community/impermanence";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs-stable.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Own flakes
nvim-flake = {
url = "git+https://git.src.quest/~liljamo/nvim-flake";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = inputs @ {self, ...}:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
./systems
];
systems = ["x86_64-linux"];
perSystem = {
pkgs,
system,
...
}: {
checks.pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
alejandra = {
enable = true;
};
};
};
devShells.default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs;
[
alejandra
sops
]
++ self.checks.${system}.pre-commit-check.enabledPackages;
};
};
};
}