nixfiles/flake.nix

167 lines
4.8 KiB
Nix
Raw Permalink 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-03-24 19:57:02 +01:00
flake-utils.url = "github:numtide/flake-utils";
2024-05-09 20:21:49 +02:00
attic = {
url = "github:zhaofengli/attic";
inputs.nixpkgs.follows = "nixpkgs";
};
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.flake-utils.follows = "flake-utils";
};
2024-11-17 20:00:46 +01:00
firefox = {
url = "git+https://woof.rip/mikael/firefox.git";
inputs.nixpkgs.follows = "nixpkgs";
};
florp-about = {
url = "git+https://woof.rip/florp/about.git";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-11-01 15:11:59 +01:00
florp-branding = {
url = "git+https://woof.rip/florp/branding.git";
inputs.nixpkgs.follows = "nixpkgs";
};
florp-moderation = {
url = "git+https://woof.rip/florp/moderation.git";
2024-11-09 20:20:55 +01:00
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-08-21 21:53:01 +02:00
hydra = {
2024-10-18 16:17:20 +02:00
url = "git+https://git.lix.systems/lix-project/hydra?ref=main&rev=799441dcf6d595efb0def686ca0815aef398627b";
2024-08-21 21:53:01 +02:00
inputs.lix.follows = "lix";
};
2024-04-03 15:35:54 +02:00
kyouma-www = {
2024-06-20 14:18:21 +02:00
url = "git+https://woof.rip/emily/kyouma-net.git";
2024-04-03 15:35:54 +02:00
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-08-21 21:53:01 +02:00
lix.url = "https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-05-12 19:54:39 +02:00
nixos-needsreboot = {
url = "github:thefossguy/nixos-needsreboot";
inputs.nixpkgs.follows = "nixpkgs";
};
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-05-11 16:02:39 +02:00
extra-substituters = [
"https://cache.kyouma.net"
];
extra-trusted-public-keys = [
"cache.kyouma.net:Frjwu4q1rnwE/MnSTmX9yx86GNA/z3p/oElGvucLiZg="
];
2024-04-03 10:38:55 +02:00
builders-use-substitutes = true;
};
2024-04-27 19:34:17 +02:00
outputs = { self, nixpkgs, flake-utils, ... }@inputs: let
shinyflakes = import ./lib/shinyflakes inputs;
in {
hosts = shinyflakes.mapHosts {
2024-04-29 15:22:48 +02:00
integra = { system = "aarch64-linux"; };
2024-04-27 19:34:17 +02:00
lain = { system = "aarch64-linux"; };
};
colmena = shinyflakes.mapColmenaCfg {
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-01-16 20:03:30 +01:00
specialArgs = { inherit inputs; };
};
2024-04-27 19:34:17 +02:00
};
2024-03-24 19:57:02 +01:00
2024-04-27 19:34:17 +02:00
nixosConfigurations = shinyflakes.mapNixosCfg {
ryuuko-minimal = nixpkgs.lib.nixosSystem {
2024-02-26 20:06:58 +01:00
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
2024-04-27 19:34:17 +02:00
./config/hosts/_minimal/configuration.nix
2024-02-26 20:06:58 +01:00
./config/hosts/ryuuko/disko.nix
];
};
2024-04-27 19:34:17 +02:00
lain-minimal = nixpkgs.lib.nixosSystem {
2024-03-27 23:39:09 +01:00
system = "aarch64-linux";
specialArgs = { inherit inputs; };
modules = [
./config/hosts/lain/iso.nix
2024-05-14 03:48:04 +02:00
({ ... }: {
nixpkgs.overlays = [ self.overlays.kyouma self.overlays.otherPkgs ];
})
2024-03-27 23:39:09 +01:00
];
};
2024-02-26 20:06:58 +01:00
};
2024-08-18 21:48:41 +02:00
images = {
lain = self.nixosConfigurations.lain-minimal.config.system.build.sdImage;
};
2024-04-27 19:34:17 +02:00
2024-04-22 14:14:30 +02:00
overlays = {
2024-05-11 16:27:31 +02:00
kyouma = import ./pkgs/overlay.nix;
2024-05-14 03:08:06 +02:00
otherPkgs = final: prev: {
nixos-needsreboot = (inputs.nixos-needsreboot.packages.${final.system}.default);
};
2024-04-22 14:14:30 +02:00
default = self.overlays.kyouma;
};
2024-05-06 20:41:11 +02:00
hydraJobs = {
inherit (self) packages images;
nixosConfigurations = shinyflakes.mapHydraHosts self.nixosConfigurations;
};
2024-05-10 14:35:05 +02:00
} // flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: let
2024-05-06 13:55:42 +02:00
pkgs = import nixpkgs {
inherit system;
2024-05-12 19:54:39 +02:00
overlays = [
self.overlays.kyouma
2024-05-14 03:08:06 +02:00
self.overlays.otherPkgs
2024-05-12 19:54:39 +02:00
];
2024-05-06 13:55:42 +02:00
};
2024-03-24 19:57:02 +01:00
in {
2024-05-06 13:55:42 +02:00
packages = shinyflakes.mapPackages (pkgs) {
2024-08-21 15:33:33 +02:00
# newHost = pkgs.writeShellApplication {
# name = "update-flyio";
# text = ''
# '';
2024-03-24 19:57:02 +01:00
# };
2024-05-06 13:55:42 +02:00
};
2024-08-21 15:33:33 +02:00
apps = {
update-build-worker = {
type = "app";
program = ./pkgs/build-worker-oci/update.sh;
};
};
2024-03-24 19:57:02 +01:00
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
}