# flake.nix
{
  inputs = {
    # TODO: Try to move to stable version someday if packages not being packaged are not issue in future
    # Main package repo unstable verrsion
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    nix-gaming.url = "github:fufexan/nix-gaming";

    # Allows for changing user configs
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    # A Wayland compositor
    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";

    # Allows for workspaces to be split across monitors like DWM
    hyprsplit = {
      url = "github:shezdy/hyprsplit";
      inputs.hyprland.follows = "hyprland";
    };

    #Hyprspace = {
    #  url = "github:KZDKM/Hyprspace";
    #  inputs.hyprland.follows = "hyprland";
    #};

    # Extra packages not in Nixpkgs
    nur.url = "github:nix-community/NUR";

    # Spotify customization
    spicetify-nix.url = "github:MichaelPachec0/spicetify-nix";

    # Host file for blocking ad websites among other things
    hosts.url = "github:StevenBlack/hosts";

    # A widget system for Wayland
    ags.url = "github:Aylur/ags";
  };

  outputs = {
    nixpkgs,
    home-manager,
    nur,
    spicetify-nix,
    nix-gaming,
    hosts,
    ags,
    ...
  } @ inputs: let
    system = "x86_64-linux";
  in {
    nixosConfigurations = {
      nixos = nixpkgs.lib.nixosSystem {
        specialArgs = {
          inherit inputs;
        };
        system = "x86_64-linux";
        modules = [
          ./configuration.nix
          # Allows for home manager to be used
          nur.nixosModules.nur
          home-manager.nixosModules.home-manager
          # TODO: Too dumb to figure out why this can't be seperated into it's own file, whatever...
          hosts.nixosModule
          {
            networking.stevenBlackHosts = {
              enable = true;
              blockFakenews = false;
              blockGambling = true;
              blockPorn = false; # This is bit revealing isn't it..?
              blockSocial = false;
            };
          }
          {
            home-manager = {
              useGlobalPkgs = true;
              useUserPackages = true;
              sharedModules = [nur.hmModules.nur spicetify-nix.homeManagerModule inputs.ags.homeManagerModules.default];
            };
          }
        ];
      };
    };
  };
}
