nixfiles/flake.nix

82 lines
2.4 KiB
Nix
Raw Normal View History

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-01-11 12:43:58 +01:00
fernglas.url = "github:wobcom/fernglas";
2024-03-24 19:57:02 +01:00
flake-utils.url = "github:numtide/flake-utils";
kyouma-www.url = "git+https://git.bsd.gay/snaki/kyouma-net.git";
2024-02-14 21:40:07 +01:00
stylix.url = "github:danth/stylix";
2024-02-26 20:06:58 +01:00
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-02-05 22:22:40 +01:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-02-14 19:42:25 +01:00
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-12-06 10:21:07 +01:00
};
2024-04-03 10:38:55 +02:00
nixConfig = {
builders-use-substitutes = true;
builders = "ssh://nixremote@seras.kyouma.net x86_64-linux,aarch64-linux - 40 2 nixos-test,benchmark,big-parallel,kvm";
};
2024-03-24 19:57:02 +01:00
outputs = { self, nixpkgs, flake-utils, ... }@inputs: {
colmena = let
2024-04-03 10:38:55 +02:00
hosts = [ "web-dus" "crime" "ryuuko" "lain" "seras" ];
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-03 10:38:55 +02:00
machinesFile = ./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-03-24 19:57:02 +01:00
} // (builtins.listToAttrs (builtins.map (hosts: nixpkgs.lib.attrsets.nameValuePair hosts (hostCfg hosts)) hosts));
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-01-17 14:34:33 +01:00
packages = [ pkgs.colmena ];
};
2024-03-24 19:57:02 +01:00
});
2023-12-06 10:21:07 +01:00
}