{ outputs = { flake-parts, self, ... } @ inputs: let overlays = [ (_: prev: rec { atuin = unstable.atuin; unstable = inputs.nixpkgs-unstable.legacyPackages.${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.home-manager.nixosModules.home-manager inputs.valheim-server.nixosModules.default inputs.vscode-server.nixosModules.default ]; specialArgs = {inherit inputs;}; }; }; perSystem = { config, inputs', pkgs, self', system, ... }: { _module.args.pkgs = import inputs.nixpkgs { inherit overlays system; }; apps = (inputs.nixinate.nixinate.${system} self).nixinate; pre-commit = { check.enable = true; settings.hooks = { alejandra.enable = true; commitizen.enable = true; deadnix.enable = true; editorconfig-checker.enable = true; nil.enable = true; shellcheck.enable = true; }; }; devShells.default = pkgs.mkShell { inherit (config.pre-commit.devShell) shellHook; buildInputs = with pkgs; [inputs'.agenix.packages.agenix self'.formatter nil]; }; 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"; home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; flake-utils.url = "github:numtide/flake-utils"; 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.flake-compat.follows = ""; inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs-stable.follows = "nixpkgs"; }; valheim-server = { url = "github:aidalgol/valheim-server-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; vscode-server = { url = "github:nix-community/nixos-vscode-server"; inputs.flake-utils.follows = "flake-utils"; 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=" ]; }; }