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.sshfs
|
||||||
pkgs.gitoxide
|
pkgs.gitoxide
|
||||||
pkgs.xplr
|
pkgs.xplr
|
||||||
] ++ lib.optional devcfg.rust.enable pkgs.rustup;
|
] ++ devcfg.extraPackages ++ lib.optionals devcfg.rust.enable ([ pkgs.rustup ] ++ devcfg.rust.extraPackages);
|
||||||
|
|
||||||
# Extra variables
|
# Extra variables
|
||||||
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
|
|
||||||
|
mkExtraPackagesOption = name: default: lib.mkOption {
|
||||||
|
description = "Extra ${name} Packages.";
|
||||||
|
type = types.listOf types.package;
|
||||||
|
inherit default;
|
||||||
|
example = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
identity.options = {
|
identity.options = {
|
||||||
email = lib.mkOption {
|
email = lib.mkOption {
|
||||||
description = "Primary email adderss";
|
description = "Primary email adderss";
|
||||||
|
@ -117,11 +124,13 @@ in
|
||||||
description = lib.mdDoc "Setup development environment for programming languages.";
|
description = lib.mdDoc "Setup development environment for programming languages.";
|
||||||
default = { };
|
default = { };
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
|
options.extraPackages = mkExtraPackagesOption "dev" [ pkgs.typos pkgs.just ];
|
||||||
options.rust = lib.mkOption {
|
options.rust = lib.mkOption {
|
||||||
description = "Jalil's default rust configuration.";
|
description = "Jalil's default rust configuration.";
|
||||||
default = { };
|
default = { };
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options.enable = lib.mkEnableOption "rust dev environment";
|
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 = [
|
environment.systemPackages = [
|
||||||
# Dev tools
|
# Dev tools
|
||||||
pkgs.gcc
|
pkgs.gcc
|
||||||
pkgs.just
|
|
||||||
pkgs.clang
|
pkgs.clang
|
||||||
# CLI tools
|
# CLI tools
|
||||||
pkgs.fd
|
pkgs.fd
|
||||||
|
|
Loading…
Reference in a new issue