{
  description = "a shared collection of dots by cydiralis and beanigen";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    catppuccin.url = "github:catppuccin/nix";
    nixpkgs-xr.url = "github:nix-community/nixpkgs-xr";
    nixvim.url = "github:nix-community/nixvim";
    niri.url = "github:sodiboo/niri-flake";
    nix-index-database.url = "github:nix-community/nix-index-database";
    nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
    system-manager.url = "github:numtide/system-manager";
    system-manager.inputs.nixpkgs.follows = "nixpkgs";
    nix-system-graphics.url = "github:soupglasses/nix-system-graphics";
    nix-system-graphics.inputs.nixpkgs.follows = "nixpkgs";
    jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
  };

  outputs = inputs@{ self, nixpkgs, home-manager, system-manager, niri, nixpkgs-xr, jovian, ...}:{
    nixosConfigurations."absolution" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
      modules = [
        ./base/absolution
        nixpkgs-xr.nixosModules.nixpkgs-xr
        home-manager.nixosModules.home-manager {
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              useSyncthing = false;
              class = "desktop";
              user = "alyx";
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.alyx = ./home;
        }
      ];
    };
    nixosConfigurations."adventurer" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./base/adventurer
        home-manager.nixosModules.home-manager {
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              class = "lowspec";
              user = "maya";
              useSyncthing = true;
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.maya = ./home;
        }
      ];
    };
    nixosConfigurations."anagonia" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
      modules = [
        ./base/anagonia
        home-manager.nixosModules.home-manager {
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = true;
              class = "lowspec";
              user = "alyx";
              useSyncthing = false;
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true; 
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.alyx = ./home;
        }
      ];
    };
    nixosConfigurations."apollo" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./base/apollo
        nixpkgs-xr.nixosModules.nixpkgs-xr
        home-manager.nixosModules.home-manager {
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
	      isBritish = false;
              class = "desktop";
              user = "maya";
              useSyncthing = true;
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.maya = ./home;
        }
      ];
    };
    nixosConfigurations."callisto" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./base/callisto
        home-manager.nixosModules.home-manager {
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              class = "desktop";
              user = "maya";
              useSyncthing = true;
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.maya = ./home;
        }
      ];
    };
    nixosConfigurations."hassie" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
      modules = [
        ./base/hassie
        home-manager.nixosModules.home-manager {
          #imports = [ inputs.nix-index-database.hmModules.nix-index ];
          home-manager.backupFileExtension = "hm-backup";
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              useSyncthing = false;
              class = "laptop";
              user = "alyx"; #cursed way of setting username
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.alyx = ./home;
        }
      ];
    };
    nixosConfigurations."hypermac" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./base/hypermac
        home-manager.nixosModules.home-manager {
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              class = "lowspec";
              user = "maya";
              useSyncthing = true;
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.maya = ./home;
        }
      ];
    };
    nixosConfigurations."patio" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
      modules = [
        ./base/patio
        nixpkgs-xr.nixosModules.nixpkgs-xr
        jovian.nixosModules.jovian
        home-manager.nixosModules.home-manager {
          home-manager.backupFileExtension = "hm-backup";
          #imports = [ inputs.nix-index-database.hmModules.nix-index ];
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              useSyncthing = false;
              class = "handheld";
              user = "alyx"; #cursed way of setting username
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.alyx = ./home;
        }
      ];
    };
    nixosConfigurations."umbriel" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./base/umbriel
        home-manager.nixosModules.home-manager {
          #imports = [ inputs.nix-index-database.hmModules.nix-index ];
          home-manager.backupFileExtension = "hm-backup";
          home-manager.extraSpecialArgs = {
            inherit inputs;
            vars = {
              isNixOS = true;
              isBritish = false;
              useSyncthing = false;
              class = "laptop";
              user = "alyx"; #cursed way of setting username
            };
          };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
	  home-manager.sharedModules = [{ imports = with inputs; [ nix-index-database.hmModules.nix-index nixvim.homeManagerModules.nixvim catppuccin.homeModules.catppuccin niri.homeModules.niri ];}];
          home-manager.users.alyx = ./home;
        }
      ];
    };
    homeConfigurations.generic = home-manager.lib.homeManagerConfiguration {
      pkgs = import nixpkgs; # { system = "x86_64-linux"; overlays = [inputs.nixgl.overlay]; };
      modules = [ ./home ];
      extraSpecialArgs = { 
        inherit inputs; 
        vars = {
          isNixOS = false;
          class = "laptop";
          user = "maya";
	  useSyncthing = true;
        };
      };
    };
    systemConfigs.default = system-manager.lib.makeSystemConfig {
      modules = [
        inputs.nix-system-graphics.systemModules.default
        ({
          config = {
            nixpkgs.hostPlatform = "x86_64-linux";
            system-manager.allowAnyDistro = true;
            system-graphics.enable = true;
          };
        })
      ];
    };
  };
}
