You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixfiles/flake.nix

82 lines
2.4 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";
kyouma-www.url = "git+https://git.bsd.gay/snaki/kyouma-net.git";
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";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nixConfig = {
builders-use-substitutes = true;
builders = "ssh://nixremote@seras.kyouma.net x86_64-linux,aarch64-linux - 40 2 nixos-test,benchmark,big-parallel,kvm";
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs: {
colmena = let
hosts = [ "web-dus" "crime" "ryuuko" "lain" "seras" ];
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; };
};
} // (builtins.listToAttrs (builtins.map (hosts: nixpkgs.lib.attrsets.nameValuePair hosts (hostCfg hosts)) hosts));
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 ];
};
});
}