{
  description = "NixOS system flake.";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager = {
        url = "github:nix-community/home-manager/release-25.11";
        inputs.nixpkgs.follows = "nixpkgs";
    };
    # bonus inputs
    stylix = {
        url = "github:nix-community/stylix/release-25.11";
        inputs.nixpkgs.follows = "nixpkgs";
        # Override to pick up fix for invisible extension icons
        # https://github.com/rafaelmardojai/firefox-gnome-theme/issues/1061
        inputs.firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme";
    };
    nur.url = "github:nix-community/NUR";
    nixos-hardware.url = "github:NixOS/nixos-hardware/master";
    noctalia = {
      url = "github:noctalia-dev/noctalia-shell";
      inputs.nixpkgs.follows = "nixpkgs-unstable";
    };
  };

  outputs = { self, nixpkgs, nixpkgs-unstable, stylix, nur, home-manager, nixos-hardware, noctalia, ... } @ inputs:
  let
    inherit (self) outputs;
    system = "x86_64-linux";
    timeZone = "America/Denver";
    pkgs = nixpkgs.legacyPackages.${system};
    unstablePkgs = import nixpkgs-unstable { system = system; config = { allowUnfree = true; }; };
    
    # pkgs23 = import nixpkgs-23 { system = system; config = { allowUnfree = true; }; }; 
  in
  {
    nixosConfigurations = {
      luci = nixpkgs.lib.nixosSystem {
        specialArgs = {
            inherit inputs outputs timeZone system;
        };
        modules = [
          inputs.home-manager.nixosModules.home-manager {
              home-manager.useGlobalPkgs = true;
              home-manager.useUserPackages = true;
              home-manager.users.luci = import ./hosts/luci/modules/home-manager/home.nix;
              home-manager.extraSpecialArgs = {
                  inherit inputs outputs;
              };
          }
          ./hosts/luci/default.nix
        ];
      };
      nate = nixpkgs.lib.nixosSystem {
        # Pass args to desktop configuration
        specialArgs = {
            inherit inputs outputs timeZone system;
        };
        modules = [
            stylix.nixosModules.stylix
            # Setup home manager
            inputs.home-manager.nixosModules.home-manager {
                home-manager.useGlobalPkgs = true;
                home-manager.useUserPackages = true;
                home-manager.users.nate = import ./hosts/nate/modules/home-manager/home.nix;
                home-manager.extraSpecialArgs = {
                    inherit inputs outputs unstablePkgs;
                };
            }
            ./hosts/nate/default.nix
        ];
      };
      nate-work = nixpkgs.lib.nixosSystem {
        # Pass args to desktop configuration
        specialArgs = {
            inherit inputs outputs timeZone system;
        };
        modules = [
            stylix.nixosModules.stylix
            # Setup home manager
            inputs.home-manager.nixosModules.home-manager {
                home-manager.useGlobalPkgs = true;
                home-manager.useUserPackages = true;
                home-manager.users.nate = import ./hosts/nate-work/modules/home-manager/home.nix;
                home-manager.extraSpecialArgs = {
                    inherit inputs outputs unstablePkgs;
                };
            }
            ./hosts/nate-work/default.nix
        ];
      };
      jaci = nixpkgs.lib.nixosSystem {
        # Pass args to desktop configuration
        specialArgs = {
            inherit inputs outputs timeZone system;
        };
        modules = [
            stylix.nixosModules.stylix
            # Setup home manager
            inputs.home-manager.nixosModules.home-manager {
                home-manager.useGlobalPkgs = true;
                home-manager.useUserPackages = true;
                home-manager.users.jaci = import ./hosts/jaci/modules/home-manager/home.nix;
                home-manager.extraSpecialArgs = {
                    inherit inputs outputs unstablePkgs;
                };
            }
            ./hosts/jaci/default.nix
        ];
      };
      # DEPRECATED: scrappy system is no longer in use
      # scrappy = nixpkgs.lib.nixosSystem {
      #   # Pass args to desktop configuration
      #   specialArgs = {
      #       inherit inputs outputs timeZone system;
      #   };
      #   modules = [
      #       # Setup home manager
      #       inputs.home-manager.nixosModules.home-manager {
      #           home-manager.useGlobalPkgs = true;
      #           home-manager.useUserPackages = true;
      #           home-manager.users.scrappy = import ./hosts/scrappy/modules/home-manager/home.nix;
      #           home-manager.extraSpecialArgs = {
      #               inherit inputs outputs unstablePkgs;
      #           };
      #       }
      #       ./hosts/scrappy/default.nix
      #   ];
      # };
      frame12 = nixpkgs.lib.nixosSystem {
        # Pass args to desktop configuration
        specialArgs = {
            inherit inputs outputs timeZone system;
        };
        modules = [
            stylix.nixosModules.stylix
            # Setup home manager
            inputs.home-manager.nixosModules.home-manager {
                home-manager.useGlobalPkgs = true;
                home-manager.useUserPackages = true;
                home-manager.users.nate = import ./hosts/frame12/modules/home-manager/home.nix;
                home-manager.extraSpecialArgs = {
                    inherit inputs outputs unstablePkgs;
                };
            }
            ./hosts/frame12/default.nix
        ];
      };
    };
  };
}
