52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ];
|
|
|
|
options.me = {
|
|
python.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
example = true;
|
|
description = "Whether we want to install python.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.me.python.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
# (python3.withPackages (python-pkgs: [
|
|
# python-pkgs.distro # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
# python-pkgs.pyudev # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
# python-pkgs.systemd # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
# python-pkgs.packaging # For https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
|
|
# ]))
|
|
python3
|
|
poetry
|
|
pyright
|
|
isort
|
|
black
|
|
uv
|
|
];
|
|
|
|
environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) {
|
|
hideMounts = true;
|
|
users.talexander = {
|
|
directories = [
|
|
{
|
|
# Poetry virtual environments.
|
|
directory = ".cache/pypoetry";
|
|
user = "talexander";
|
|
group = "talexander";
|
|
mode = "0755";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|