2023-05-06 06:49:46 +02:00
|
|
|
{
|
2023-10-18 20:31:26 +02:00
|
|
|
outputs = {
|
|
|
|
flake-parts,
|
|
|
|
self,
|
|
|
|
...
|
|
|
|
} @ inputs: let
|
|
|
|
overlays = [
|
2024-09-13 02:28:10 +02:00
|
|
|
(final: _: rec {
|
2023-10-18 20:31:26 +02:00
|
|
|
atuin = unstable.atuin;
|
2024-09-13 02:28:10 +02:00
|
|
|
prometheus-fail2ban-exporter = final.callPackage ./pkgs/prometheus-fail2ban-exporter {};
|
|
|
|
unstable = inputs.nixpkgs-unstable.legacyPackages.${final.system};
|
2023-10-18 20:31:26 +02:00
|
|
|
})
|
|
|
|
];
|
2023-07-03 05:37:43 +02:00
|
|
|
in
|
|
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
|
|
flake = {
|
|
|
|
nixosConfigurations.main-node = inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
{
|
2024-01-27 15:57:09 +01:00
|
|
|
_module.args.nixinate.host = "main-node";
|
2023-07-03 21:25:18 +02:00
|
|
|
nixpkgs = {
|
|
|
|
config.allowUnfree = true;
|
2023-10-18 20:31:26 +02:00
|
|
|
inherit overlays;
|
2023-07-03 21:25:18 +02:00
|
|
|
};
|
2023-07-03 05:37:43 +02:00
|
|
|
}
|
|
|
|
./hosts/main-node
|
|
|
|
./config
|
2023-07-06 16:58:43 +02:00
|
|
|
./modules
|
2023-07-03 05:37:43 +02:00
|
|
|
inputs.agenix.nixosModules.default
|
2024-08-23 20:35:59 +02:00
|
|
|
inputs.attic.nixosModules.atticd
|
2024-03-08 12:47:39 +01:00
|
|
|
inputs.home-manager.nixosModules.home-manager
|
2023-07-03 05:37:43 +02:00
|
|
|
inputs.valheim-server.nixosModules.default
|
2024-09-11 08:52:28 +02:00
|
|
|
inputs.satisfactory-server.nixosModules.default
|
2023-07-03 05:37:43 +02:00
|
|
|
];
|
2024-03-07 15:34:49 +01:00
|
|
|
specialArgs = {inherit inputs;};
|
2023-07-03 05:37:43 +02:00
|
|
|
};
|
|
|
|
};
|
2023-05-06 06:49:46 +02:00
|
|
|
|
2023-07-03 05:37:43 +02:00
|
|
|
perSystem = {
|
2023-11-27 08:00:57 +01:00
|
|
|
config,
|
2023-10-18 20:31:26 +02:00
|
|
|
inputs',
|
2023-07-03 05:37:43 +02:00
|
|
|
pkgs,
|
2024-03-03 00:24:08 +01:00
|
|
|
self',
|
2023-07-03 05:37:43 +02:00
|
|
|
system,
|
|
|
|
...
|
|
|
|
}: {
|
2024-03-03 00:24:08 +01:00
|
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
|
|
inherit overlays system;
|
|
|
|
};
|
|
|
|
|
2023-10-18 20:31:26 +02:00
|
|
|
apps = (inputs.nixinate.nixinate.${system} self).nixinate;
|
2023-07-03 05:37:43 +02:00
|
|
|
|
2023-11-27 08:00:57 +01:00
|
|
|
pre-commit = {
|
|
|
|
check.enable = true;
|
2024-05-16 23:31:40 +02:00
|
|
|
settings.excludes = ["_sources/"];
|
2023-11-27 08:00:57 +01:00
|
|
|
settings.hooks = {
|
2023-07-03 05:37:43 +02:00
|
|
|
alejandra.enable = true;
|
2023-11-27 08:00:57 +01:00
|
|
|
commitizen.enable = true;
|
2024-03-07 15:37:29 +01:00
|
|
|
deadnix.enable = true;
|
2023-11-27 08:00:57 +01:00
|
|
|
editorconfig-checker.enable = true;
|
2023-07-03 05:37:43 +02:00
|
|
|
nil.enable = true;
|
2023-11-27 08:00:57 +01:00
|
|
|
shellcheck.enable = true;
|
2023-05-06 06:49:46 +02:00
|
|
|
};
|
2023-07-03 05:37:43 +02:00
|
|
|
};
|
2023-05-06 06:49:46 +02:00
|
|
|
|
2024-03-07 15:37:29 +01:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
inherit (config.pre-commit.devShell) shellHook;
|
2024-03-09 01:05:51 +01:00
|
|
|
buildInputs = [
|
|
|
|
inputs'.agenix.packages.agenix
|
2024-09-13 18:01:30 +02:00
|
|
|
pkgs.age-plugin-yubikey
|
2024-03-09 01:05:51 +01:00
|
|
|
pkgs.unstable.nh
|
|
|
|
pkgs.unstable.nil
|
|
|
|
self'.formatter
|
|
|
|
];
|
2024-03-07 15:37:29 +01:00
|
|
|
};
|
2023-05-06 06:49:46 +02:00
|
|
|
|
2023-07-03 05:37:43 +02:00
|
|
|
formatter = pkgs.alejandra;
|
2023-05-06 06:49:46 +02:00
|
|
|
};
|
2023-07-03 05:37:43 +02:00
|
|
|
|
2023-11-27 08:00:57 +01:00
|
|
|
imports = [inputs.pre-commit-hooks.flakeModule];
|
2023-07-03 05:37:43 +02:00
|
|
|
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
|
|
|
};
|
2023-11-27 08:00:57 +01:00
|
|
|
|
|
|
|
inputs = {
|
2024-08-13 07:21:27 +02:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
2023-11-27 08:00:57 +01:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-03-08 12:47:39 +01:00
|
|
|
home-manager = {
|
2024-08-13 07:21:27 +02:00
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
2024-03-08 12:47:39 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-03-07 22:16:02 +01:00
|
|
|
|
|
|
|
flake-parts = {
|
|
|
|
url = "github:hercules-ci/flake-parts";
|
|
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
|
2023-11-27 08:00:57 +01:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs.darwin.follows = "";
|
|
|
|
inputs.home-manager.follows = "";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-08-23 20:35:59 +02:00
|
|
|
attic = {
|
|
|
|
url = "github:zhaofengli/attic";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
|
|
inputs.flake-compat.follows = "";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2023-11-27 08:00:57 +01:00
|
|
|
nixinate = {
|
|
|
|
url = "github:matthewcroughan/nixinate";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
pre-commit-hooks = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
2024-03-07 22:16:02 +01:00
|
|
|
inputs.flake-compat.follows = "";
|
2023-11-27 08:00:57 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
valheim-server = {
|
2024-03-07 22:16:02 +01:00
|
|
|
url = "github:aidalgol/valheim-server-flake";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-09-11 08:52:28 +02:00
|
|
|
satisfactory-server = {
|
|
|
|
# url = "github:nekowinston/satisfactory-server-flake";
|
|
|
|
url = "path:/home/winston/satisfactory-flake";
|
2023-11-27 08:00:57 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixConfig = {
|
|
|
|
substituters = [
|
|
|
|
"https://cache.nixos.org"
|
|
|
|
"https://cache.garnix.io"
|
|
|
|
"https://pre-commit-hooks.cachix.org"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
|
|
|
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
|
|
|
|
];
|
|
|
|
};
|
2023-05-06 06:49:46 +02:00
|
|
|
}
|