2023-12-06 10:21:07 +01:00
|
|
|
{
|
2024-01-09 15:46:18 +01:00
|
|
|
description = "emilys config hell";
|
2023-12-06 10:21:07 +01:00
|
|
|
inputs = {
|
2024-01-10 13:50:25 +01:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2023-12-06 10:21:07 +01:00
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
2024-03-24 19:57:02 +01:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2024-02-26 20:06:58 +01:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-04-04 20:30:42 +02:00
|
|
|
dns = {
|
|
|
|
url = "github:kirelagin/dns.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
fernglas = {
|
|
|
|
url = "github:wobcom/fernglas";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2024-02-05 22:22:40 +01:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-04-03 15:35:54 +02:00
|
|
|
kyouma-www = {
|
|
|
|
url = "git+https://git.bsd.gay/snaki/kyouma-net.git";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-04-04 20:30:42 +02:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
2024-04-03 15:35:54 +02:00
|
|
|
};
|
2024-02-14 19:42:25 +01:00
|
|
|
nixvim = {
|
|
|
|
url = "github:nix-community/nixvim";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-04-03 15:35:54 +02:00
|
|
|
inputs.home-manager.follows = "home-manager";
|
2024-02-14 19:42:25 +01:00
|
|
|
};
|
2024-04-04 20:30:42 +02:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
stylix = {
|
|
|
|
url = "github:danth/stylix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
2023-12-06 10:21:07 +01:00
|
|
|
};
|
|
|
|
|
2024-04-05 16:25:59 +02:00
|
|
|
nixConfig = {
|
2024-04-03 10:38:55 +02:00
|
|
|
builders-use-substitutes = true;
|
2024-04-05 16:25:59 +02:00
|
|
|
builders = "ssh://build@seras.kyouma.net x86_64-linux,aarch64-linux - 40 5 nixos-test,benchmark,big-parallel,kvm";
|
2024-04-03 10:38:55 +02:00
|
|
|
};
|
|
|
|
|
2024-03-24 19:57:02 +01:00
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }@inputs: {
|
|
|
|
colmena = let
|
2024-04-03 15:35:54 +02:00
|
|
|
hosts = builtins.attrNames (nixpkgs.lib.filterAttrs (name: type: type == "directory") (builtins.readDir ./config/hosts));
|
2024-03-24 19:57:02 +01:00
|
|
|
hostCfg = hostname: {
|
|
|
|
imports = [ (./config/hosts/${hostname}/configuration.nix) ];
|
|
|
|
};
|
|
|
|
in {
|
2024-01-16 20:03:30 +01:00
|
|
|
meta = {
|
|
|
|
allowApplyAll = false;
|
2024-04-04 20:30:42 +02:00
|
|
|
machinesFile = ./config/files/builders;
|
2024-01-17 14:34:33 +01:00
|
|
|
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
|
2024-03-27 23:39:09 +01:00
|
|
|
nodeNixpkgs = {
|
|
|
|
lain = nixpkgs.legacyPackages.aarch64-linux;
|
|
|
|
};
|
2024-01-16 20:03:30 +01:00
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
};
|
2024-04-03 15:35:54 +02:00
|
|
|
} // nixpkgs.lib.attrsets.genAttrs hosts (hostCfg);
|
2024-03-24 19:57:02 +01:00
|
|
|
|
2024-02-26 20:20:03 +01:00
|
|
|
nixosConfigurations = {
|
2024-02-26 20:06:58 +01:00
|
|
|
ryuuko = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
modules = [
|
2024-02-26 20:20:03 +01:00
|
|
|
./config/hosts/base/configuration.nix
|
2024-02-26 20:06:58 +01:00
|
|
|
./config/hosts/ryuuko/disko.nix
|
|
|
|
];
|
|
|
|
};
|
2024-03-27 23:39:09 +01:00
|
|
|
lain = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
modules = [
|
|
|
|
./config/hosts/lain/iso.nix
|
|
|
|
];
|
|
|
|
};
|
2024-02-26 20:06:58 +01:00
|
|
|
};
|
2024-03-27 23:39:09 +01:00
|
|
|
images.lain = self.nixosConfigurations.lain.config.system.build.sdImage;
|
2024-03-24 19:57:02 +01:00
|
|
|
} // 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 {
|
2024-04-04 20:30:42 +02:00
|
|
|
packages = [ pkgs.colmena pkgs.sops ];
|
2024-01-17 14:34:33 +01:00
|
|
|
};
|
2024-03-24 19:57:02 +01:00
|
|
|
});
|
2023-12-06 10:21:07 +01:00
|
|
|
}
|