refactor: Fleet and sw behind mkIf guards
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
@@ -10,7 +12,11 @@
|
||||
# It reconstructs the terminfo database from the provided definition and
|
||||
# adds it to the system packages.
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.athenix.sw;
|
||||
|
||||
ghostty-terminfo = pkgs.runCommand "ghostty-terminfo" { } ''
|
||||
mkdir -p $out/share/terminfo
|
||||
cat > ghostty.info <<'EOF'
|
||||
@@ -99,5 +105,7 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ ghostty-terminfo ];
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ ghostty-terminfo ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,10 +18,27 @@ let
|
||||
cfg = config.athenix.sw.python;
|
||||
in
|
||||
{
|
||||
options.athenix.sw.python = {
|
||||
enable = mkEnableOption "Python development tools (pixi, uv)" // {
|
||||
default = true;
|
||||
options.athenix.sw.python = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enable Python development tools (pixi, uv).
|
||||
|
||||
Provides:
|
||||
- pixi: Fast, cross-platform package manager for Python
|
||||
- uv: Extremely fast Python package installer and resolver
|
||||
|
||||
These tools manage project-based dependencies rather than global
|
||||
Python packages, avoiding conflicts and improving reproducibility.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Python development environment configuration.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.athenix.sw;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
python3
|
||||
git
|
||||
(pkgs.writeShellScriptBin "update-ref" ''
|
||||
@@ -508,4 +520,5 @@
|
||||
printf " rev = %s\n" "$CUR_REV" >&2
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user