From 7fbf50918396dd42282edaf3a8dad54bc5608f35 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Wed, 8 Jan 2025 00:34:33 +0100 Subject: [PATCH] refactor(nix): rework package management --- nix/devshell.nix | 2 +- nix/packages.nix | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/nix/devshell.nix b/nix/devshell.nix index 55208c1..5a3d0ff 100644 --- a/nix/devshell.nix +++ b/nix/devshell.nix @@ -9,7 +9,7 @@ _: { { devShells = { default = pkgs.mkShell { - nativeBuildInputs = config.buildPackages ++ config.develPackages ++ config.deployPackages; + nativeBuildInputs = config.develPackages; shellHook = '' ln -snf ${config.pelicanplugins} plugins ln -snf ${config.pelicantheme} theme diff --git a/nix/packages.nix b/nix/packages.nix index c3bf8b9..d0e13d1 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -19,12 +19,11 @@ in buildPackages = mkOption { description = mdDoc "Python package used in the project"; type = types.listOf types.package; - default = with pkgs; [ - python311 - python311Packages.markdown-include - python311Packages.pelican - python311Packages.typogrify - ]; + default = ( with pkgs.python311Packages; [ + markdown-include + pelican + typogrify + ]); }; develPackages = mkOption { description = mdDoc "Python package used to development"; @@ -33,19 +32,18 @@ in convco go-task lefthook - python3Packages.invoke - python3Packages.livereload + rsync shellcheck shfmt typos - ]; - }; - deployPackages = mkOption { - description = mdDoc "Package use to deploy"; - type = types.listOf types.package; - default = with pkgs; [ - rsync - ]; + ] + ++ ( with pkgs.python311Packages; [ + markdown-include + pelican + typogrify + livereload + invoke + ]); }; pelicanplugins = mkOption { type = types.package;