buffet
3d88d0296e
All checks were successful
/ check (pull_request) Successful in 2m27s
This reverts commit ee3f767815
.
Turns out pre-commit-hooks needs this.
124 lines
3 KiB
Nix
124 lines
3 KiB
Nix
{
|
|
nixConfig = {
|
|
commit-lockfile-summary = "build(flake): update inputs";
|
|
|
|
extra-substituters = [
|
|
"https://cache.lix.systems"
|
|
];
|
|
|
|
extra-trusted-public-keys = [
|
|
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
|
];
|
|
};
|
|
|
|
inputs = {
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs = {
|
|
home-manager.follows = "home-manager";
|
|
nixpkgs.follows = "nixpkgs";
|
|
systems.follows = "systems";
|
|
};
|
|
};
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
inputs.systems.follows = "systems";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
lix = {
|
|
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
|
|
flake = false;
|
|
};
|
|
|
|
lix-module = {
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
|
inputs = {
|
|
flake-utils.follows = "flake-utils";
|
|
lix.follows = "lix";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
nix-index-database = {
|
|
url = "github:Mic92/nix-index-database";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
pre-commit-hooks = {
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs-unstable";
|
|
nixpkgs-stable.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
systems = {
|
|
url = "github:nix-systems/default";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
flake-utils,
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
pre-commit-hooks,
|
|
...
|
|
} @ args: let
|
|
makeSystem = system: config:
|
|
nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = args;
|
|
modules = let
|
|
overlay-unstable = final: prev: {
|
|
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
|
};
|
|
in [
|
|
config
|
|
(_: {nixpkgs.overlays = [(import ./overlay args) overlay-unstable];})
|
|
];
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
ami = makeSystem "aarch64-linux" ./hosts/ami;
|
|
alice = makeSystem "x86_64-linux" ./hosts/alice;
|
|
};
|
|
}
|
|
// flake-utils.lib.eachDefaultSystem (system: {
|
|
checks = {
|
|
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
|
src = ./.;
|
|
hooks = {
|
|
alejandra.enable = true;
|
|
statix = {
|
|
enable = true;
|
|
settings.ignore = ["/.direnv"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
devShell = nixpkgs.legacyPackages.${system}.mkShell {
|
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
|
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
|
|
};
|
|
});
|
|
}
|