{ 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 ( lib.mkMerge [ { 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 ])) poetry pyright isort black ]; environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) { hideMounts = true; users.talexander = { directories = [ { # Poetry virtual environments. directory = ".cache/pypoetry"; user = "talexander"; group = "talexander"; mode = "0755"; } ]; }; }; } ] ); }