split out nix tooling
This commit is contained in:
parent
e00e79f420
commit
7e36b30811
4 changed files with 35 additions and 24 deletions
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -1,24 +1,19 @@
|
|||
{ pkgs, config, lib, inputs, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.grimmShared;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./lilypond.nix
|
||||
./nix.nix
|
||||
];
|
||||
|
||||
config = with cfg; lib.mkIf (enable && tooling.enable) {
|
||||
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 "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 "tree" "${lib.getExe pkgs.eza} -T --git -lh --no-permissions --no-user --no-filesize --no-time")
|
||||
|
||||
nixpkgs-review
|
||||
nixpkgs-fmt
|
||||
nixd
|
||||
gcc
|
||||
jdk17
|
||||
python3
|
||||
|
@ -27,15 +22,13 @@ in
|
|||
p7zip
|
||||
|
||||
tea
|
||||
eza
|
||||
|
||||
fbcat
|
||||
gomuks
|
||||
gotop
|
||||
ranger
|
||||
nix-search-cli
|
||||
|
||||
wget
|
||||
tree
|
||||
file
|
||||
pypy3
|
||||
util-linux
|
||||
|
@ -47,11 +40,7 @@ in
|
|||
parted
|
||||
glib
|
||||
glibc
|
||||
# inputs.nix-locate.packages."${system}".default
|
||||
inputs.hammering.packages."${system}".default
|
||||
nix-output-monitor
|
||||
expect
|
||||
|
||||
neovim-remote
|
||||
] ++ lib.optionals cfg.graphical [
|
||||
qdirstat
|
||||
|
@ -62,6 +51,7 @@ in
|
|||
pdfarranger
|
||||
nomacs
|
||||
gparted
|
||||
zathura
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
|
@ -87,7 +77,6 @@ in
|
|||
|
||||
|
||||
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
|
||||
vim-nix
|
||||
vim-scala
|
||||
fugitive
|
||||
];
|
||||
|
|
29
common/tooling/nix.nix
Normal file
29
common/tooling/nix.nix
Normal 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;
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./modules/fonts.nix
|
||||
./modules/tabletdriver.nix
|
||||
./sway
|
||||
|
@ -68,13 +67,7 @@
|
|||
OCI_CLI_RC_FILE = "/home/grimmauld/.oci/config";
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.package = pkgs.nixVersions.unstable;
|
||||
nixpkgs.hostPlatform = system;
|
||||
|
||||
programs.dconf.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue