WIP: refactor

This commit is contained in:
2025-05-31 13:45:20 -07:00
parent 5116dd160d
commit f3aaac2f4d
13 changed files with 270 additions and 391 deletions

View File

@@ -1,6 +1,6 @@
{ ... }: {
imports = [
./mods
./opts
./workarounds
];
}

View File

@@ -1,5 +1,5 @@
{ ... }: {
imports = [
./kb-input.nix
./kb-input
];
}

View File

@@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
let
cfg = config.opts.desktop;
in
{
options = {
opts.desktop = {
enable = lib.mkEnableOption "desktop environment";
pipewire.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable pipewire for audio and screen sharing support";
};
};
};
}

View File

@@ -4,10 +4,10 @@
lib,
...
}: let
cfg = config.mods.kb-input;
cfg = config.opts.kb-input;
in {
options = {
mods.kb-input = {
opts.kb-input = {
enable = lib.mkEnableOption "input method and custom keyboard layout";
enableMinimak = lib.mkOption {
type = lib.types.bool;

View File

@@ -0,0 +1,73 @@
{ config, lib, pkgs, ... }:
let
cfg = config.opts.tools;
in
{
options = {
opts.tools = {
enable = lib.mkEnableOption "common tools";
ide.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "jetbrains and other visual IDEs";
};
dev.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "programming languages and environments";
};
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs;[
dust
eza
fastfetch
fd
helix
micro
openssl
ripgrep
starship
tealdeer
transcrypt
] ++
lib.optionals cfg.ide.enable [
# jetbrains.rust-rover
# jetbrains.goland
jetbrains.clion
jetbrains.idea-ultimate
jetbrains.pycharm-professional
jetbrains.webstorm
android-studio
zed-editor
] ++
lib.optionals cfg.dev.enable [
# Rust
rustup
# Python
python3
poetry
# Haskell
haskellPackages.ghc
haskellPackages.stack
# Node
nodejs_22
pnpm
bun
# Nix
nil
nixd
nixfmt-rfc-style
# Gleam
gleam
beamMinimal26Packages.erlang
];
};
}