{ description = "nekowinston's hm flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; darwin.url = "github:lnl7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nur.url = "github:nix-community/nur"; caarlos0-nur.url = "github:caarlos0/nur"; nekowinston-nur.url = "github:nekowinston/nur"; nix-vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; inputs.flake-compat.follows = ""; inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database.url = "github:Mic92/nix-index-database"; sops.inputs.nixpkgs-stable.follows = "nixpkgs"; sops.inputs.nixpkgs.follows = "nixpkgs"; sops.url = "github:Mic92/sops-nix/1c673ba1053ad3e421fe043702237497bda0c621"; swayfx.inputs.flake-compat.follows = ""; swayfx.inputs.nixpkgs.follows = "nixpkgs"; swayfx.url = "github:willpower3309/swayfx"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-utils.url = "github:numtide/flake-utils"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.inputs.flake-compat.follows = ""; }; outputs = {flake-parts, ...} @ inputs: let inherit (import ./machines/lib.nix {inherit inputs;}) mkSystems overlays; in flake-parts.lib.mkFlake {inherit inputs;} { flake = mkSystems [ { host = "sashimi"; system = "aarch64-darwin"; username = "winston"; } { host = "futomaki"; system = "x86_64-linux"; username = "winston"; } { host = "bento"; system = "x86_64-linux"; username = "w"; } ]; imports = [inputs.pre-commit-hooks.flakeModule]; perSystem = { config, self', inputs', pkgs, system, ... }: { _module.args.pkgs = import inputs.nixpkgs { inherit overlays system; config.allowUnfree = true; }; pre-commit = { check.enable = true; settings.hooks = { alejandra.enable = true; commitizen.enable = true; editorconfig-checker.enable = true; luacheck.enable = true; nil.enable = true; shellcheck.enable = true; stylua.enable = true; }; }; devShells.default = config.pre-commit.devShell.overrideAttrs (old: { buildInputs = with pkgs; [gum just nix-output-monitor nvd]; }); legacyPackages.homeConfigurations = let homeLib = import ./home/lib.nix { inherit inputs pkgs username; isNixOS = false; }; username = "winston"; in { ${username} = inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; inherit (homeLib) extraSpecialArgs modules; }; }; formatter = pkgs.alejandra; }; systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"]; }; nixConfig = { extra-substituters = [ "https://cache.garnix.io" "https://mic92.cachix.org" "https://nekowinston.cachix.org" "https://nix-community.cachix.org" "https://pre-commit-hooks.cachix.org" ]; extra-trusted-public-keys = [ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" "mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ=" "nekowinston.cachix.org-1:lucpmaO+JwtoZj16HCO1p1fOv68s/RL1gumpVzRHRDs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" ]; }; }