init
This commit is contained in:
113
flake.nix
Normal file
113
flake.nix
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
description = "An empty flake template that you can adapt to your own environment";
|
||||
|
||||
# Flake inputs
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
colmena.url = "github:zhaofengli/colmena";
|
||||
|
||||
# commons
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
|
||||
# zimablade inputs
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# sin inputs
|
||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
testing-grounds.url = "gitlab:shobu13/testing-grounds";
|
||||
shoblog-front.url = "gitlab:shobu13/shoblog";
|
||||
striped-front.url = "git+ssh://git@gitlab.com/striped1/striped-front";
|
||||
striped-back.url = "git+ssh://git@gitlab.com/striped1/striped-back";
|
||||
ollama-intel = {
|
||||
url = "github:NikolasEnt/ollama-webui-intel";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
copyparty.url = "github:9001/copyparty";
|
||||
|
||||
};
|
||||
|
||||
# Flake outputs
|
||||
outputs = inputs@{
|
||||
self,
|
||||
|
||||
nixpkgs,
|
||||
unstable,
|
||||
colmena,
|
||||
|
||||
agenix,
|
||||
|
||||
disko,
|
||||
|
||||
shoblog-front,
|
||||
striped-front,
|
||||
striped-back,
|
||||
nix-minecraft,
|
||||
testing-grounds,
|
||||
copyparty,
|
||||
ollama-intel,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# The systems supported for this flake
|
||||
supportedSystems = [
|
||||
"x86_64-linux" # 64-bit Intel/AMD Linux
|
||||
];
|
||||
|
||||
# Helper to provide system-specific attributes
|
||||
forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import inputs.nixpkgs { inherit system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
colmenaHive = colmena.lib.makeHive {
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [];
|
||||
};
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
|
||||
sin = {
|
||||
imports = [
|
||||
./hosts/n100/configuration.nix
|
||||
./hosts/n100/hardware-configuration.nix
|
||||
];
|
||||
|
||||
deployment.targetHost = "n100.homelab.local";
|
||||
};
|
||||
|
||||
zimablade = {
|
||||
imports = [
|
||||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
./hosts/zimablade/configuration.nix
|
||||
./hosts/zimablade/hardware-configuration.nix
|
||||
];
|
||||
|
||||
deployment.targetHost = "zimablade.homelab.local";
|
||||
# deployment.targetPort = 22223;
|
||||
};
|
||||
};
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
# The Nix packages provided in the environment
|
||||
# Add any you need here
|
||||
packages = with pkgs; [ colmena.packages.${pkgs.system}.colmena ];
|
||||
|
||||
# Set any environment variables for your dev shell
|
||||
env = { };
|
||||
|
||||
# Add any shell logic you want executed any time the environment is activated
|
||||
shellHook = ''
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user