diff --git a/common/gaming.nix b/common/gaming.nix index 7e7e925..36f451a 100644 --- a/common/gaming.nix +++ b/common/gaming.nix @@ -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"; } diff --git a/common/tooling/default.nix b/common/tooling/default.nix index fa4b310..8f439b1 100644 --- a/common/tooling/default.nix +++ b/common/tooling/default.nix @@ -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 ]; diff --git a/common/tooling/nix.nix b/common/tooling/nix.nix new file mode 100644 index 0000000..a4177f6 --- /dev/null +++ b/common/tooling/nix.nix @@ -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; +} diff --git a/configuration.nix b/configuration.nix index d443762..75c1a00 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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; }