mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
home-manager/programs/python: init
This commit is contained in:
parent
a5d8ae3e39
commit
8fa4d576f8
@ -4,6 +4,7 @@
|
||||
./programs/pipewire.nix
|
||||
./programs/pop-launcher.nix
|
||||
./programs/borgmatic.nix
|
||||
./programs/python.nix
|
||||
./services/archivebox.nix
|
||||
./services/borgbackup.nix
|
||||
./services/borgmatic.nix
|
||||
|
30
modules/home-manager/programs/python.nix
Normal file
30
modules/home-manager/programs/python.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.python;
|
||||
in
|
||||
{
|
||||
options.programs.python = {
|
||||
enable = lib.mkEnableOption "user-wide Python installation";
|
||||
package = lib.mkPackageOption pkgs "python3" { };
|
||||
modules = lib.mkOption {
|
||||
type = with lib.types; functionTo (listOf package);
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of Python modules to be included alongside the Python
|
||||
installation.
|
||||
'';
|
||||
example = lib.literalExpression ''
|
||||
ps: with ps; [
|
||||
jupyter
|
||||
];
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
(cfg.package.withPackages cfg.modules)
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user