{
  description = "Nick's Big Fat Flakey Sausage";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
    lix = {
      url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
      flake = false;
    };
    lix-module = {
      url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.lix.follows = "lix";
    };
    flake-parts = {
      url = "github:hercules-ci/flake-parts";
      inputs.nixpkgs-lib.follows = "nixpkgs";
    };
    treefmt-nix = {
      url = "github:numtide/treefmt-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    systems.url = "github:nix-systems/x86_64-linux";
    impermanence.url = "github:nix-community/impermanence";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nur = {
      url = "github:nix-community/NUR";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    pre-commit-hooks-nix = {
      url = "github:cachix/pre-commit-hooks.nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    sops-nix = {
      url = "github:Mic92/sops-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    plasma-manager = {
      url = "github:nix-community/plasma-manager";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.home-manager.follows = "home-manager";
    };
    niri = {
      url = "github:sodiboo/niri-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    hyprland = {
      url = "github:hyprwm/Hyprland";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    hyprland-portal = {
      url = "github:hyprwm/xdg-desktop-portal-hyprland";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    waybar = {
      url = "github:Alexays/Waybar";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    wpaperd = {
      url = "github:danyspin97/wpaperd";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixcord = {
      url = "github:kaylorben/nixcord";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    tuios = {
      url = "github:Gaurav-Gosain/tuios";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    microvm = {
      url = "github:microvm-nix/microvm.nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    upRootNutrition = {
      url = "git+ssh://git@gitlab.com/uprootnutrition/website.git";
    };
    linkpage = {
      url = "git+ssh://git@gitlab.com/uprootnutrition/linkpage.git";
    };
    filesorter = {
      url = "git+ssh://git@gitlab.com/uprootnutrition/filesorter.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    zookeeper = {
      url = "git+ssh://git@gitlab.com/uprootnutrition/zookeeper.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs =
    inputs:
    inputs.flake-parts.lib.mkFlake { inherit inputs; } {
      imports = [
        inputs.pre-commit-hooks-nix.flakeModule
        inputs.treefmt-nix.flakeModule
        ./lib
        ./modules
        ./parts
      ];

      flake =
        { config, ... }:
        {
          nixosConfigurations = {
            mars = inputs.self.lib.mkLinuxSystem [
              ./systems/mars
              ./profiles/user0
              config.nixosModules.mars
              config.nixosModules.core
              config.nixosModules.mantle
              config.nixosModules.crust
              inputs.niri.nixosModules.niri
              inputs.home-manager.nixosModules.home-manager
              inputs.lix-module.nixosModules.default
              inputs.nur.modules.nixos.default
              inputs.microvm.nixosModules.host
              inputs.sops-nix.nixosModules.sops
            ];
            deimos = inputs.self.lib.mkLinuxSystem [
              ./systems/deimos
              ./profiles/user0
              config.nixosModules.deimos
              config.nixosModules.core
              config.nixosModules.mantle
              config.nixosModules.crust
              inputs.home-manager.nixosModules.home-manager
              inputs.lix-module.nixosModules.default
              inputs.nur.modules.nixos.default
              inputs.sops-nix.nixosModules.sops
            ];
            phobos = inputs.self.lib.mkLinuxSystem [
              ./systems/phobos
              ./profiles/user0
              config.nixosModules.phobos
              config.nixosModules.core
              config.nixosModules.mantle
              config.nixosModules.crust
              inputs.home-manager.nixosModules.home-manager
              inputs.lix-module.nixosModules.default
              inputs.nur.modules.nixos.default
              inputs.sops-nix.nixosModules.sops
            ];
            ceres = inputs.self.lib.mkLinuxSystem [
              ./systems/ceres
              ./profiles/user0
              config.nixosModules.ceres
              config.nixosModules.core
              config.nixosModules.mantle
              inputs.home-manager.nixosModules.home-manager
              inputs.impermanence.nixosModules.impermanence
              # inputs.lix-module.nixosModules.default
              inputs.microvm.nixosModules.host
              inputs.sops-nix.nixosModules.sops
            ];
            eris = inputs.self.lib.mkLinuxSystem [
              ./systems/eris
              ./profiles/user0
              config.nixosModules.eris
              config.nixosModules.core
              config.nixosModules.mantle
              inputs.home-manager.nixosModules.home-manager
              inputs.lix-module.nixosModules.default
              inputs.sops-nix.nixosModules.sops
            ];
            iso = inputs.self.lib.mkLinuxSystem [
              ./profiles/user0
              config.nixosModules.iso
              config.nixosModules.core
              inputs.home-manager.nixosModules.home-manager
              inputs.lix-module.nixosModules.default
            ];

          };
          templates = {
            haskell = {
              path = ./templates/haskell;
              description = "Haskell Environment";
            };
            typst = {
              path = ./templates/typst;
              description = "Typst Environment";
            };
            website = {
              path = ./templates/website;
              description = "Elm/Haskell Environment";
            };
          };
        };

      systems = import inputs.systems;
    };
}
