From 826823ccf465c1266a2971543f768c7a87eaa4d9 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 15 Dec 2023 22:55:04 +0100 Subject: [PATCH] moved fonts to core and python to dev --- configuration.nix | 3 --- core/default.nix | 3 ++- fonts.nix => core/fonts.nix | 0 dev/default.nix | 3 ++- dev/python3.nix | 9 +++++++++ python-packages.nix | 14 -------------- settings.nix | 15 +++++++++++++++ 7 files changed, 28 insertions(+), 19 deletions(-) rename fonts.nix => core/fonts.nix (100%) create mode 100644 dev/python3.nix delete mode 100644 python-packages.nix diff --git a/configuration.nix b/configuration.nix index 286ccf2..440719b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,8 +2,6 @@ let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz"; - # python packages to include with python3 - python-packages = import ./python-packages.nix; in { imports = [ @@ -150,7 +148,6 @@ in # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = (with pkgs; [ - (python3.withPackages(python-packages)) fishPlugins.done # notifications for background process finished fishPlugins.fzf-fish diff --git a/core/default.nix b/core/default.nix index 068951f..e214dde 100644 --- a/core/default.nix +++ b/core/default.nix @@ -3,7 +3,8 @@ let settings = import ./../settings.nix; in { - imports = lib.optionals settings.printing.enable [ ./printing.nix ] + imports = [ ./fonts.nix ] + ++ lib.optionals settings.printing.enable [ ./printing.nix ] ++ lib.optionals settings.xdg.enable [ ./xdg.nix ] ++ lib.optionals settings.java [ ./java.nix ] ++ lib.optionals settings.dotnet [ ./dotnet.nix ]; diff --git a/fonts.nix b/core/fonts.nix similarity index 100% rename from fonts.nix rename to core/fonts.nix diff --git a/dev/default.nix b/dev/default.nix index 86786fc..99eb1cc 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -8,5 +8,6 @@ in ++ lib.optionals settings.virtualisation.qemu.enable [ ./qemu.nix ] ++ lib.optionals settings.dev.platformio [ ./platformio.nix ] ++ lib.optionals settings.dev.latex [ ./latex.nix ] - ++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ]; + ++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ] + ++ lib.optionals settings.dev.python3.enable [ ./python3.nix ]; } diff --git a/dev/python3.nix b/dev/python3.nix new file mode 100644 index 0000000..e63fa24 --- /dev/null +++ b/dev/python3.nix @@ -0,0 +1,9 @@ +{ pkgs, config, lib, ... }: +let + settings = import ./../settings.nix; +in +{ + environment.systemPackages = with pkgs; [ + (python3.withPackages(settings.dev.python3.packages)) + ]; +} diff --git a/python-packages.nix b/python-packages.nix deleted file mode 100644 index 77f2953..0000000 --- a/python-packages.nix +++ /dev/null @@ -1,14 +0,0 @@ -ps: with ps; -[ - pandas - requests - pygments - tkinter - numpy - setuptools - youtube-dl - pip - setuptools - ipykernel - scipy -] diff --git a/settings.nix b/settings.nix index 335eb6b..48ab805 100644 --- a/settings.nix +++ b/settings.nix @@ -28,6 +28,21 @@ with import {}; { platformio = true; latex = true; dotnet = false; + python3 = { + enable = true; + packages = ps: with ps; [ + pandas + requests + pygments + tkinter + numpy + setuptools + youtube-dl + pip + ipykernel + scipy + ]; + }; lsp = { enable = true;