{
  description = "permafrost";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
    sops-nix = { url = "github:mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };

    deploy-rs.url = "github:serokell/deploy-rs";

    nyazoom.url = "git+https://git.zynh.me/Zynh0722/nyazoom.git";
  };

  outputs = inputs@{ nixpkgs, self, deploy-rs, ... }: {
    nixosConfigurations = {
      permafrost = nixpkgs.lib.nixosSystem {
        specialArgs = { inherit inputs self; };

        modules = [
          ./modules
          ./hosts/permafrost/configuration.nix
          ./hosts/permafrost/hardware-configuration.nix
        ];
      };
    };

    deploy = {
      sshUser = "ravenshade";
      user = "root";
      sshOpts = [ "-A" ];
      nodes.permafrost = {
        hostname = "permafrost";
        profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.permafrost;
        interactiveSudo = true;
      };
    };

    checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
  };
}