grimm-nixos-laptop/common/tooling/nix.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

2024-05-07 13:13:37 +02:00
{ pkgs, config, lib, inputs, ... }:
2024-04-27 10:51:53 +02:00
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'')
2024-05-07 13:13:37 +02:00
(writeShellScriptBin "rebuild" "bash -c \"nixos-rebuild switch |& nom\"")
2024-04-27 10:51:53 +02:00
nixpkgs-review
nixpkgs-fmt
2024-05-06 23:22:32 +02:00
nixfmt-rfc-style
2024-04-27 10:51:53 +02:00
nixd
2024-05-06 23:22:32 +02:00
nixpkgs-hammering
2024-04-27 10:51:53 +02:00
nix-output-monitor
nix-search-cli
2024-05-07 12:19:14 +02:00
niv
2024-04-27 10:51:53 +02:00
];
2024-05-07 13:13:37 +02:00
environment.sessionVariables = lib.mkIf config.nixpkgs.pkgs.config.allowUnfree {
2024-04-27 14:20:48 +02:00
NIXPKGS_ALLOW_UNFREE = "1";
};
2024-04-27 10:51:53 +02:00
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
vim-nix
];
2024-04-30 12:08:28 +02:00
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
2024-05-07 12:19:14 +02:00
# nix.package = pkgs.nixVersions.latest;
2024-04-30 12:08:28 +02:00
nix.optimise.automatic = true;
2024-04-30 12:32:03 +02:00
boot.tmp.cleanOnBoot = true;
2024-04-27 10:51:53 +02:00
}