feat: cockpit: add cockpit-tailscale plugin

main
LeRoyce Pearson 2024-01-09 12:23:12 -07:00
parent 77d3ea5593
commit 84be02a122
3 changed files with 29 additions and 5 deletions

View File

@ -65,6 +65,9 @@
juanfont-headscale.headscale # install to allow debugging/control of headscale using the CLI juanfont-headscale.headscale # install to allow debugging/control of headscale using the CLI
pkgs.glauth pkgs.glauth
# Plugins for cockpit
cockpit-tailscale
]; ];
environment.variables = { environment.variables = {

View File

@ -13,15 +13,21 @@
outputs = { self, nixpkgs, agenix, juanfont-headscale }: outputs = { self, nixpkgs, agenix, juanfont-headscale }:
let let
overlay-juanfont-headscale = final: prev: { pkgs = import nixpkgs { system = "x86_64-linux"; };
juanfont-headscale = juanfont-headscale.packages.${prev.system};
glauth = prev.callPackage ./pkgs/glauth.nix {};
};
in { in {
packages.x86_64-linux.glauth = pkgs.callPackage ./pkgs/glauth.nix {};
packages.x86_64-linux.cockpit-tailscale = pkgs.callPackage ./pkgs/cockpit-tailscale.nix {};
nixosConfigurations.samsehu = nixpkgs.lib.nixosSystem { nixosConfigurations.samsehu = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
({config, pkgs, ...}: { nixpkgs.overlays = [ overlay-juanfont-headscale ]; }) ({config, pkgs, ...}: {
nixpkgs.overlays = [ (final: prev: {
juanfont-headscale = juanfont-headscale.packages.${prev.system};
glauth = self.packages.${prev.system}.glauth;
cockpit-tailscale = self.packages.${prev.system}.cockpit-tailscale;
})];
})
./agenix-config-module.nix ./agenix-config-module.nix
./configuration.nix ./configuration.nix
./services/glauth.nix ./services/glauth.nix

View File

@ -0,0 +1,15 @@
{ lib, stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = "cockpit-tailscale";
version = "0.0.6";
src = fetchzip {
url = "https://github.com/spotsnel/cockpit-tailscale/releases/download/v${version}/cockpit-tailscale-v${version}.tar.gz";
sha256 = "sha256-ESUZdt8GVEToyrv6UP8lOff67LsumdJAY1lXvC3fBaI=";
};
installPhase = ''
mkdir -p $out/share/cockpit
cp -r ${src} $out/share/cockpit/tailscale
'';
}