From 5568d90cca97f6796fc8bc0ccf9768be37250ae8 Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 15 Jan 2025 19:15:51 -0600 Subject: [PATCH] nix-ld: add nix-alien option Signed-off-by: Myned --- flake.in.nix | 1 + flake.nix | 4 ++++ options/custom/programs/nix-ld.nix | 14 +++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/flake.in.nix b/flake.in.nix index 905fd3b..4d542f6 100644 --- a/flake.in.nix +++ b/flake.in.nix @@ -59,6 +59,7 @@ jovian-nixos = flake "github:Jovian-Experiments/Jovian-NixOS" // unstable "nixpkgs"; niri = flake "github:YaLTeR/niri" // unstable "nixpkgs"; niri-flake = flake "github:sodiboo/niri-flake" // unstable "nixpkgs"; + nix-alien = flake "github:thiagokokada/nix-alien" // unstable "nixpkgs"; nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.5.1"; nix-index-database-unstable = flake "github:nix-community/nix-index-database" // unstable "nixpkgs"; nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs"; diff --git a/flake.nix b/flake.nix index a098dc0..9541ecc 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,10 @@ inputs.nixpkgs.follows = "nixpkgs-unstable"; url = "github:sodiboo/niri-flake"; }; + nix-alien = { + inputs.nixpkgs.follows = "nixpkgs-unstable"; + url = "github:thiagokokada/nix-alien"; + }; nix-flatpak.url = "github:gmodena/nix-flatpak?ref=v0.5.1"; nix-index-database-stable = { inputs.nixpkgs.follows = "nixpkgs-stable"; diff --git a/options/custom/programs/nix-ld.nix b/options/custom/programs/nix-ld.nix index 7d3cc70..1f39787 100644 --- a/options/custom/programs/nix-ld.nix +++ b/options/custom/programs/nix-ld.nix @@ -1,15 +1,27 @@ { config, + inputs, lib, + pkgs, ... }: with lib; let cfg = config.custom.programs.nix-ld; in { - options.custom.programs.nix-ld.enable = mkOption {default = false;}; + options.custom.programs.nix-ld = { + enable = mkOption {default = false;}; + nix-alien = mkOption {default = true;}; + }; config = mkIf cfg.enable { # https://github.com/nix-community/nix-ld programs.nix-ld.enable = true; + + # https://github.com/thiagokokada/nix-alien + #?? nix-alien -- BINARY + environment.systemPackages = mkIf cfg.nix-alien [pkgs.nix-alien]; + + # https://github.com/thiagokokada/nix-alien?tab=readme-ov-file#nixos-installation-with-flakes + nixpkgs.overlays = [inputs.nix-alien.overlays.default]; }; }