dotfiles/modules/programs/nix-edit/default.nix

27 lines
457 B
Nix
Raw Normal View History

2023-05-31 15:51:50 +02:00
{ lib
, config
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.nix-edit;
in
{
options.my.programs.nix-edit.enable = mkEnableOption "nix-edit";
config = mkIf cfg.enable {
environment.systemPackages =
let
nix-edit = pkgs.writeShellApplication {
name = "nix-edit";
runtimeInputs = with pkgs; [ nix gnugrep ];
text = builtins.readFile ./nix-edit.sh;
};
in
[ nix-edit ];
};
}