2024-01-12 20:59:08 +00:00
|
|
|
{
|
2024-05-19 10:58:12 +00:00
|
|
|
nixConfig = {
|
|
|
|
commit-lockfile-summary = "build(flake): update inputs";
|
|
|
|
};
|
|
|
|
|
2024-01-12 20:59:08 +00:00
|
|
|
inputs = {
|
2024-05-14 11:45:10 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2024-01-12 20:59:08 +00:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-01-19 14:36:08 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
2024-01-12 20:59:08 +00:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2024-05-14 11:45:10 +00:00
|
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
2024-01-12 20:59:08 +00:00
|
|
|
|
2024-01-22 15:38:49 +00:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs = {
|
|
|
|
home-manager.follows = "home-manager";
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-29 20:56:26 +00:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-01-12 20:59:08 +00:00
|
|
|
home-manager = {
|
2024-01-19 14:36:08 +00:00
|
|
|
url = "github:nix-community/home-manager/release-23.11";
|
2024-01-12 20:59:08 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-21 16:10:23 +00:00
|
|
|
|
|
|
|
nix-index-database = {
|
|
|
|
url = "github:Mic92/nix-index-database";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-25 15:54:05 +00:00
|
|
|
|
|
|
|
website = {
|
|
|
|
url = "github:buffet/website";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-01-12 20:59:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
2024-05-14 11:45:10 +00:00
|
|
|
self,
|
|
|
|
flake-utils,
|
2024-01-12 20:59:08 +00:00
|
|
|
nixpkgs,
|
2024-01-19 14:36:08 +00:00
|
|
|
nixpkgs-unstable,
|
2024-05-14 11:45:10 +00:00
|
|
|
pre-commit-hooks,
|
2024-01-12 20:59:08 +00:00
|
|
|
...
|
2024-01-25 15:54:05 +00:00
|
|
|
} @ 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];})
|
|
|
|
];
|
|
|
|
};
|
2024-05-14 11:45:10 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
});
|
2024-01-12 20:59:08 +00:00
|
|
|
}
|