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-05-21 16:41:45 +00:00
|
|
|
|
|
|
|
extra-substituters = [
|
|
|
|
"https://cache.lix.systems"
|
|
|
|
];
|
|
|
|
|
|
|
|
extra-trusted-public-keys = [
|
|
|
|
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
|
|
|
];
|
2024-05-19 10:58:12 +00:00
|
|
|
};
|
|
|
|
|
2024-01-12 20:59:08 +00:00
|
|
|
inputs = {
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-06-17 08:47:59 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
2024-01-12 20:59:08 +00:00
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
|
2024-01-22 15:38:49 +00:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs = {
|
|
|
|
home-manager.follows = "home-manager";
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
2024-05-21 18:36:49 +00:00
|
|
|
systems.follows = "systems";
|
2024-01-22 15:38:49 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-29 20:56:26 +00:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-05-21 18:36:49 +00:00
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
|
|
|
|
2024-01-12 20:59:08 +00:00
|
|
|
home-manager = {
|
2024-06-17 08:47:59 +00:00
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
2024-01-12 20:59:08 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-21 16:10:23 +00:00
|
|
|
|
2024-05-21 17:27:35 +00:00
|
|
|
lix-module = {
|
2024-06-26 10:37:32 +00:00
|
|
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
2024-05-21 18:36:49 +00:00
|
|
|
inputs = {
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-05-21 17:27:35 +00:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2024-05-21 18:36:49 +00:00
|
|
|
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;
|
|
|
|
};
|
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"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-06-09 15:03:48 +00:00
|
|
|
|
2024-06-26 10:40:00 +00:00
|
|
|
devShells.default = nixpkgs.legacyPackages.${system}.mkShell {
|
2024-06-09 15:03:48 +00:00
|
|
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
|
|
|
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
|
|
|
|
};
|
2024-05-14 11:45:10 +00:00
|
|
|
});
|
2024-01-12 20:59:08 +00:00
|
|
|
}
|