all repos — nixfiles @ 0cee36a024bf30dd466b8245a2c4e085921a1981

System and user configuration, managed by nix and home-manager

dev/web: install custom htmlformat package from self

Alan Pearce
commit

0cee36a024bf30dd466b8245a2c4e085921a1981

parent

f128790d36147be1db3834b12f0ece9a766c8e06

3 files changed, 41 insertions(+), 1 deletion(-)

jump to
M flake.nixflake.nix
@@ -41,7 +41,12 @@ , ...
}: let mkHomeConfiguration = { modules, system }: home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { inherit system; }; + pkgs = import nixpkgs { + inherit system; + overlays = [ + self.overlays.default + ]; + }; inherit modules; extraSpecialArgs = {
@@ -50,6 +55,12 @@ };
}; in { + overlays.default = final: prev: { + self = { + htmlformat = final.callPackage ./packages/htmlformat { }; + }; + }; + nixosConfigurations.prefect = nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; specialArgs = { inherit inputs; };
A packages/htmlformat/default.nix
@@ -0,0 +1,28 @@
+{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "htmlformat"; + version = "unstable-2023-11-08"; + + src = fetchFromGitHub { + owner = "a-h"; + repo = "htmlformat"; + rev = "5bd994fe268e4d505a9793143fa85414c7d50887"; + hash = "sha256-YSl9GsXhc0L2oKGZLwwjUtpe5W6ra6kk74zvQdsDCMU="; + }; + + vendorHash = "sha256-uVfh1pPhfj6AyQDqFd1EDWshuyDRvbMDZj3SN5tCS2w="; + + ldflags = [ "-s" "-w" ]; + + meta = with lib; { + description = "Htmlformat"; + homepage = "https://github.com/a-h/htmlformat"; + license = licenses.mit; + maintainers = with maintainers; [ alanpearce ]; + mainProgram = "htmlformat"; + }; +}
M user/settings/development/web.nixuser/settings/development/web.nix
@@ -9,6 +9,7 @@ csslint
stylelint ] ++ (with pkgs; [ flyctl + self.htmlformat ]); programs.emacs.extraPackages = epkgs: (with epkgs; [ caddyfile-mode