Files
infra/flake.nix

80 lines
2.1 KiB
Nix
Raw Permalink Normal View History

{
description = "Personal Infrastructure stuff?";
inputs = {
2023-09-30 12:56:43 +02:00
nixpkgs.url = "nixpkgs/nixos-unstable";
impermanence.url = "github:nix-community/impermanence";
2023-09-30 12:56:43 +02:00
agenix.url = "github:ryantm/agenix";
};
2023-09-30 12:56:43 +02:00
outputs = {self, nixpkgs, impermanence, agenix}:
let
customPackagesModule = {...}: {
nixpkgs.overlays =
[
2023-09-17 14:52:43 +02:00
(super: self: { logo = super.callPackage ./lib/pkgs/logo { }; })
(super: self: { config-archive = super.callPackage ./lib/pkgs/config-archive.nix { }; })
2023-10-05 18:39:31 +02:00
(super: self: { zoekt = super.callPackage ./lib/pkgs/zoekt.nix { }; })
];
};
2023-09-20 18:23:04 +02:00
2023-09-30 12:56:43 +02:00
forAllSystems = fun:
2023-09-20 18:23:04 +02:00
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-darwin"
2023-09-30 12:56:43 +02:00
] (system: fun system);
in
{
nixosConfigurations = {
fugitive = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
customPackagesModule
impermanence.outputs.nixosModules.impermanence
2023-09-30 12:56:43 +02:00
agenix.nixosModules.default
./lib/systems/fugitive
];
};
2023-11-03 10:05:05 +01:00
outpost = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
agenix.nixosModules.default
./lib/systems/outpost
];
};
2024-10-22 18:57:41 +02:00
monument = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
{
system.image.version = "1";
}
./lib/modules/raspberry.nix
./lib/systems/monument
];
};
};
2023-09-20 18:23:04 +02:00
2023-10-05 18:39:31 +02:00
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in
{
zoekt = pkgs.callPackage ./lib/pkgs/zoekt.nix { };
}
);
2023-09-30 12:56:43 +02:00
devShells = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in
{
default = with pkgs; mkShell {
buildInputs = [ nixos-rebuild agenix.packages.${system}.default ];
};
});
};
2023-09-20 18:23:04 +02:00
}