From 3eb163dbeede32888915f078c3401e480e8467e8 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 31 Dec 2023 13:20:31 +0000 Subject: [PATCH] Move some more packages up to system level (from home-manager) --- flake.nix | 5 +--- home/emacs.nix | 44 ----------------------------------- home/nyxt/default.nix | 12 +--------- system/desktop.nix | 3 ++- system/emacs.nix | 54 +++++++++++++++++++++++++++++++++++++++++++ system/hyprland.nix | 4 +--- system/nyxt.nix | 10 ++++++++ 7 files changed, 69 insertions(+), 63 deletions(-) create mode 100644 system/emacs.nix create mode 100644 system/nyxt.nix diff --git a/flake.nix b/flake.nix index 437f690f..744ab7fb 100644 --- a/flake.nix +++ b/flake.nix @@ -178,10 +178,7 @@ useUserPackages = true; users = { root = { - imports = [ - ./home/default.nix - ({ pkgs, ... }: { home.packages = with pkgs; [ nil ]; }) - ]; + imports = [ ./home/default.nix ]; home = { inherit stateVersion; username = "root"; diff --git a/home/emacs.nix b/home/emacs.nix index d1d18600..905ff62d 100644 --- a/home/emacs.nix +++ b/home/emacs.nix @@ -125,48 +125,4 @@ }; }; }; - home.packages = with pkgs; [ - # Emacs requirements - fd - ripgrep - imagemagick - languagetool - wordnet - (aspellWithDicts (ds: with ds; [ en en-computers en-science ])) - - # For EMMS - mp3info - - # Language-specific requirements - sqlite - pandoc - texlive.combined.scheme-full - ghostscript - mupdf - poppler_utils - - # Linters - nodePackages.stylelint - - # Formatters - nodePackages.prettier - nixfmt - black - isort - fprettify - ruff - rustfmt - stylua - shfmt - - # LSP Servers - nil - fortls - shellcheck - rust-analyzer - luajitPackages.lua-lsp - nodePackages.pyright - nodePackages.yaml-language-server - nodePackages.bash-language-server - ]; } diff --git a/home/nyxt/default.nix b/home/nyxt/default.nix index e52153b8..2e90d875 100644 --- a/home/nyxt/default.nix +++ b/home/nyxt/default.nix @@ -1,11 +1 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - nyxt - gst_all_1.gst-libav - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly - ]; - xdg.configFile."nyxt/config.lisp".source = ./config.lisp; -} +{ ... }: { xdg.configFile."nyxt/config.lisp".source = ./config.lisp; } diff --git a/system/desktop.nix b/system/desktop.nix index e9f39d63..0522386b 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -1,7 +1,8 @@ { config, pkgs, user, ... }: { - imports = [ ./default.nix ./firefox.nix ./chromium.nix ]; + imports = + [ ./default.nix ./emacs.nix ./nyxt.nix ./firefox.nix ./chromium.nix ]; environment.systemPackages = with pkgs; [ dex mesa diff --git a/system/emacs.nix b/system/emacs.nix new file mode 100644 index 00000000..893a0d0e --- /dev/null +++ b/system/emacs.nix @@ -0,0 +1,54 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + # Emacs + requirements + emacs29-pgtk + fd + ripgrep + imagemagick + languagetool + wordnet + (aspellWithDicts (ds: with ds; [ en en-computers en-science ])) + + # For EMMS + mp3info + + # Language-specific requirements + sqlite + pandoc + texlive.combined.scheme-full + ghostscript + mupdf + poppler_utils + + # Linters + nodePackages.stylelint + + # Formatters + nodePackages.prettier + nixfmt + black + isort + fprettify + ruff + rustfmt + stylua + shfmt + + # LSP Servers + nil + fortls + shellcheck + rust-analyzer + luajitPackages.lua-lsp + nodePackages.pyright + nodePackages.yaml-language-server + nodePackages.bash-language-server + + # Common programming languages + rustc + cargo + lua + gfortran + (python3.withPackages (ps: with ps; [ numpy scipy xarray plotly ])) + ]; +} diff --git a/system/hyprland.nix b/system/hyprland.nix index 9e8bb606..ec87c5f0 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, user, ... }: - -{ +{ pkgs, ... }: { imports = [ ./desktop.nix ]; nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; diff --git a/system/nyxt.nix b/system/nyxt.nix new file mode 100644 index 00000000..e37feac9 --- /dev/null +++ b/system/nyxt.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + nyxt + gst_all_1.gst-libav + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + ]; +}