Compare commits

..

2 commits

3 changed files with 51 additions and 8 deletions

View file

@ -53,7 +53,7 @@ with config;
unstable.jetbrains.rust-rover unstable.jetbrains.rust-rover
unstable.peazip unstable.peazip
unstable.seabird unstable.seabird
unstable.talosctl unstable.talosctl # overlay override
unstable.telegram-desktop unstable.telegram-desktop
unstable.tidal-hifi unstable.tidal-hifi
# unstable.vesktop # gpu issues. Using the flatpak version solves this issue. # unstable.vesktop # gpu issues. Using the flatpak version solves this issue.

View file

@ -1,11 +1,9 @@
{ inputs, ... }: { inputs, ... }:
let let
inherit (inputs.nixpkgs) lib;
# smartmontoolsOverlay = import ./smartmontools { }; # smartmontoolsOverlay = import ./smartmontools { };
# vivaldiOverlay = self: super: { vivaldi = super.callPackage ./vivaldi { }; }; # vivaldiOverlay = self: super: { vivaldi = super.callPackage ./vivaldi { }; };
coderOverlay = self: super: { coder = super.callPackage ./coder { }; }; coderOverlay = self: super: { coder = super.callPackage ./coder { }; };
modsOverlay = self: super: { mods = super.callPackage ./charm-mods { }; }; modsOverlay = self: super: { mods = super.callPackage ./charm-mods { }; };
talosctlOverlay = import ./talosctl { };
termiusOverlay = self: super: { termius = super.callPackage ./termius { }; }; termiusOverlay = self: super: { termius = super.callPackage ./termius { }; };
in in
{ {
@ -16,15 +14,20 @@ in
mods = modsOverlay; mods = modsOverlay;
nix-minecraft = inputs.nix-minecraft.overlay; nix-minecraft = inputs.nix-minecraft.overlay;
nur = inputs.nur.overlay; nur = inputs.nur.overlay;
talosctl = talosctlOverlay;
termius = termiusOverlay; termius = termiusOverlay;
# The unstable nixpkgs set (declared in the flake inputs) will # The unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable' # be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: { unstable-packages = final: prev: {
unstable = import inputs.nixpkgs-unstable { unstable = import inputs.nixpkgs-unstable
{
inherit (final) system; inherit (final) system;
config.allowUnfree = true; config.allowUnfree = true;
} // {
# Add talosctl to the unstable set
talosctl = final.unstable.callPackage ./talosctl/talosctl-full.nix {
inherit (final.unstable) lib buildGoModule fetchFromGitHub installShellFiles;
};
}; };
}; };
} }

View file

@ -0,0 +1,40 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "talosctl";
version = "1.8.1";
src = fetchFromGitHub {
owner = "siderolabs";
repo = "talos";
rev = "v${version}";
hash = "sha256-6WHeiVH/vZHiM4bqq3T5lC0ARldJyZtIErPeDgrZgxc=";
};
vendorHash = "sha256-aTtvVpL979BUvSBwBqRqCWSWIBBmmty9vBD97Q5P4+E=";
ldflags = [ "-s" "-w" ];
env.GOWORK = "off";
subPackages = [ "cmd/talosctl" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd talosctl \
--bash <($out/bin/talosctl completion bash) \
--fish <($out/bin/talosctl completion fish) \
--zsh <($out/bin/talosctl completion zsh)
'';
doCheck = false; # no tests
meta = with lib; {
description = "CLI for out-of-band management of Kubernetes nodes created by Talos";
mainProgram = "talosctl";
homepage = "https://www.talos.dev/";
license = licenses.mpl20;
maintainers = with maintainers; [ flokli ];
};
}