Files
homelab/hosts/sin/flake.nix
Sin Ser'hao 56ffeaf5a0
Some checks failed
/ perform flake analysis (push) Successful in 37s
/ build hive configuration (push) Failing after 8m50s
format && add nix-serve for caching
2026-01-07 15:29:28 +01:00

74 lines
1.7 KiB
Nix

{
description = "An empty flake template that you can adapt to your own environment";
# Flake inputs
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.disko.url = "github:nix-community/disko";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
inputs = {
# projects
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
agenix.url = "github:ryantm/agenix";
};
# Flake outputs
outputs =
inputs@{
self,
nixpkgs,
disko,
unstable,
agenix,
...
}:
let
# The systems supported for this flake
supportedSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux
];
# Helper to provide system-specific attributes
forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f {
pkgs = import nixpkgs { inherit system; };
}
);
in
{
nixosConfigurations.zimablade = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
disko.nixosModules.disko
agenix.nixosModules.default
./configuration.nix
./hardware-configuration.nix
];
specialArgs = {
inherit inputs;
};
};
devShells = forEachSupportedSystem (
{ pkgs }:
{
default = pkgs.mkShell {
# The Nix packages provided in the environment
# Add any you need here
packages = with pkgs; [
pkgs.disko
nixos-anywhere
];
# Add any shell logic you want executed any time the environment is activated
shellHook = '''';
};
}
);
};
}