{ nixConfig = { experimental-features = "nix-command flakes"; substitute = "true"; extra-substituters = [ "https://cache.nixos.org" "https://crane.cachix.org" "https://isabelroses.cachix.org" "https://nix-community.cachix.org" "https://nixpkgs-wayland.cachix.org" "https://viperml.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "crane.cachix.org-1:8Scfpmn9w+hGdXH/Q9tTLiYAE/2dnJYRJP7kl80GuRk=" "isabelroses.cachix.org-1:mXdV/CMcPDaiTmkQ7/4+MzChpOe6Cb97njKmBQQmLPM=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8=" ]; cores = 0; max-jobs = 2; netrc-file = "/home/thehedgehog/.netrc"; }; description = "PyroNet machines and services"; inputs = { snowfall-lib = { url = "github:snowfallorg/lib"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-compat.follows = "flake-compat"; }; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; stable.url = "github:nixos/nixpkgs/nixos-24.05"; # Overrides flake-compat.url = "github:edolstra/flake-compat"; systems.url = "github:nix-systems/default"; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs-lib"; }; flake-utils = { url = "github:numtide/flake-utils"; inputs.systems.follows = "systems"; }; nixpkgs-lib.url = "github:nix-community/nixpkgs.lib"; # Inputs agenix = { url = "github:ryantm/agenix"; inputs = { nixpkgs.follows = "nixpkgs"; systems.follows = "systems"; home-manager.follows = "home-manager"; }; }; buildbot-nix = { url = "github:Mic92/buildbot-nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-parts.follows = "flake-parts"; }; ctp = { url = "github:catppuccin/nix"; }; deploy-rs = { url = "github:serokell/deploy-rs"; inputs = { nixpkgs.follows = "nixpkgs"; utils.follows = "flake-utils"; flake-compat.follows = "flake-compat"; }; }; dns = { url = "github:nix-community/dns.nix"; inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; }; golink = { url = "github:tailscale/golink"; inputs.systems.follows = "systems"; inputs.nixpkgs.follows = "nixpkgs"; }; hardware = { url = "github:nixos/nixos-hardware"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; iceshrimp = { url = "git+https://iceshrimp.dev/pyrox/packaging"; inputs.nixpkgs.follows = "nixpkgs"; }; mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; inputs = { flake-compat.follows = "flake-compat"; nixpkgs.follows = "nixpkgs"; }; }; nix-search = { url = "github:diamondburned/nix-search"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; inputs.flake-compat.follows = "flake-compat"; }; nix-index = { url = "github:nix-community/nix-index"; inputs.flake-compat.follows = "flake-compat"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; my-pkgs = { url = "git+https://git.pyrox.dev/pyrox/pkgs"; inputs.nixpkgs.follows = "nixpkgs"; }; topology = { url = "github:oddlama/nix-topology"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; }; outputs = inputs@{ self, ... }: let lib = inputs.snowfall-lib.mkLib { inherit inputs; src = ./.; snowfall = { meta = { name = "pyronet"; title = "PyroNet Config"; }; namespace = "py"; }; }; overlays = [ self.overlays.pyronet-packages self.overlays.nix-index self.overlays.sway-unwrapped self.overlays.poptracker inputs.golink.overlays.default inputs.topology.overlays.default ]; in lib.mkFlake { # Nixpkgs configuration channels-config = { allowUnfree = true; }; # Overlays for Nixpkgs. inherit overlays; # Home-manager configurations homes = { # Default modules for all homes modules = with inputs; [ nix-index-database.hmModules.nix-index ctp.homeModules.catppuccin ]; }; # NixOS Configurations systems = { # Modules for all systems modules.nixos = with inputs; [ agenix.nixosModules.default buildbot-nix.nixosModules.buildbot-worker ctp.nixosModules.catppuccin topology.nixosModules.default ]; hosts = { # Zaphod, my personal Framework 16 laptop zaphod.modules = with inputs; [ hardware.nixosModules.framework-16-7040-amd ]; # Prefect, my main VPS prefect.modules = with inputs; [ mailserver.nixosModule ]; # Marvin, my main homelab machine marvin.modules = with inputs; [ buildbot-nix.nixosModules.buildbot-master golink.nixosModules.default iceshrimp.nixosModules.default ]; }; }; templates = { uv.description = "Python template flake that uses uv"; }; outputs-builder = channels: { # Define default packages to use everywhere packages = { nvim = channels.nixpkgs.neovim-unwrapped; }; formatter = channels.nixpkgs.nixfmt-rfc-style; }; deploy = lib.mkDeploy { inherit (inputs) self; }; topology = import inputs.topology { pkgs = import inputs.nixpkgs { inherit overlays; system = "x86_64-linux"; }; modules = [ ./topology.nix { nixosConfigurations = self.nixosConfigurations; } ]; }; }; }