nix-config/modules/scripts/zet.nix

39 lines
711 B
Nix
Raw Normal View History

{ inputs, withSystem, ... }:
let
name = "zet";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.buildGoModule {
inherit name;
runtimeInputs = with pkgs; [
git
];
src = inputs.zet;
vendorHash = "sha256-pprnK2JKmPuR3Q+F8+vMDEdowlb3oX4BOOzW8NGOqgs=";
postInstall = ''
mv $out/bin/cmd-zet $out/bin/zet
'';
};
};
flake.modules.homeManager.base =
{ config, pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
home.sessionVariables = {
ZET_DIR = "${config.xdg.userDirs.documents}/zet";
};
};
}