Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -17,38 +17,35 @@
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
uv
|
||||
];
|
||||
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.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# Poetry virtual environments.
|
||||
directory = ".cache/pypoetry";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user