{ outputs = { flake-parts, self, ... } @ inputs: let overlays = [ (final: prev: rec { atuin = unstable.atuin; unstable = import inputs.nixpkgs-unstable {inherit (prev) system;}; }) ]; in flake-parts.lib.mkFlake {inherit inputs;} { flake = { nixosConfigurations.main-node = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ { _module.args.nixinate.host = "main-node"; nixpkgs = { config.allowUnfree = true; inherit overlays; }; } ./hosts/main-node ./config ./modules inputs.agenix.nixosModules.default inputs.valheim-server.nixosModules.default ]; }; }; perSystem = { config, inputs', pkgs, system, ... }: { apps = (inputs.nixinate.nixinate.${system} self).nixinate; pre-commit = { check.enable = true; settings.hooks = { alejandra.enable = true; commitizen.enable = true; editorconfig-checker.enable = true; nil.enable = true; shellcheck.enable = true; }; }; devShells.default = config.pre-commit.devShell.overrideAttrs (old: { buildInputs = [ pkgs.alejandra pkgs.nil inputs'.agenix.packages.agenix ]; }); formatter = pkgs.alejandra; }; imports = [inputs.pre-commit-hooks.flakeModule]; systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; }; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; agenix = { url = "github:ryantm/agenix"; inputs.darwin.follows = ""; inputs.home-manager.follows = ""; inputs.nixpkgs.follows = "nixpkgs"; }; nixinate = { url = "github:matthewcroughan/nixinate"; inputs.nixpkgs.follows = "nixpkgs"; }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs-stable.follows = "nixpkgs"; }; valheim-server = { url = "github:nekowinston/valheim-server-flake"; 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=" ]; }; }