feat(home/devcfg): Install extra packages
This commit is contained in:
parent
fa14e113ef
commit
f0c47d43a8
3 changed files with 11 additions and 3 deletions
|
@ -82,7 +82,7 @@ in
|
|||
pkgs.sshfs
|
||||
pkgs.gitoxide
|
||||
pkgs.xplr
|
||||
] ++ lib.optional devcfg.rust.enable pkgs.rustup;
|
||||
] ++ devcfg.extraPackages ++ lib.optionals devcfg.rust.enable ([ pkgs.rustup ] ++ devcfg.rust.extraPackages);
|
||||
|
||||
# Extra variables
|
||||
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
{ lib, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) types;
|
||||
|
||||
mkExtraPackagesOption = name: default: lib.mkOption {
|
||||
description = "Extra ${name} Packages.";
|
||||
type = types.listOf types.package;
|
||||
inherit default;
|
||||
example = [ ];
|
||||
};
|
||||
|
||||
identity.options = {
|
||||
email = lib.mkOption {
|
||||
description = "Primary email adderss";
|
||||
|
@ -117,11 +124,13 @@ in
|
|||
description = lib.mdDoc "Setup development environment for programming languages.";
|
||||
default = { };
|
||||
type = types.submodule {
|
||||
options.extraPackages = mkExtraPackagesOption "dev" [ pkgs.typos pkgs.just ];
|
||||
options.rust = lib.mkOption {
|
||||
description = "Jalil's default rust configuration.";
|
||||
default = { };
|
||||
type = types.submodule {
|
||||
options.enable = lib.mkEnableOption "rust dev environment";
|
||||
options.extraPackages = mkExtraPackagesOption "Rust" [ pkgs.cargo-nextest pkgs.cargo-sort pkgs.cargo-msrv pkgs.cargo-kcov pkgs.cargo-watch ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -20,7 +20,6 @@ in
|
|||
environment.systemPackages = [
|
||||
# Dev tools
|
||||
pkgs.gcc
|
||||
pkgs.just
|
||||
pkgs.clang
|
||||
# CLI tools
|
||||
pkgs.fd
|
||||
|
|
Loading…
Reference in a new issue