Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,61 @@ cargo build --release
./target/release/talos-pilot
```

### NixOS

Talos pilot is available as a Nix flake but can also be run without installing.

#### Run talos-pilot without installing

You can test the app directly by using a nix shell

```bash
nix shell github:Handfish/talos-pilot
```

Or run it directly

```bash
nix run github:Handfish/talos-pilot
```

#### Usage in flakes

```nix
# flake.nix
{
inputs = {
# ...
talos-pilot.url = "github:Handfish/talos-pilot";
};
outputs =
{
self,
nixpkgs,
talos-pilot,
# ...
}:
{
nixosConfigurations.mymachine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
# provides `pkgs.talos-pilot`
nixpkgs.overlays = [ talos-pilot.overlays.default ];
}
(
{ pkgs, ... }:
{
# install talos-pilot
environment.systemPackages = [ pkgs.talos-pilot ];
}
)
];
};
};
}
```

### Requirements

- Valid `~/.talos/config` (talosconfig)
Expand Down
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
description = "A flake for talos-pilot, a Talos TUI for real-time node monitoring.";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};

outputs =
{
self,
nixpkgs,
systems,
}:
let
inherit (nixpkgs) lib;
forEachPkgs = f: lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});

package =
{
lib,
rustPlatform,
protobuf,
}:
let
manifest = builtins.fromTOML (builtins.readFile ./Cargo.toml);
in
rustPlatform.buildRustPackage rec {
inherit (manifest.workspace.package) version;

pname = "talos-pilot";
src = ./.;

cargoDeps = rustPlatform.importCargoLock {
lockFile = src + "/Cargo.lock";
};

nativeBuildInputs = [
protobuf
];

meta = {
description = "Talos TUI for real-time node monitoring, log streaming, etcd health, and diagnostics";
homepage = "https://github.com/Handfish/talos-pilot";
license = with lib.licenses; [ mit ];
mainProgram = "talos-pilot";
};
};
in
{
packages = forEachPkgs (pkgs: rec {
talos-pilot = pkgs.callPackage package { inherit (pkgs) protobuf; };
default = talos-pilot;
});
devShells = forEachPkgs (pkgs: {
default = pkgs.mkShell {
# automatically pulls nativeBuildInputs + buildInputs
inputsFrom = [ (pkgs.callPackage package { inherit (pkgs) protobuf; }) ];
};
});
overlays.default = final: _: {
talos-pilot = final.callPackage package { };
};
};
}