{ description = "Flake of https://dev.stupstech.de/Mr_Steppy/multi-ssh"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; rust-overlay.url = "github:oxalica/rust-overlay"; }; outputs = { self, nixpkgs, rust-overlay, ... }: let systems = nixpkgs.lib.systems.flakeExposed; forAllSystems = nixpkgs.lib.genAttrs systems; in { packages = forAllSystems (system: let overlays = [ rust-overlay.overlays.default ]; pkgs = import nixpkgs { inherit system; overlays = overlays; }; rustToolchain = pkgs.rust-bin.stable."1.90.0".minimal; rustPlatform = pkgs.makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }; in { multiSsh = rustPlatform.buildRustPackage { pname = "multi-ssh"; version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version; src = ./.; cargoLock = { lockFile = ./Cargo.lock; }; nativeCheckInputs = [ pkgs.python3 ]; release = true; }; default = self.packages.${system}.multiSsh; } ); apps = forAllSystems (system: let pkg = self.packages.${system}.multiSsh; in { default = { type = "app"; program = "${pkg}/bin/multi-ssh"; }; } ); nixosModules.multiSsh = { lib, pkgs, config, ... }: { options = { programs.multiSsh = { enable = lib.mkEnableOption "multi-ssh"; editor = lib.mkOption { type = lib.types.nullOr lib.types.str; description = "Editor to forward to multi-ssh (MSSH_EDITOR). If null, the variable is not set."; default = null; }; package = lib.mkOption { type = lib.types.package; description = "Derivation to install for multi-ssh"; default = self.packages.${pkgs.system}.multiSsh; }; servers = { local = { dir = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; description = ''Local server directory, relative to the user's HOME. If set, a local entry ".: