{ nixConfig = { experimental-features = "nix-command flakes"; substitute = "true"; extra-substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; cores = 0; max-jobs = 2; netrc-file = "/home/thehedgehog/.netrc"; }; description = "PyroNet machines and services"; inputs = { flake-parts = { url = "github:hercules-ci/flake-parts"; }; nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; # Overrides flake-compat.url = "github:edolstra/flake-compat"; flake-utils = { url = "github:numtide/flake-utils"; }; # Inputs agenix = { url = "github:ryantm/agenix"; inputs = { nixpkgs.follows = "nixpkgs"; darwin.follows = ""; home-manager.follows = "home-manager"; }; }; buildbot-nix = { url = "github:nix-community/buildbot-nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-parts.follows = "flake-parts"; inputs.hercules-ci-effects.follows = ""; inputs.treefmt-nix.follows = ""; }; ctp = { url = "github:catppuccin/nix"; inputs.nixpkgs.follows = "nixpkgs"; }; dn42 = { url = "github:pyrox0/dn43.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; easy-hosts.url = "github:tgirlcloud/easy-hosts"; glide = { url = "github:glide-browser/glide.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; golink = { url = "github:tailscale/golink"; inputs.nixpkgs.follows = "nixpkgs"; }; hardware = { url = "github:nixos/nixos-hardware"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; nvf = { url = "github:notashelf/nvf"; inputs.flake-compat.follows = "flake-compat"; inputs.flake-parts.follows = "flake-parts"; inputs.nixpkgs.follows = "nixpkgs"; inputs.ndg.follows = ""; }; my-pkgs = { url = "git+https://git.pyrox.dev/pyrox/pkgs"; inputs.nixpkgs.follows = "nixpkgs"; }; quickshell = { url = "github:quickshell-mirror/quickshell"; inputs.nixpkgs.follows = "nixpkgs"; }; tangled = { url = "git+https://tangled.org/tangled.org/core"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-compat.follows = "flake-compat"; # Disable useless monorepo inputs inputs.actor-typeahead-src.follows = ""; inputs.fenix.follows = ""; inputs.htmx-src.follows = ""; inputs.htmx-ws-src.follows = ""; inputs.ibm-plex-mono-src.follows = ""; inputs.inter-fonts-src.follows = ""; inputs.lucide-src.follows = ""; inputs.mermaid-src.follows = ""; }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { # Systems we want to build for systems = [ "x86_64-linux" ]; # Flake modules imports = [ inputs.easy-hosts.flakeModule inputs.home-manager.flakeModules.home-manager inputs.treefmt-nix.flakeModule ./packages.nix ./lib ./overlays ./devShells ./nixosModules ./homeModules ./templates ./hosts ./neovim ./data # Called fmodule instead of flake-module to clean up autosuggestions (import ./fmodule.nix) ]; # Per-system stuff perSystem = { system, ... }: { _module.args.pkgs = import inputs.nixpkgs { inherit system; overlays = [ inputs.self.overlays.openssh-fixperms inputs.agenix.overlays.default inputs.glide.overlays.default inputs.golink.overlays.default ]; config = { allowUnfree = true; }; }; treefmt = { programs = { deadnix = { enable = true; no-underscore = true; }; jsonfmt.enable = true; jsonfmt.excludes = [ ".zed/settings.json" ]; just.enable = true; keep-sorted.enable = true; mdformat.enable = true; mdformat.settings.wrap = 120; nixf-diagnose.enable = true; nixfmt.enable = true; nixfmt.indent = 2; nixfmt.width = 120; shellcheck.enable = true; statix.enable = true; stylua.enable = true; taplo.enable = true; yamlfmt.enable = true; }; }; }; # Enable debugging for nixd debug = true; }; }