diff --git a/flake.nix b/flake.nix index 5e885c2..e6cc1d7 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,7 @@ deploy-rs-pkg = null; }) (_: super: { + gamja = super.callPackage ./pkgs/gamja.nix { }; weather = super.callPackage ./pkgs/weather { }; nicer = super.callPackage ./pkgs/nicer.nix { }; tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { }; @@ -314,8 +315,9 @@ }; in { - packages.x86_64-linux.vanta-agent = pkgs.vanta-agent; - packages.x86_64-linux.weather = pkgs.weather; + packages.x86_64-linux = { + inherit (pkgs) weather gamja; + }; } ); diff --git a/modules/base/default.nix b/modules/base/default.nix index 35ef805..4e0ae88 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -202,8 +202,9 @@ in speedtest-cli nix-output-monitor - config.boot.kernelPackages.vm-tools config.boot.kernelPackages.perf + config.boot.kernelPackages.vm-tools + config.boot.kernelPackages.cpupower ] (lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") [ wrk2 ]) ]; diff --git a/pkgs/gamja.nix b/pkgs/gamja.nix new file mode 100644 index 0000000..bba16af --- /dev/null +++ b/pkgs/gamja.nix @@ -0,0 +1,43 @@ +{ + lib, + fetchFromGitea, + buildNpmPackage, + writeText, + # https://git.sr.ht/~emersion/gamja/tree/master/doc/config-file.md + gamjaConfig ? null, +}: +buildNpmPackage rec { + pname = "gamja"; + version = "1.0.0-beta.10"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "emersion"; + repo = "gamja"; + rev = "v${version}"; + hash = "sha256-JqnEiPnYRGSeIZm34Guu7MgMfwcySc42aTXweMqL8BQ="; + }; + + npmDepsHash = "sha256-dAfbluNNBF1e9oagej+SRxO/YffCdLLAUUgt8krnWvg="; + + installPhase = '' + runHook preInstall + + cp -r dist $out + ${lib.optionalString ( + gamjaConfig != null + ) "cp ${writeText "gamja-config" (builtins.toJSON gamjaConfig)} $out/config.json"} + + runHook postInstall + ''; + + meta = with lib; { + description = "Simple IRC web client"; + homepage = "https://git.sr.ht/~emersion/gamja"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ + motiejus + apfelkuchen6 + ]; + }; +}