{
  description = "The Flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.05";
    home-manager = {
      url = "github:nix-community/home-manager/master";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    hyprland = {
      url = "github:vaxerski/Hyprland";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    emacs = {
      url = "github:nix-community/emacs-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nix-bitcoin = {
      url = "github:fort-nix/nix-bitcoin/release";
    };
    libre-presenter = {
      url = "gitlab:chriscochrun/church-presenter";
    };
  };

  outputs = { nixpkgs, nixpkgs-stable, home-manager, hyprland, emacs, nix-bitcoin, libre-presenter, ... }:
    let
      system = "x86_64-linux";
      username = "chris";
      pkgsForSystem = import nixpkgs {
        inherit system;
        config = { allowUnfree = true; };
        overlays = [
          emacs.overlay

          (self: super:
            {
              awesome = super.awesome.overrideAttrs (old: rec {
                pname = "awesome";
                version = "git-20220614-3a54221";
                src = super.fetchFromGitHub {
                  owner = "awesomeWM";
                  repo = "awesome";
                  rev = "3a542219f3bf129546ae79eb20e384ea28fa9798";
                  sha256 = "4z3w6iuv+Gw2xRvhv2AX4suO6dl82woJn0p1nkEx3uM=";
                };
                patches = [];
              });
            }
          )

          (self: super:
            {
              qt5ct = super.qt5ct.overrideAttrs (old: rec {
                patches = (old.patches or []) ++ [
                  ../../qt5ct.patch
                ];
              });
            }
          )
        ];
      };

      lib = nixpkgs.lib;
      # unstable = nixpkgs;

    in  {
      nixosConfigurations = {
        syl = lib.nixosSystem {
          inherit system;
          pkgs = pkgsForSystem;
          modules = [
            ./system/syl/configuration.nix
            home-manager.nixosModules.home-manager
            hyprland.nixosModules.default
            # libre-presenter.defaultPackage
            {
              home-manager.useGlobalPkgs = true;
              home-manager.useUserPackages = true;
              home-manager.users.chris = import ./user/home.nix;
              programs.hyprland.enable = true;
            }
          ];
        };
        kaladin = lib.nixosSystem {
          inherit system;
          pkgs = pkgsForSystem;
          modules = [
            ./system/kaladin/configuration.nix
            home-manager.nixosModules.home-manager
            {
              home-manager.useGlobalPkgs = true;
              home-manager.useUserPackages = true;
              home-manager.users.chris = import ./user/home.nix;
            }
          ];
        };
        dalinar = nixpkgs-stable.lib.nixosSystem {
          inherit system;
          modules = [
            ./system/dalinar/configuration.nix
            nix-bitcoin.nixosModules.default
          ];
        };
      };
    };
}
