forked from emily/nixfiles
85 lines
2.6 KiB
Nix
85 lines
2.6 KiB
Nix
{
|
|
description = "emilys config hell";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
fernglas.url = "github:wobcom/fernglas";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
stylix.url = "github:danth/stylix";
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
kyouma-www = {
|
|
url = "git+https://git.bsd.gay/snaki/kyouma-net.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
};
|
|
|
|
nixConfig = {
|
|
builders-use-substitutes = true;
|
|
builders = "ssh://nixremote@seras.kyouma.net x86_64-linux,aarch64-linux - 40 5 nixos-test,benchmark,big-parallel,kvm";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }@inputs: {
|
|
colmena = let
|
|
hosts = builtins.attrNames (nixpkgs.lib.filterAttrs (name: type: type == "directory") (builtins.readDir ./config/hosts));
|
|
hostCfg = hostname: {
|
|
imports = [ (./config/hosts/${hostname}/configuration.nix) ];
|
|
};
|
|
in {
|
|
meta = {
|
|
allowApplyAll = false;
|
|
machinesFile = ./builders;
|
|
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
nodeNixpkgs = {
|
|
lain = nixpkgs.legacyPackages.aarch64-linux;
|
|
};
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
} // nixpkgs.lib.attrsets.genAttrs hosts (hostCfg);
|
|
|
|
nixosConfigurations = {
|
|
ryuuko = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
./config/hosts/base/configuration.nix
|
|
./config/hosts/ryuuko/disko.nix
|
|
];
|
|
};
|
|
lain = nixpkgs.lib.nixosSystem {
|
|
system = "aarch64-linux";
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
./config/hosts/lain/iso.nix
|
|
];
|
|
};
|
|
};
|
|
images.lain = self.nixosConfigurations.lain.config.system.build.sdImage;
|
|
} // flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
# packages = rec {
|
|
# newhost = pkgs.stdenv.mkDerivation {
|
|
# name = "newhost";
|
|
# };
|
|
# };
|
|
# apps = rec {
|
|
# newhost = self.packages.${system}.newhost;
|
|
# default = newhost;
|
|
# };
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [ pkgs.colmena ];
|
|
};
|
|
});
|
|
}
|