split out nix tooling

This commit is contained in:
LordGrimmauld 2024-04-27 10:51:53 +02:00
parent e00e79f420
commit 7e36b30811
4 changed files with 35 additions and 24 deletions

View File

@ -48,5 +48,5 @@ in
]; ];
}; };
options.grimmShared.gaming = lib.mkEnableOption"enables steam, heroic, prism and gamemoded"; options.grimmShared.gaming = lib.mkEnableOption "enables steam, heroic, prism and gamemoded";
} }

View File

@ -1,24 +1,19 @@
{ pkgs, config, lib, inputs, ... }: { pkgs, config, lib, ... }:
let let
cfg = config.grimmShared; cfg = config.grimmShared;
in in
{ {
imports = [ imports = [
./lilypond.nix ./lilypond.nix
./nix.nix
]; ];
config = with cfg; lib.mkIf (enable && tooling.enable) { config = with cfg; lib.mkIf (enable && tooling.enable) {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@")
(writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@") (writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@")
(writeShellScriptBin "nix-referrers" "nix-store --query --referrers $@")
(writeShellScriptBin "nixpkgs-review-head" "nixpkgs-review rev HEAD")
(writeShellScriptBin "fmt-all" "find ./**.nix -readable -writable -type f | xargs nixpkgs-fmt")
(writeShellScriptBin "lsiommu" ./lsiommu) (writeShellScriptBin "lsiommu" ./lsiommu)
(writeShellScriptBin "tree" "${lib.getExe pkgs.eza} -T --git -lh --no-permissions --no-user --no-filesize --no-time")
nixpkgs-review
nixpkgs-fmt
nixd
gcc gcc
jdk17 jdk17
python3 python3
@ -27,15 +22,13 @@ in
p7zip p7zip
tea tea
eza
fbcat fbcat
gomuks gomuks
gotop gotop
ranger ranger
nix-search-cli
wget wget
tree
file file
pypy3 pypy3
util-linux util-linux
@ -47,11 +40,7 @@ in
parted parted
glib glib
glibc glibc
# inputs.nix-locate.packages."${system}".default
inputs.hammering.packages."${system}".default
nix-output-monitor
expect expect
neovim-remote neovim-remote
] ++ lib.optionals cfg.graphical [ ] ++ lib.optionals cfg.graphical [
qdirstat qdirstat
@ -62,6 +51,7 @@ in
pdfarranger pdfarranger
nomacs nomacs
gparted gparted
zathura
]; ];
programs.git = { programs.git = {
@ -87,7 +77,6 @@ in
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [ grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
vim-nix
vim-scala vim-scala
fugitive fugitive
]; ];

29
common/tooling/nix.nix Normal file
View File

@ -0,0 +1,29 @@
{ pkgs, config, lib, inputs, system, ... }:
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'')
nixpkgs-review
nixpkgs-fmt
nixd
# inputs.nix-locate.packages."${system}".default
inputs.hammering.packages."${system}".default
nix-output-monitor
nix-search-cli
];
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
vim-nix
];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.package = pkgs.nixVersions.unstable;
nixpkgs.hostPlatform = system;
}

View File

@ -2,7 +2,6 @@
{ {
imports = imports =
[ [
# Include the results of the hardware scan.
./modules/fonts.nix ./modules/fonts.nix
./modules/tabletdriver.nix ./modules/tabletdriver.nix
./sway ./sway
@ -68,13 +67,7 @@
OCI_CLI_RC_FILE = "/home/grimmauld/.oci/config"; OCI_CLI_RC_FILE = "/home/grimmauld/.oci/config";
}; };
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.package = pkgs.nixVersions.unstable;
nixpkgs.hostPlatform = system;
programs.dconf.enable = true; programs.dconf.enable = true;
} }