feat(porgrams): add nix-edit

This commit is contained in:
Moritz Böhme 2023-05-31 15:51:50 +02:00
parent 57f2094c44
commit 888b3246a7
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{ 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 ];
};
}