rice/flake.nix
2024-05-20 12:06:16 +02:00

61 lines
1.4 KiB
Nix

{
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";
};
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
website = {
url = "github:buffet/website";
flake = false;
};
};
outputs = {
nixpkgs,
nixpkgs-unstable,
...
} @ 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;
};
};
}