grimm-nixos-laptop/common/tooling/nix.nix
2024-05-07 15:14:12 +02:00

45 lines
1.2 KiB
Nix

{ pkgs, config, lib, inputs, ... }:
let
cfg = config.grimmShared;
in
{
environment.systemPackages = with pkgs; [
(writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@")
(writeShellScriptBin "nix-referrers" "nix-store --query --referrers $@")
(writeShellScriptBin "nixpkgs-review-head" "nixpkgs-review rev HEAD")
(writeShellScriptBin "fmt-all" ''find ./ -readable -writable -type f | grep "\.nix" | xargs nixpkgs-fmt'')
(writeShellScriptBin "rebuild" "bash -c \"nixos-rebuild switch |& nom\"")
nixpkgs-review
nixpkgs-fmt
nixfmt-rfc-style
nixd
nixpkgs-hammering
nix-output-monitor
nix-search-cli
niv
];
environment.sessionVariables = lib.mkIf pkgs.config.allowUnfree {
NIXPKGS_ALLOW_UNFREE = "1";
};
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
vim-nix
];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
# nix.package = pkgs.nixVersions.latest;
nix.optimise.automatic = true;
boot.tmp.cleanOnBoot = true;
}