2022-04-10 20:57:52 +02:00
|
|
|
{
|
|
|
|
description = "NixOS configuration of our builders";
|
|
|
|
|
2022-04-18 07:42:44 +02:00
|
|
|
nixConfig.extra-substituters = [
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
"https://nixpkgs-update.cachix.org"
|
|
|
|
];
|
|
|
|
nixConfig.extra-trusted-public-keys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
"nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8="
|
|
|
|
];
|
|
|
|
|
2022-04-10 20:57:52 +02:00
|
|
|
inputs = {
|
2022-12-12 07:18:12 +10:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
2022-04-10 20:57:52 +02:00
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
2022-09-25 07:27:35 +10:00
|
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
2022-12-19 15:59:28 +01:00
|
|
|
srvos.url = "github:numtide/srvos";
|
|
|
|
# actually not used when using the modules but than nothing ever will try to fetch this nixpkgs variant
|
|
|
|
srvos.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2022-12-12 07:18:12 +10:00
|
|
|
nixpkgs-update.url = "github:ryantm/nixpkgs-update";
|
|
|
|
nixpkgs-update-github-releases.url = "github:ryantm/nixpkgs-update-github-releases";
|
|
|
|
nixpkgs-update-github-releases.flake = false;
|
|
|
|
nixpkgs-update-pypi-releases.url = "github:ryantm/nixpkgs-update-pypi-releases";
|
|
|
|
nixpkgs-update-pypi-releases.flake = false;
|
2022-12-12 07:41:32 +10:00
|
|
|
|
|
|
|
nur-update.url = "github:nix-community/nur-update";
|
|
|
|
nur-update.inputs.nixpkgs.follows = "nixpkgs";
|
2022-04-10 20:57:52 +02:00
|
|
|
};
|
|
|
|
|
2022-12-19 15:03:55 +01:00
|
|
|
outputs = inputs @ {flake-parts, ...}:
|
2022-09-07 17:47:16 +02:00
|
|
|
flake-parts.lib.mkFlake
|
2022-12-19 15:03:55 +01:00
|
|
|
{inherit inputs;}
|
2022-08-29 14:11:38 +02:00
|
|
|
{
|
2022-10-09 07:28:39 +10:00
|
|
|
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
2022-04-10 20:57:52 +02:00
|
|
|
|
2022-08-29 14:11:38 +02:00
|
|
|
perSystem = {
|
|
|
|
inputs',
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
devShells.default = pkgs.callPackage ./shell.nix {
|
|
|
|
inherit (inputs'.sops-nix.packages) sops-import-keys-hook;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
flake.nixosConfigurations = let
|
2022-12-19 15:03:55 +01:00
|
|
|
inherit (inputs.nixpkgs.lib) nixosSystem;
|
2022-08-29 14:11:38 +02:00
|
|
|
common = [
|
2022-12-19 21:49:24 +01:00
|
|
|
{ _module.args.inputs = inputs; }
|
2022-12-19 15:03:55 +01:00
|
|
|
inputs.sops-nix.nixosModules.sops
|
2022-12-23 09:22:18 +01:00
|
|
|
inputs.srvos.nixosModules.server
|
2022-12-19 21:49:24 +01:00
|
|
|
|
|
|
|
inputs.srvos.nixosModules.telegraf
|
|
|
|
{ networking.firewall.allowedTCPPorts = [ 9273 ]; }
|
2022-08-29 14:11:38 +02:00
|
|
|
];
|
|
|
|
in {
|
|
|
|
"build01.nix-community.org" = nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules =
|
|
|
|
common
|
|
|
|
++ [
|
|
|
|
./build01/configuration.nix
|
|
|
|
];
|
|
|
|
};
|
2022-04-10 20:57:52 +02:00
|
|
|
|
2022-08-29 14:11:38 +02:00
|
|
|
"build02.nix-community.org" = nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules =
|
|
|
|
common
|
|
|
|
++ [
|
|
|
|
(import ./build02/nixpkgs-update.nix {
|
|
|
|
inherit
|
2022-12-19 15:03:55 +01:00
|
|
|
(inputs)
|
2022-08-29 14:11:38 +02:00
|
|
|
nixpkgs-update
|
|
|
|
nixpkgs-update-github-releases
|
|
|
|
nixpkgs-update-pypi-releases
|
|
|
|
;
|
|
|
|
})
|
|
|
|
./build02/configuration.nix
|
|
|
|
];
|
|
|
|
};
|
2022-04-10 22:08:57 +02:00
|
|
|
|
2022-08-29 14:11:38 +02:00
|
|
|
"build03.nix-community.org" = nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules =
|
|
|
|
common
|
|
|
|
++ [
|
2022-12-12 07:41:32 +10:00
|
|
|
(import ./services/nur-update {
|
|
|
|
inherit (inputs) nur-update;
|
|
|
|
})
|
2022-08-29 14:11:38 +02:00
|
|
|
./build03/configuration.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"build04.nix-community.org" = nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
modules =
|
|
|
|
common
|
|
|
|
++ [
|
|
|
|
./build04/configuration.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-09-07 17:47:16 +02:00
|
|
|
};
|
2022-04-10 20:57:52 +02:00
|
|
|
}
|