Create home-manager module for packer

This commit is contained in:
2024-04-12 12:51:08 +02:00
parent 08a823cb06
commit ffab35d8fb
4 changed files with 142 additions and 59 deletions

View File

@@ -1,36 +1,31 @@
{
description = "A clj-nix flake";
description = "Packer - Clojure application which boosts the luggage packing activity.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
clj-nix.url = "github:jlesquembre/clj-nix";
};
outputs = {
self,
nixpkgs,
flake-utils,
clj-nix,
}:
flake-utils.lib.eachDefaultSystem (system: {
packages = {
default = clj-nix.lib.mkCljApp {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
# Option list:
# https://jlesquembre.github.io/clj-nix/options/
{
projectSrc = ./.;
name = "packer";
main-ns = "packer.main";
}: let
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
nativeImage.enable = false;
# customJdk.enable = true;
}
];
};
};
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
packages = forAllSystems (system: rec {
packer = nixpkgs.legacyPackages.${system}.callPackage ./package.nix {inherit clj-nix;};
default = packer;
});
homeManagerModules.packer = import ./hm.module.nix self;
};
}