Compare commits

..

10 Commits

Author SHA1 Message Date
Danilo Reyes
5872d59084 shell patch for nixremote
Some checks failed
Build on Push / build-configurations (push) Has been cancelled
runner-smoke / ubuntu-2404 (push) Has been cancelled
2026-03-23 12:56:28 -06:00
Danilo Reyes
98777a1935 qbit_manage fix 2026-03-22 23:12:50 -06:00
Danilo Reyes
23f2c7d564 fix deprecated pkgs.system 2026-03-20 17:42:19 -06:00
Danilo Reyes
0731933b14 codex skills + flake updatE 2026-03-20 17:39:31 -06:00
Danilo Reyes
b4ee7e7ebf stylix fix for vps 2026-03-19 04:33:53 -06:00
Danilo Reyes
684904a676 mac ssh authorize 2026-03-18 16:18:55 -06:00
Danilo Reyes
29bb85b5c9 darwin compatibility logic & darwin mcp 2026-03-18 15:58:19 -06:00
Danilo Reyes
9c6f17f113 rest of the split migration 2026-03-16 16:41:10 -06:00
Danilo Reyes
195c55891e host mac 2026-03-16 16:16:32 -06:00
Danilo Reyes
4f4c23d1df documentation regarding the new core functions 2026-03-16 15:50:14 -06:00
74 changed files with 1328 additions and 710 deletions

View File

@@ -1,2 +1,3 @@
prefix_rule(pattern=["deadnix", "-e"], decision="allow")
prefix_rule(pattern=["nix", "eval"], decision="allow")
prefix_rule(pattern=["nix", "develop", "path:.#nix", "--command", "bash", "-lc", "deadnix -e && nix run nixpkgs#nixfmt-tree && statix fix"], decision="allow")

View File

@@ -26,11 +26,11 @@
backupFileExtension = "hbckup";
useUserPackages = true;
useGlobalPkgs = true;
users.jawz = import ./home-manager.nix;
sharedModules = [ ../modules/home-manager.nix ];
extraSpecialArgs = {
inherit inputs outputs;
};
users.jawz = import ./home-manager.nix;
};
time = {
inherit (config.my) timeZone;

3
config/derek-home.nix Normal file
View File

@@ -0,0 +1,3 @@
_: {
home.stateVersion = "23.05";
}

View File

@@ -86,5 +86,4 @@ in
"games"
];
};
home-manager.users.bearded_dragonn.home.stateVersion = "23.05";
}

View File

@@ -3,15 +3,24 @@
config,
pkgs,
lib,
osConfig,
osConfig ? null,
preferredShell ? "zsh",
userEmail ? "danilo.reyes.251@proton.me",
...
}:
let
inherit (pkgs) fd fzf;
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
shellType = osConfig.my.shell.type;
commonInit = ''
pokemon-colorscripts = lib.attrByPath [
pkgs.stdenv.hostPlatform.system
"pokemon-colorscripts"
] null inputs.jawz-scripts.packages;
shellType = if osConfig == null then preferredShell else osConfig.my.shell.type;
stylixEnabled = if osConfig == null then false else lib.hasAttrByPath [ "my" "stylix" ] osConfig;
commonInit =
lib.optionalString (pokemon-colorscripts != null) ''
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
''
+ ''
export command_timeout=60
'';
commonAliases = inputs.self.lib.commonAliases // {
@@ -21,7 +30,13 @@ let
};
in
{
imports = [ ./jawz-home.nix ];
imports =
lib.optionals (osConfig != null) [
./jawz-home.nix
]
++ lib.optionals stylixEnabled [
./stylix-home.nix
];
home.stateVersion = "23.05";
programs = {
direnv = {
@@ -36,7 +51,7 @@ in
pull.rebase = true;
init.defaultBranch = "main";
user = {
inherit (osConfig.my) email;
email = if osConfig == null then userEmail else osConfig.my.email;
name = "Danilo Reyes";
};
};
@@ -60,7 +75,7 @@ in
};
zsh = lib.mkIf (shellType == "zsh") {
enable = true;
dotDir = ".config/zsh";
dotDir = "${config.xdg.configHome}/zsh";
shellAliases = commonAliases;
initContent = commonInit;
history = {
@@ -73,7 +88,7 @@ in
};
xdg = {
enable = true;
userDirs = {
userDirs = lib.mkIf pkgs.stdenv.isLinux {
enable = true;
createDirectories = false;
desktop = "${config.home.homeDirectory}";

View File

@@ -51,6 +51,7 @@ in
];
openssh.authorizedKeys.keyFiles = inputs.self.lib.getSshKeys [
"deacero"
"mac"
"workstation"
"server"
"miniserver"

41
config/stylix-home.nix Normal file
View File

@@ -0,0 +1,41 @@
{
config,
lib,
pkgs,
inputs,
osConfig,
...
}:
let
schemesFile = import ./schemes.nix {
inherit pkgs inputs;
};
scheme = schemesFile.schemes.paul;
cfg = osConfig.my.stylix;
gnomeEnabled = osConfig.services.desktopManager.gnome.enable;
in
{
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
enable = true;
iconTheme = {
name = "Papirus-Light";
package = pkgs.papirus-icon-theme.override {
color = "yellow";
};
};
};
stylix = {
inherit (cfg) enable;
autoEnable = cfg.enable;
iconTheme = {
enable = true;
package = scheme.iconPackage;
light = "Papirus-Light";
dark = "Papirus-Dark";
};
targets.librewolf = {
firefoxGnomeTheme.enable = true;
profileNames = [ config.home.username ];
};
};
}

View File

@@ -11,7 +11,6 @@ let
};
scheme = schemesFile.schemes.paul;
cfg = config.my.stylix;
gnomeEnabled = config.services.desktopManager.gnome.enable;
in
{
options.my.stylix = {
@@ -30,30 +29,5 @@ in
targets.qt.platform = lib.mkForce "qtct";
}
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.stylix.users (user: {
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
enable = true;
iconTheme = {
name = "Papirus-Light";
package = pkgs.papirus-icon-theme.override {
color = "yellow";
};
};
};
stylix = {
inherit (cfg) enable;
autoEnable = cfg.enable;
iconTheme = {
enable = true;
package = scheme.iconPackage;
light = "Papirus-Light";
dark = "Papirus-Dark";
};
targets.librewolf = {
firefoxGnomeTheme.enable = true;
profileNames = [ user ];
};
};
});
};
}

View File

@@ -7,8 +7,11 @@
## Repository Overview
- Architecture: Flake-based repo using `flake-parts` with inputs for pkgs (stable/unstable), stylix, home-manager, sops-nix, and service overlays. Common modules are composed through `parts/core.nix` and `parts/hosts.nix`.
- Host outputs: `parts/hosts.nix` publishes NixOS hosts through `flake.nixosConfigurations` and standalone Home Manager hosts through `flake.homeConfigurations`.
- Module auto-import: `modules/modules.nix` auto-imports legacy flat modules under `modules/apps`, `modules/dev`, `modules/scripts`, `modules/servers`, `modules/services`, `modules/shell`, `modules/websites`, and `modules/network`, excluding `librewolf.nix`, and also discovers nested `nixos.nix` files under those trees. `config/base.nix` registers `modules/home-manager.nix` as a Home Manager shared module, which discovers nested `home.nix` files under `modules/` for every Home Manager user. Factories live in `modules/factories/` (`mkserver`, `mkscript`), and shared options are in `modules/nix` and `modules/users`.
- Home Manager helper layer: Common Home Manager wrapper logic belongs in `parts/core.nix` helpers under `inputs.self.lib` when it is repeated across multiple `home.nix` modules. Current helpers include split-loader support plus `hmModule`, `hmShellType`, and `hmOnlyUser` for shared enablement and shell-selection patterns.
- Hosts and toggles: Host definitions live in `hosts/<name>/configuration.nix` with host-specific toggles in `hosts/<name>/toggles.nix`. The `my` namespace carries toggles for apps/dev/scripts/services/shell, feature flags like `enableProxy` and `enableContainers`, and per-host `interfaces` and `ips` maps.
- Standalone Home Manager hosts: Home-only hosts may live under `hosts/<name>/home.nix` with `hosts/<name>/toggles.nix`, and should only enable modules that have a `home.nix` surface or are otherwise known to be Home Manager-compatible on that platform.
- Port assignment: Service ports should live with the service module when the port is intrinsic to a server definition under `modules/servers/`. Miscellaneous or host-specific ports that do not belong to a server module should be centralized in `my.ports` in `modules/modules.nix` and referenced via `config.my.ports.*` (use `toString config.my.ports.*` where a string is required).
- Main server and proxies: `my.mainServer` selects the host that should serve traffic by default (default `vps`). Reverse proxies use helpers in `parts/core.nix` (`proxy`, `proxyReverse`, `proxyReverseFix`, `proxyReversePrivate`) and pick IPs from `my.ips` plus the hostName/ip set by `mkserver` options. Nginx defaults to `proxyReverse` for any server with `enableProxy = true` unless `useDefaultProxy = false` or the server is listed in the Fix/Private proxy lists.
- Secure hosts and secrets: `my.secureHost` gates SOPS secrets. Secure hosts load secrets from `secrets/*.yaml` and wireguard definitions; non-secure hosts (e.g., `hosts/emacs`) skip secret-dependent services. Default SOPS file is `secrets/secrets.yaml` via `config/base.nix`. Proxy-only services that need private certificates must still define their cert secrets when `enableProxy = true`.
@@ -49,8 +52,10 @@ config.services = {
## Module Categories and Active Hosts
- Module categories: apps, dev, scripts, servers, services, shell, websites, network, users, nix. Factories sit in `modules/factories/` and are imported explicitly; patch artifacts live at the repo root in `patches/`.
- Split-module preference: For categories that need both system and Home Manager behavior, co-locate both surfaces in `modules/<category>/<name>/nixos.nix` and `modules/<category>/<name>/home.nix`. Keep helpers local to that directory only when they are feature-specific; otherwise promote them into shared helpers/factories.
- Home module helper rule: Extract repeated Home Manager wrapper code into `parts/core.nix` once at least a few modules share the same structure. Keep only feature-specific package lists, files, and service settings inside each `home.nix`.
- User config split: Personal configs may also split across `config/<name>.nix` for NixOS-side account/secrets state and `config/<name>-home.nix` for Home Manager-only state imported from the user home module.
- Active hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`. Host roles and secure status are defined in `hosts/<name>/configuration.nix` and toggles in `hosts/<name>/toggles.nix`.
- Standalone Home Manager hosts: `mac` is a planned `aarch64-darwin` Home Manager target under `flake.homeConfigurations`, intended to reuse workstation-style dev and shell modules without Linux GUI app modules.
## Precedence and Conflict Resolution
- Precedence: This constitution is authoritative for AI. Human docs must be updated to match. If conflicts are found, align human docs to the constitution and log the resolution in `specs/001-ai-docs/research.md`.

View File

@@ -8,12 +8,13 @@
1. Create `modules/<category>/<name>/nixos.nix` for NixOS-only concerns such as `users.users`, `environment.systemPackages`, `services.*`, `programs.*`, firewall rules, and SOPS-backed system resources.
2. Create `modules/<category>/<name>/home.nix` for Home Manager concerns such as `programs.*`, `xdg.*`, `home.file.*`, `services.*` within Home Manager, and per-user shell aliases/config files.
3. Keep the toggle namespace aligned across both files so the same feature name remains recognizable. During migration, duplicate the option schema if needed rather than keeping Home Manager logic embedded in the NixOS module.
4. If the feature has truly shared logic, extract it into a local helper file within the feature directory or promote it into `modules/factories/` when reused across features.
4. If the feature has truly shared logic, extract it into a local helper file within the feature directory. If the same Home Manager wrapper pattern repeats across multiple features, promote that wrapper logic into `parts/core.nix` helpers instead of cloning the same `osConfig` and shell-selection code.
5. Remove the legacy flat module only after the paired files evaluate cleanly and all references are updated.
- Validation:
- `modules/modules.nix` discovers the features `nixos.nix`.
- `config/base.nix` registers `modules/home-manager.nix` in `home-manager.sharedModules`, and that loader discovers the features `home.nix`.
- System-only settings no longer reference `home-manager.users.*`.
- Home Manager settings no longer depend on `osConfig` unless that coupling is intentional and documented.
- Repeated HM wrapper logic uses shared helpers from `parts/core.nix` instead of being copied between modules.
- Outputs: Split module directory, retained toggle shape, and updated docs if the feature introduces new structure patterns.
- References: `docs/constitution.md` (Repository Overview, Terminology and Naming Standards, Maintenance Triggers), `docs/reference/index.md` (Module Directories, Auto-Import Rules)

View File

@@ -29,9 +29,19 @@
- Migration rule: Legacy flat `modules/<category>/<name>.nix` modules remain supported while features are moved into split directories.
- Implication: Place new dual-surface modules in a feature directory so NixOS and Home Manager stay adjacent; no manual import wiring is required unless adding a new factory.
## Home Manager Helpers
- Shared helper home: `parts/core.nix` exports reusable Home Manager helper functions through `inputs.self.lib`.
- Current helpers:
- `hmModule` → derive default HM enablement from `osConfig.my.<path>` and the current Home Manager username.
- `hmShellType` → resolve `bash` vs `zsh` consistently for HM modules with or without `osConfig`.
- `hmOnlyUser` → gate HM snippets to a specific username when a feature is intentionally user-specific.
- Usage rule: Use these helpers for repeated wrapper logic; keep feature-specific package sets and config payloads in local `common.nix` or `home.nix` files.
## Hosts and Roles
- Configs: `hosts/<name>/configuration.nix` with toggles in `hosts/<name>/toggles.nix`.
- Active hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`.
- NixOS configs: `hosts/<name>/configuration.nix` with toggles in `hosts/<name>/toggles.nix`.
- Standalone Home Manager configs: `hosts/<name>/home.nix` with optional toggles in `hosts/<name>/toggles.nix`.
- Active NixOS hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`.
- Active Home Manager hosts: `mac`.
- Roles:
- workstation: developer desktop; provides build power for distributed builds.
- server: primary services host; runs most services and WireGuard targets.
@@ -39,8 +49,15 @@
- galaxy: small server variant using nixpkgs-small.
- emacs: VM profile, `my.secureHost = false` for secret-free usage.
- vps: Linode VPS image target, secure host with enrollment-based secrets.
- mac: planned standalone `aarch64-darwin` Home Manager target for dev and shell tooling.
- Network maps: `my.ips` and `my.interfaces` declared in `modules/modules.nix`; host toggles may override.
## Home Configuration Outputs
- NixOS outputs: `flake.nixosConfigurations.<name>` for Linux system hosts.
- Home Manager outputs: `flake.homeConfigurations.<name>` for standalone HM hosts.
- Current standalone HM example: `homeConfigurations.mac`.
- Validation note: Darwin home configurations can be evaluated from Linux, but their activation packages cannot be realized locally on a Linux builder.
## Proxy, Firewall, and Networking
- Proxy enablement: `my.enableProxy` toggles Nginx reverse proxy; assertions require at least one `my.servers.*.enableProxy` when enabled.
- Proxy helpers: use `parts/core.nix` helpers (`proxy`, `proxyReverse`, `proxyReverseFix` for header preservation, `proxyReversePrivate` for mutual TLS). `mkserver` supplies `host`, `ip`, `url`, `enableProxy`, and `useDefaultProxy`.

View File

@@ -0,0 +1,113 @@
{
pkgs,
config,
...
}:
let
mod = "SUPER";
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
waybarStyle = import ./waybar-style.nix { inherit config; };
in
{
programs = {
wofi = {
enable = true;
settings = {
allow_images = true;
allow_markup = true;
insensitive = true;
width = "30%";
};
};
waybar = waybarConfig.programs.waybar // {
style = waybarStyle;
};
};
wayland.windowManager.hyprland = {
enable = true;
settings = {
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 3;
layout = "dwindle";
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
force_default_wallpaper = 0;
};
dwindle = {
pseudotile = true;
preserve_split = true;
force_split = 2;
};
bind = [
"${mod}, return, exec, ghostty"
"${mod}, Q, killactive,"
"${mod} SHIFT, F, togglefloating,"
"${mod}, F, fullscreen,"
"${mod}, T, pin,"
"${mod}, G, togglegroup,"
"${mod}, bracketleft, changegroupactive, b"
"${mod}, bracketright, changegroupactive, f"
"${mod}, S, exec, wofi --show drun icons"
"${mod}, P, pin, active"
"${mod}, left, movefocus, l"
"${mod}, right, movefocus, r"
"${mod}, up, movefocus, u"
"${mod}, down, movefocus, d"
"${mod}, h, movefocus, l"
"${mod}, l, movefocus, r"
"${mod}, k, movefocus, u"
"${mod}, j, movefocus, d"
"${mod} SHIFT, left, movewindow, l"
"${mod} SHIFT, right, movewindow, r"
"${mod} SHIFT, up, movewindow, u"
"${mod} SHIFT, down, movewindow, d"
"${mod} SHIFT, h, movewindow, l"
"${mod} SHIFT, l, movewindow, r"
"${mod} SHIFT, k, movewindow, u"
"${mod} SHIFT, j, movewindow, d"
"${mod}, 1, workspace, 1"
"${mod}, 2, workspace, 2"
"${mod}, 3, workspace, 3"
"${mod}, 4, workspace, 4"
"${mod}, 5, workspace, 5"
"${mod}, 6, workspace, 6"
"${mod}, 7, workspace, 7"
"${mod}, 8, workspace, 8"
"${mod}, 9, workspace, 9"
"${mod}, 0, workspace, 10"
"${mod} SHIFT, 1, movetoworkspace, 1"
"${mod} SHIFT, 2, movetoworkspace, 2"
"${mod} SHIFT, 3, movetoworkspace, 3"
"${mod} SHIFT, 4, movetoworkspace, 4"
"${mod} SHIFT, 5, movetoworkspace, 5"
"${mod} SHIFT, 6, movetoworkspace, 6"
"${mod} SHIFT, 7, movetoworkspace, 7"
"${mod} SHIFT, 8, movetoworkspace, 8"
"${mod} SHIFT, 9, movetoworkspace, 9"
"${mod} SHIFT, 0, movetoworkspace, 10"
"${mod}, F3, exec, grimblast save area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
"${mod} SHIFT, F3, exec, grimblast save screen ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
];
binde = [
"${mod} SHIFT, h, moveactive, -20 0"
"${mod} SHIFT, l, moveactive, 20 0"
"${mod} SHIFT, k, moveactive, 0 -20"
"${mod} SHIFT, j, moveactive, 0 20"
"${mod} CTRL, l, resizeactive, 30 0"
"${mod} CTRL, h, resizeactive, -30 0"
"${mod} CTRL, k, resizeactive, 0 -10"
"${mod} CTRL, j, resizeactive, 0 10"
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
];
bindm = [
"${mod}, mouse:272, movewindow"
"${mod}, mouse:273, resizewindow"
];
};
};
}

View File

@@ -1,13 +1,7 @@
{
pkgs,
config,
...
}:
let
mod = "SUPER";
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
waybarStyle = import ./waybar-style.nix { inherit config; };
in
{
programs.hyprland.enable = true;
services.greetd = {
@@ -19,119 +13,16 @@ in
};
users.users.jawz.packages = builtins.attrValues {
inherit (pkgs)
# Wayland utilities
wl-clipboard-rs
wf-recorder
grimblast # screenshots
mako # notification daemon
libnotify # dependency of mako
swaylock-effects # screen locker
yazi # file manager
imv # images
playerctl # media player control
grimblast
mako
libnotify
swaylock-effects
yazi
imv
playerctl
;
};
home-manager.users.jawz = {
programs = {
wofi = {
enable = true;
settings = {
allow_images = true;
allow_markup = true;
insensitive = true;
width = "30%";
};
};
waybar = waybarConfig.programs.waybar // {
style = waybarStyle;
};
};
wayland.windowManager.hyprland = {
enable = true;
settings = {
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 3;
layout = "dwindle";
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
force_default_wallpaper = 0;
};
dwindle = {
pseudotile = true;
preserve_split = true;
force_split = 2;
};
bind = [
"${mod}, return, exec, ghostty"
"${mod}, Q, killactive,"
"${mod} SHIFT, F, togglefloating,"
"${mod}, F, fullscreen,"
"${mod}, T, pin,"
"${mod}, G, togglegroup,"
"${mod}, bracketleft, changegroupactive, b"
"${mod}, bracketright, changegroupactive, f"
"${mod}, S, exec, wofi --show drun icons"
"${mod}, P, pin, active"
"${mod}, left, movefocus, l"
"${mod}, right, movefocus, r"
"${mod}, up, movefocus, u"
"${mod}, down, movefocus, d"
"${mod}, h, movefocus, l"
"${mod}, l, movefocus, r"
"${mod}, k, movefocus, u"
"${mod}, j, movefocus, d"
"${mod} SHIFT, left, movewindow, l"
"${mod} SHIFT, right, movewindow, r"
"${mod} SHIFT, up, movewindow, u"
"${mod} SHIFT, down, movewindow, d"
"${mod} SHIFT, h, movewindow, l"
"${mod} SHIFT, l, movewindow, r"
"${mod} SHIFT, k, movewindow, u"
"${mod} SHIFT, j, movewindow, d"
"${mod}, 1, workspace, 1"
"${mod}, 2, workspace, 2"
"${mod}, 3, workspace, 3"
"${mod}, 4, workspace, 4"
"${mod}, 5, workspace, 5"
"${mod}, 6, workspace, 6"
"${mod}, 7, workspace, 7"
"${mod}, 8, workspace, 8"
"${mod}, 9, workspace, 9"
"${mod}, 0, workspace, 10"
"${mod} SHIFT, 1, movetoworkspace, 1"
"${mod} SHIFT, 2, movetoworkspace, 2"
"${mod} SHIFT, 3, movetoworkspace, 3"
"${mod} SHIFT, 4, movetoworkspace, 4"
"${mod} SHIFT, 5, movetoworkspace, 5"
"${mod} SHIFT, 6, movetoworkspace, 6"
"${mod} SHIFT, 7, movetoworkspace, 7"
"${mod} SHIFT, 8, movetoworkspace, 8"
"${mod} SHIFT, 9, movetoworkspace, 9"
"${mod} SHIFT, 0, movetoworkspace, 10"
"${mod}, F3, exec, grimblast save area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
"${mod} SHIFT, F3, exec, grimblast save screen ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
];
binde = [
"${mod} SHIFT, h, moveactive, -20 0"
"${mod} SHIFT, l, moveactive, 20 0"
"${mod} SHIFT, k, moveactive, 0 -20"
"${mod} SHIFT, j, moveactive, 0 20"
"${mod} CTRL, l, resizeactive, 30 0"
"${mod} CTRL, h, resizeactive, -30 0"
"${mod} CTRL, k, resizeactive, 0 -10"
"${mod} CTRL, j, resizeactive, 0 10"
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
];
bindm = [
"${mod}, mouse:272, movewindow"
"${mod}, mouse:273, resizewindow"
];
};
};
};
home-manager.users.jawz.imports = [ ./hyprland-home.nix ];
}

144
flake.lock generated
View File

@@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1772292445,
"narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=",
"lastModified": 1773436376,
"narHash": "sha256-OUPRrprbgN27BXHuWkMAPSCfLLQ/uwpWghEfKYN2iAg=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f",
"rev": "43f10d24391692bba3d762931ee35e7f17f8e8b8",
"type": "github"
},
"original": {
@@ -270,11 +270,11 @@
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"lastModified": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
@@ -420,11 +420,11 @@
]
},
"locked": {
"lastModified": 1770726378,
"narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=",
"lastModified": 1772893680,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
"type": "github"
},
"original": {
@@ -503,11 +503,11 @@
]
},
"locked": {
"lastModified": 1772633058,
"narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=",
"lastModified": 1773963144,
"narHash": "sha256-WzBOBfSay3GYilUfKaUa1Mbf8/jtuAiJIedx7fWuIX4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865",
"rev": "a91b3ea73a765614d90360580b689c48102d1d33",
"type": "github"
},
"original": {
@@ -533,11 +533,11 @@
]
},
"locked": {
"lastModified": 1753964049,
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"lastModified": 1772461003,
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7",
"type": "github"
},
"original": {
@@ -562,11 +562,11 @@
]
},
"locked": {
"lastModified": 1770511807,
"narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=",
"lastModified": 1772461523,
"narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "7c75487edd43a71b61adb01cae8326d277aab683",
"rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804",
"type": "github"
},
"original": {
@@ -594,11 +594,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1772723663,
"narHash": "sha256-OKaOxpeK42A0QdlUkl68/4l32EZzQRHjKzBHXI3Q2a8=",
"lastModified": 1774029157,
"narHash": "sha256-OGtXRftdimLDExxD7MGmg1IGY0b3Pmqdm61fbZkt6dk=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "ae9ca17b40e04cd11b53b82e9292d3070710df18",
"rev": "8726a7363eb9213235e6e23657668e0daac39a5b",
"type": "github"
},
"original": {
@@ -640,11 +640,11 @@
]
},
"locked": {
"lastModified": 1767023960,
"narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=",
"lastModified": 1772467975,
"narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660",
"rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507",
"type": "github"
},
"original": {
@@ -665,11 +665,11 @@
]
},
"locked": {
"lastModified": 1765214753,
"narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
"lastModified": 1772460177,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
"type": "github"
},
"original": {
@@ -694,11 +694,11 @@
]
},
"locked": {
"lastModified": 1771866172,
"narHash": "sha256-fYFoXhQLrm1rD8vSFKQBOEX4OGCuJdLt1amKfHd5GAw=",
"lastModified": 1772459629,
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "0b219224910e7642eb0ed49f0db5ec3d008e3e41",
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
"type": "github"
},
"original": {
@@ -746,11 +746,11 @@
]
},
"locked": {
"lastModified": 1764592794,
"narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
"lastModified": 1772462885,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
"type": "github"
},
"original": {
@@ -771,11 +771,11 @@
]
},
"locked": {
"lastModified": 1771271487,
"narHash": "sha256-41gEiUS0Pyw3L/ge1l8MXn61cK14VAhgWB/JV8s/oNI=",
"lastModified": 1773948364,
"narHash": "sha256-S76omfIVQ1TpGiXFbqih6o6XcH3sA5+5QI+SXB4HvlY=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "340a792e3b3d482c4ae5f66d27a9096bdee6d76d",
"rev": "b85b779e3e3a1adcd9b098e3447cf48f9e780b35",
"type": "github"
},
"original": {
@@ -796,11 +796,11 @@
]
},
"locked": {
"lastModified": 1770501770,
"narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=",
"lastModified": 1772459835,
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40",
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
"type": "github"
},
"original": {
@@ -825,11 +825,11 @@
]
},
"locked": {
"lastModified": 1771606233,
"narHash": "sha256-F3PLUqQ/TwgR70U+UeOqJnihJZ2EuunzojYC4g5xHr0=",
"lastModified": 1773074819,
"narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "06c7f1f8c4194786c8400653c4efc49dc14c0f3a",
"rev": "f68afd0e73687598cc2774804fedad76693046f0",
"type": "github"
},
"original": {
@@ -888,11 +888,11 @@
]
},
"locked": {
"lastModified": 1772678126,
"narHash": "sha256-MZVqAmjcTmicg4WP2SxtNksUXS6tigY+EwBatLxc1bM=",
"lastModified": 1774013813,
"narHash": "sha256-gaKNu+dW6lA4LU8PM4pNqmaqoY8hIggM7ticP6VjVFk=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "aa9ba54128d03151f11e96b3213b3791a5496fe5",
"rev": "342bd5c65526d57b7bed200c8219d1a48414c806",
"type": "github"
},
"original": {
@@ -934,11 +934,11 @@
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"lastModified": 1772328832,
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
"type": "github"
},
"original": {
@@ -967,11 +967,11 @@
},
"nixpkgs-small": {
"locked": {
"lastModified": 1772732736,
"narHash": "sha256-I7VdClhEh24q/CEPXmVXDOtNHlLuivsjCuRZBMZI3fo=",
"lastModified": 1773996037,
"narHash": "sha256-GzJ5WVh+cK4dNCD6dHvLWgUag0K0a/1ndIvi5rBMXgo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d577c8cbee801f339ce4b127ae3ec37392250d07",
"rev": "04c412cbb2d7729f958be27ba86298bf9e9da9d6",
"type": "github"
},
"original": {
@@ -983,11 +983,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1772963539,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
@@ -999,11 +999,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1772598333,
"narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
"lastModified": 1773814637,
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
"type": "github"
},
"original": {
@@ -1042,11 +1042,11 @@
]
},
"locked": {
"lastModified": 1772745558,
"narHash": "sha256-pVmX5Z0PLUZIL7TFcfYyWNqEKDVf72bAz0PORyNQHSQ=",
"lastModified": 1774043868,
"narHash": "sha256-enrOdHXWwAiHxr8XQ85DsbxQys99F7AHe43uQeREMQw=",
"owner": "nix-community",
"repo": "nur",
"rev": "361709a61eebc0b1783dd478677b7ac4e1efa0a2",
"rev": "94f53d62e97c801214d26bda793410260f8d34b3",
"type": "github"
},
"original": {
@@ -1090,11 +1090,11 @@
]
},
"locked": {
"lastModified": 1772024342,
"narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=",
"lastModified": 1772893680,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
"type": "github"
},
"original": {
@@ -1172,11 +1172,11 @@
]
},
"locked": {
"lastModified": 1772495394,
"narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=",
"lastModified": 1773889674,
"narHash": "sha256-+ycaiVAk3MEshJTg35cBTUa0MizGiS+bgpYw/f8ohkg=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff",
"rev": "29b6519f3e0780452bca0ac0be4584f04ac16cc5",
"type": "github"
},
"original": {
@@ -1206,11 +1206,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1771788390,
"narHash": "sha256-RzBpBwn93GWxLjacTte+ngwwg0L/BVOg4G/sSIeK3Rw=",
"lastModified": 1773790548,
"narHash": "sha256-6lI+ZM1yWL4cNRT39s8AUC+kwq237PZCrWc1ubLOwqc=",
"owner": "danth",
"repo": "stylix",
"rev": "ebb238f14d6f930068be4718472da3105fd5d3bf",
"rev": "e8ffdddd42062ebc90178db9d013aa38c20b7b2f",
"type": "github"
},
"original": {
@@ -1472,11 +1472,11 @@
]
},
"locked": {
"lastModified": 1761431178,
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
"lastModified": 1772669058,
"narHash": "sha256-XhnY0aRuDo5LT8pmJVPofPOgO2hAR7T+XRoaQxtNPzQ=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
"rev": "906d0ac159803a7df2dc1f948df9327670380f69",
"type": "github"
},
"original": {

22
hosts/mac/home.nix Normal file
View File

@@ -0,0 +1,22 @@
{
inputs,
pkgs,
...
}:
{
home = {
username = "carlosdaniloreyesmartinez";
homeDirectory = "/Users/carlosdaniloreyesmartinez";
packages = [ pkgs.google-cloud-sdk ];
};
programs = {
starship.enable = true;
kitty = {
enable = true;
shellIntegration.enableBashIntegration = false;
shellIntegration.enableZshIntegration = true;
settings.term = "xterm-256color";
};
};
my = import ./toggles.nix { inherit inputs; };
}

17
hosts/mac/toggles.nix Normal file
View File

@@ -0,0 +1,17 @@
{ inputs }:
let
inherit (inputs.self.lib) mkEnabled enableList;
in
{
emacs.enable = true;
dev = enableList mkEnabled [
"nix"
"python"
"sh"
];
shell = enableList mkEnabled [
"exercism"
"multimedia"
"tools"
];
}

View File

@@ -130,7 +130,7 @@ in
claude-code
claude-monitor
;
inherit (inputs.clip-tools.packages.${pkgs.system})
inherit (inputs.clip-tools.packages.${pkgs.stdenv.hostPlatform.system})
clip-thumbnailer
;
};

View File

@@ -1,44 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
clang # C/C++ compiler frontend (part of LLVM)
clang-tools # Extra LLVM tools (e.g. clang-tidy, clang-apply-replacements)
gcc # GNU Compiler Collection (C, C++, etc.)
gdb # GNU Debugger
valgrind # Memory leak detector and performance profiler
;
};
in
{
options = {
my.dev.cc = {
enable = lib.mkEnableOption "Install C/C++ tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install C/C++ packages for";
};
};
devShells.cc = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "cc-dev-shell";
shellHook = ''
echo "🔧 C/C++ dev environment"
'';
};
description = "C/C++ development shell";
};
};
config = lib.mkIf config.my.dev.cc.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.cc.users { inherit packages; };
};
}

22
modules/dev/cc/common.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
clang
clang-tools
gcc
gdb
valgrind
;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "cc-dev-shell";
shellHook = ''
echo "🔧 C/C++ dev environment"
'';
};
}

34
modules/dev/cc/home.nix Normal file
View File

@@ -0,0 +1,34 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"cc"
];
};
cfg = config.my.dev.cc;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.cc.enable = lib.mkEnableOption "Install C/C++ tooling globally";
config = lib.mkMerge [
{
my.dev.cc.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
})
];
}

27
modules/dev/cc/nixos.nix Normal file
View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.cc = {
enable = lib.mkEnableOption "Install C/C++ tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install C/C++ packages for";
};
};
devShells.cc = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "C/C++ development shell";
};
};
}

View File

@@ -1,46 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
dockfmt # Format Dockerfiles
dockerfile-language-server # LSP for Dockerfiles
;
};
in
{
options = {
my.dev.docker = {
enable = lib.mkEnableOption "Install Docker tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Docker packages for";
};
};
devShells.docker = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "docker-dev-shell";
shellHook = ''
echo "🐳 Docker dev environment"
'';
};
description = "Docker and Dockerfile tooling shell";
};
};
config = lib.mkMerge [
(lib.mkIf config.my.dev.docker.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.docker.users { inherit packages; };
})
{
environment.variables.DOCKER_CONFIG = "\${XDG_CONFIG_HOME}/docker";
}
];
}

View File

@@ -0,0 +1,19 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
dockfmt
dockerfile-language-server
;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "docker-dev-shell";
shellHook = ''
echo "🐳 Docker dev environment"
'';
};
}

View File

@@ -0,0 +1,35 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"docker"
];
};
cfg = config.my.dev.docker;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.docker.enable = lib.mkEnableOption "Install Docker tooling globally";
config = lib.mkMerge [
{
my.dev.docker.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables.DOCKER_CONFIG = "${config.xdg.configHome}/docker";
})
];
}

View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.docker = {
enable = lib.mkEnableOption "Install Docker tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Docker packages for";
};
};
devShells.docker = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Docker and Dockerfile tooling shell";
};
};
}

View File

@@ -5,13 +5,32 @@
emacsExtraConfig,
emacsExtraPackages,
}:
{
packages = builtins.attrValues {
inherit (pkgs.xorg) xwininfo;
let
clipboardPackages =
if pkgs.stdenv.isDarwin then
builtins.attrValues {
inherit (pkgs) pngpaste;
}
else
builtins.attrValues {
inherit (pkgs)
xdotool
xclip
wl-clipboard-rs
;
};
linuxWindowPackages = lib.optionals pkgs.stdenv.isLinux (
builtins.attrValues {
inherit (pkgs.xorg) xwininfo;
inherit (pkgs) xdotool;
}
);
in
{
packages =
linuxWindowPackages
++ clipboardPackages
++ builtins.attrValues {
inherit (pkgs)
fd
fzf
ripgrep

View File

@@ -7,7 +7,7 @@
...
}:
let
shellType = inputs.self.lib.hmShellType config osConfig;
shellType = inputs.self.lib.hmShellType osConfig "zsh";
hm = inputs.self.lib.hmModule {
inherit
config
@@ -39,7 +39,7 @@ in
"doom/templates/programming.org".source = ../../../dotfiles/doom/templates/programming.org;
};
services = {
lorri.enable = true;
lorri.enable = pkgs.stdenv.isLinux;
emacs = {
enable = true;
defaultEditor = true;

View File

@@ -1,52 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
go # Go compiler and core toolchain
gocode-gomod # Code completion for Go (modern fork of gocode)
gotools # Contains godoc, gorename, goimports, etc.
gore # Go REPL
gotests # Generate Go tests from function signatures
gomodifytags # Struct tag manipulation
golangci-lint # Linter aggregation
;
};
GOPATH = "\${XDG_DATA_HOME}/go";
in
{
options = {
my.dev.go = {
enable = lib.mkEnableOption "Install Go tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Go packages for";
};
};
devShells.go = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages GOPATH;
name = "go-dev-shell";
shellHook = ''
echo "🐹 Go dev environment"
'';
};
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
};
};
config = lib.mkMerge [
{
environment.variables = { inherit GOPATH; };
}
(lib.mkIf config.my.dev.go.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.go.users { inherit packages; };
})
];
}

25
modules/dev/go/common.nix Normal file
View File

@@ -0,0 +1,25 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
go
gocode-gomod
gotools
gore
gotests
gomodifytags
golangci-lint
;
};
GOPATH = "\${XDG_DATA_HOME:-\$HOME/.local/share}/go";
in
{
inherit packages GOPATH;
devShell = pkgs.mkShell {
inherit packages GOPATH;
name = "go-dev-shell";
shellHook = ''
echo "🐹 Go dev environment"
'';
};
}

35
modules/dev/go/home.nix Normal file
View File

@@ -0,0 +1,35 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"go"
];
};
cfg = config.my.dev.go;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.go.enable = lib.mkEnableOption "Install Go tooling globally";
config = lib.mkMerge [
{
my.dev.go.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables.GOPATH = "${config.xdg.dataHome}/go";
})
];
}

27
modules/dev/go/nixos.nix Normal file
View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.go = {
enable = lib.mkEnableOption "Install Go tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Go packages for";
};
};
devShells.go = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
};
};
}

View File

@@ -1,54 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
haskell-language-server # LSP server for Haskell
cabal-install # Standard Haskell build tool
hlint # Linter for Haskell source code
;
inherit (pkgs.haskellPackages)
hoogle # Haskell API search engine
;
};
in
{
options = {
my.dev.haskell = {
enable = lib.mkEnableOption "Install Haskell tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Haskell packages for";
};
};
devShells.haskell = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "haskell-dev-shell";
shellHook = ''
echo "λ Haskell dev environment"
'';
};
description = "Haskell development shell";
};
};
config = lib.mkMerge [
(lib.mkIf config.my.dev.haskell.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.haskell.users { inherit packages; };
})
{
environment.variables = {
CABAL_DIR = "\${XDG_CACHE_HOME}/cabal";
STACK_ROOT = "\${XDG_DATA_HOME}/stack";
GHCUP_USE_XDG_DIRS = "true";
};
}
];
}

View File

@@ -0,0 +1,23 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
haskell-language-server
cabal-install
hlint
;
inherit (pkgs.haskellPackages)
hoogle
;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "haskell-dev-shell";
shellHook = ''
echo "λ Haskell dev environment"
'';
};
}

View File

@@ -0,0 +1,39 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"haskell"
];
};
cfg = config.my.dev.haskell;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.haskell.enable = lib.mkEnableOption "Install Haskell tooling globally";
config = lib.mkMerge [
{
my.dev.haskell.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables = {
CABAL_DIR = "${config.xdg.cacheHome}/cabal";
STACK_ROOT = "${config.xdg.dataHome}/stack";
GHCUP_USE_XDG_DIRS = "true";
};
})
];
}

View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.haskell = {
enable = lib.mkEnableOption "Install Haskell tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Haskell packages for";
};
};
devShells.haskell = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Haskell development shell";
};
};
}

View File

@@ -0,0 +1,16 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs) julia;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "julia-dev-shell";
shellHook = ''
echo "🔬 Julia dev environment"
'';
};
}

View File

@@ -0,0 +1,34 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"julia"
];
};
cfg = config.my.dev.julia;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.julia.enable = lib.mkEnableOption "Install Julia globally";
config = lib.mkMerge [
{
my.dev.julia.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
})
];
}

View File

@@ -6,9 +6,7 @@
...
}:
let
packages = builtins.attrValues {
inherit (pkgs) julia; # High-performance dynamic language for technical computing
};
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
@@ -22,17 +20,8 @@ in
};
devShells.julia = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "julia-dev-shell";
shellHook = ''
echo "🔬 Julia dev environment"
'';
};
default = feature.devShell;
description = "Julia development shell";
};
};
config = lib.mkIf config.my.dev.julia.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.julia.users { inherit packages; };
};
}

View File

@@ -0,0 +1,18 @@
{ pkgs, inputs }:
let
packages = [
pkgs.codex
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.nixos-mcp
];
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "mcp-dev-shell";
shellHook = ''
export CODEX_HOME=$PWD/.codex
echo "MCP shell ready: codex + nixos-mcp"
'';
};
}

34
modules/dev/mcp/home.nix Normal file
View File

@@ -0,0 +1,34 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"mcp"
];
};
cfg = config.my.dev.mcp;
feature = import ./common.nix { inherit pkgs inputs; };
in
{
options.my.dev.mcp.enable = lib.mkEnableOption "Install MCP tooling globally";
config = lib.mkMerge [
{
my.dev.mcp.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
})
];
}

View File

@@ -6,10 +6,7 @@
...
}:
let
packages = [
pkgs.codex
inputs.self.packages.${pkgs.system}.nixos-mcp
];
feature = import ./common.nix { inherit pkgs inputs; };
in
{
options = {
@@ -23,18 +20,8 @@ in
};
devShells.mcp = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "MCP dev shell for this repo";
default = pkgs.mkShell {
inherit packages;
name = "mcp-dev-shell";
shellHook = ''
export CODEX_HOME=$PWD/.codex
echo "MCP shell ready: codex + nixos-mcp"
'';
};
};
};
config = lib.mkIf config.my.dev.mcp.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.mcp.users { inherit packages; };
};
}

View File

@@ -7,7 +7,7 @@
...
}:
let
shellType = inputs.self.lib.hmShellType config osConfig;
shellType = inputs.self.lib.hmShellType osConfig "zsh";
hm = inputs.self.lib.hmModule {
inherit
config

View File

@@ -1,48 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs) ruby; # Ruby interpreter
inherit (pkgs.rubyPackages) solargraph; # LSP for Ruby
};
in
{
options = {
my.dev.ruby = {
enable = lib.mkEnableOption "Install Ruby tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Ruby packages for";
};
};
devShells.ruby = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "ruby-dev-shell";
shellHook = ''
echo "💎 Ruby dev environment"
'';
};
description = "Ruby development shell with interpreter and Solargraph LSP";
};
};
config = lib.mkMerge [
(lib.mkIf config.my.dev.ruby.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.ruby.users { inherit packages; };
})
{
environment.variables = {
GEM_HOME = "\${XDG_DATA_HOME}/ruby/gems";
GEM_PATH = "\${XDG_DATA_HOME}/ruby/gems";
GEM_SPEC_CACHE = "\${XDG_DATA_HOME}/ruby/specs";
};
}
];
}

View File

@@ -0,0 +1,17 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs) ruby;
inherit (pkgs.rubyPackages) solargraph;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "ruby-dev-shell";
shellHook = ''
echo "💎 Ruby dev environment"
'';
};
}

39
modules/dev/ruby/home.nix Normal file
View File

@@ -0,0 +1,39 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"ruby"
];
};
cfg = config.my.dev.ruby;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.ruby.enable = lib.mkEnableOption "Install Ruby tooling globally";
config = lib.mkMerge [
{
my.dev.ruby.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables = {
GEM_HOME = "${config.xdg.dataHome}/ruby/gems";
GEM_PATH = "${config.xdg.dataHome}/ruby/gems";
GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs";
};
})
];
}

View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.ruby = {
enable = lib.mkEnableOption "Install Ruby tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Ruby packages for";
};
};
devShells.ruby = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Ruby development shell with interpreter and Solargraph LSP";
};
};
}

View File

@@ -1,49 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
rustc # Rust compiler
cargo # Rust package manager
rust-analyzer # Language server for Rust
clippy # Linter for Rust
rustfmt # Formatter for Rust code
;
};
in
{
options = {
my.dev.rust = {
enable = lib.mkEnableOption "Install Rust tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Rust packages for";
};
};
devShells.rust = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "rust-dev-shell";
shellHook = ''
echo "🦀 Rust dev environment"
'';
};
description = "Rust development shell with cargo and rust-analyzer";
};
};
config = lib.mkMerge [
(lib.mkIf config.my.dev.rust.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.rust.users { inherit packages; };
})
{
environment.variables.CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
}
];
}

View File

@@ -0,0 +1,22 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
rustc
cargo
rust-analyzer
clippy
rustfmt
;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "rust-dev-shell";
shellHook = ''
echo "🦀 Rust dev environment"
'';
};
}

35
modules/dev/rust/home.nix Normal file
View File

@@ -0,0 +1,35 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"rust"
];
};
cfg = config.my.dev.rust;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.rust.enable = lib.mkEnableOption "Install Rust tooling globally";
config = lib.mkMerge [
{
my.dev.rust.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
})
];
}

View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.rust = {
enable = lib.mkEnableOption "Install Rust tooling globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install Rust packages for";
};
};
devShells.rust = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Rust development shell with cargo and rust-analyzer";
};
};
}

View File

@@ -1,43 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
shellcheck # Shell script linter
shfmt # Shell parser and formatter
;
# LSP for Bash and sh
inherit (pkgs.nodePackages) bash-language-server;
};
in
{
options = {
my.dev.sh = {
enable = lib.mkEnableOption "Install shell scripting tools globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install shell scripting packages for";
};
};
devShells.sh = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "sh-dev-shell";
shellHook = ''
echo "💻 Shell scripting dev environment"
'';
};
description = "Shell scripting dev shell";
};
};
config = lib.mkIf config.my.dev.sh.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.sh.users { inherit packages; };
};
}

20
modules/dev/sh/common.nix Normal file
View File

@@ -0,0 +1,20 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
shellcheck
shfmt
;
inherit (pkgs.nodePackages) bash-language-server;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "sh-dev-shell";
shellHook = ''
echo "💻 Shell scripting dev environment"
'';
};
}

34
modules/dev/sh/home.nix Normal file
View File

@@ -0,0 +1,34 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"sh"
];
};
cfg = config.my.dev.sh;
sh = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.sh.enable = lib.mkEnableOption "Install shell scripting tools globally";
config = lib.mkMerge [
{
my.dev.sh.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = sh.packages;
})
];
}

27
modules/dev/sh/nixos.nix Normal file
View File

@@ -0,0 +1,27 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
sh = import ./common.nix { inherit pkgs; };
in
{
options = {
my.dev.sh = {
enable = lib.mkEnableOption "Install shell scripting tools globally";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.dev;
description = "Users to install shell scripting packages for";
};
};
devShells.sh = lib.mkOption {
type = lib.types.package;
default = sh.devShell;
description = "Shell scripting dev shell";
};
};
}

View File

@@ -0,0 +1,19 @@
{ pkgs }:
let
packages = builtins.attrValues {
inherit (pkgs)
zig
zls
;
};
in
{
inherit packages;
devShell = pkgs.mkShell {
inherit packages;
name = "zig-dev-shell";
shellHook = ''
echo "🦎 Zig dev environment"
'';
};
}

34
modules/dev/zig/home.nix Normal file
View File

@@ -0,0 +1,34 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"zig"
];
};
cfg = config.my.dev.zig;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.zig.enable = lib.mkEnableOption "Install Zig tooling globally";
config = lib.mkMerge [
{
my.dev.zig.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
})
];
}

View File

@@ -6,12 +6,7 @@
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
zig # Zig compiler and stdlib
zls # Language server for Zig
;
};
feature = import ./common.nix { inherit pkgs; };
in
{
options = {
@@ -25,17 +20,8 @@ in
};
devShells.zig = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "zig-dev-shell";
shellHook = ''
echo "🦎 Zig dev environment"
'';
};
default = feature.devShell;
description = "Zig development shell with compiler and LSP";
};
};
config = lib.mkIf config.my.dev.zig.enable {
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.zig.users { inherit packages; };
};
}

View File

@@ -7,7 +7,7 @@
...
}:
let
shellType = inputs.self.lib.hmShellType config osConfig;
shellType = inputs.self.lib.hmShellType osConfig "zsh";
enabled =
inputs.self.lib.hmOnlyUser config osConfig "jawz"
&& (osConfig.my.units.download.enable || osConfig.my.units.downloadManga.enable);

View File

@@ -52,6 +52,18 @@ in
config = lib.mkIf (config.my.servers.qbittorrent.enable && config.my.secureHost) {
my.network.firewall.additionalPorts = [ config.my.servers.qbittorrent.port ];
home-manager.users.jawz.xdg.dataFile.vuetorrent.source = vuetorrent;
home-manager.users.jawz.imports = [
({ lib, ... }: {
home.activation.qbittorrentAutorunCommand = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
conf=/home/jawz/.config/qBittorrent/qBittorrent.conf
if [ -f "$conf" ]; then
sed -i \
's|^program=.*$|program=${torrentCompletionScript} %F|' \
"$conf"
fi
'';
})
];
sops.secrets =
let
mkQbitSecret = file: mode: {
@@ -89,8 +101,8 @@ in
description = "Tidy up my torrents";
wantedBy = [ "default.target" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
Type = "oneshot";
TimeoutStartSec = "5min";
ExecStart = "${qbit_manageEnv}/bin/python ${qbit_manage}/qbit_manage.py -r -c /home/jawz/.config/qbit_manage/config.yml";
};
};

View File

@@ -0,0 +1,20 @@
{
inputs,
lib,
osConfig ? null,
...
}:
let
shellType = inputs.self.lib.hmShellType osConfig "bash";
in
{
options.my.shell.type = lib.mkOption {
type = lib.types.enum [
"bash"
"zsh"
];
default = "bash";
description = "The shell to use in Home Manager";
};
config.my.shell.type = lib.mkDefault shellType;
}

View File

@@ -1,29 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
{
options.my.shell.exercism = {
enable = lib.mkEnableOption "Exercism coding practice platform";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.shell;
description = "Users to install Exercism for";
};
};
config = lib.mkIf config.my.shell.exercism.enable {
users.users =
let
packages = builtins.attrValues {
inherit (pkgs)
exercism # learn to code
bats # testing system, required by Exercism
;
};
in
inputs.self.lib.mkUserPackages lib config.my.shell.exercism.users packages;
};
}

View File

@@ -0,0 +1,9 @@
{ pkgs }:
{
packages = builtins.attrValues {
inherit (pkgs)
exercism
bats
;
};
}

View File

@@ -0,0 +1,34 @@
{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"shell"
"exercism"
];
};
cfg = config.my.shell.exercism;
exercism = import ./common.nix { inherit pkgs; };
in
{
options.my.shell.exercism.enable = lib.mkEnableOption "Exercism coding practice platform";
config = lib.mkMerge [
{
my.shell.exercism.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = exercism.packages;
})
];
}

View File

@@ -0,0 +1,16 @@
{
config,
inputs,
lib,
...
}:
{
options.my.shell.exercism = {
enable = lib.mkEnableOption "Exercism coding practice platform";
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.shell;
description = "Users to install Exercism for";
};
};
}

View File

@@ -7,7 +7,7 @@
...
}:
let
shellType = inputs.self.lib.hmShellType config osConfig;
shellType = inputs.self.lib.hmShellType osConfig "zsh";
hm = inputs.self.lib.hmModule {
inherit
config

View File

@@ -7,7 +7,7 @@
...
}:
let
shellType = inputs.self.lib.hmShellType config osConfig;
shellType = inputs.self.lib.hmShellType osConfig "zsh";
hm = inputs.self.lib.hmModule {
inherit
config
@@ -111,9 +111,11 @@ in
fi
''
''
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
if [ -f "${pkgs.fzf}/share/fzf/key-bindings.zsh" ]; then
source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
fi
if [ -f "${pkgs.fzf}/share/fzf/completion.zsh" ]; then
source "${pkgs.fzf}/share/fzf/completion.zsh"
fi
'';
};

View File

@@ -2,6 +2,7 @@
lib,
config,
inputs,
pkgs,
...
}:
{
@@ -36,6 +37,7 @@
isSystemUser = true;
createHome = true;
group = "nixremote";
shell = pkgs.bashInteractive;
openssh.authorizedKeys.keyFiles = config.my.users.nixremote.authorizedKeys;
};
};

View File

@@ -9,9 +9,16 @@ let
};
in
{
systems = [ system ];
systems = [
system
"aarch64-darwin"
];
flake = {
lib = {
commonOverlays = mkpkgs: inputs: [
(import ../config/overlay.nix { inherit mkpkgs inputs; })
inputs.doom-emacs.overlays.default
];
commonModules = name: [
../hosts/${name}/configuration.nix
inputs.nur.modules.nixos.default
@@ -19,10 +26,7 @@ in
inputs.stylix.nixosModules.stylix
inputs.nixtendo-switch.nixosModules.nixtendo-switch
{
nixpkgs.overlays = [
(import ../config/overlay.nix { inherit mkpkgs inputs; })
inputs.doom-emacs.overlays.default
];
nixpkgs.overlays = inputs.self.lib.commonOverlays mkpkgs inputs;
}
{
nix.registry = {
@@ -44,6 +48,41 @@ in
outputs = inputs.self;
};
};
createHomeConfig =
{
name,
system,
extraModules ? [ ],
extraSpecialArgs ? { },
}:
let
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = inputs.self.lib.commonOverlays mkpkgs inputs;
};
in
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
../modules/home-manager.nix
../config/home-manager.nix
../hosts/${name}/home.nix
{
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
}
]
++ extraModules;
extraSpecialArgs = {
inherit inputs;
outputs = inputs.self;
osConfig = null;
preferredShell = "zsh";
userEmail = "danilo.reyes.251@proton.me";
}
// extraSpecialArgs;
};
langList =
builtins.readDir ../modules/dev
|> builtins.attrNames
@@ -241,6 +280,7 @@ in
serviceMap |> map (entry: inputs.self.lib.mkPostgresDependency config entry.service entry.name);
sshKeys = {
deacero = ../secrets/ssh/ed25519_deacero.pub;
mac = ../secrets/ssh/ed25519_mac.pub;
workstation = ../secrets/ssh/ed25519_workstation.pub;
server = ../secrets/ssh/ed25519_server.pub;
miniserver = ../secrets/ssh/ed25519_miniserver.pub;
@@ -301,11 +341,7 @@ in
inherit osCfg enabledByDefault;
};
hmShellType =
config: osConfig:
if osConfig == null then
if config.programs.bash.enable then "bash" else "zsh"
else
osConfig.my.shell.type;
osConfig: preferredShell: if osConfig == null then preferredShell else osConfig.my.shell.type;
hmOnlyUser =
config: osConfig: user:
osConfig != null && config.home.username == user;

View File

@@ -1,7 +1,10 @@
{ inputs, ... }:
{
perSystem = _: {
perSystem =
{ pkgs, ... }:
{
devShells =
if pkgs.stdenv.isLinux then
let
hostShells = inputs.self.nixosConfigurations.emacs.config.devShells;
in
@@ -11,6 +14,10 @@
inherit name;
value = hostShells.${name};
})
|> builtins.listToAttrs;
|> builtins.listToAttrs
else
{
mcp = (import ../modules/dev/mcp/common.nix { inherit pkgs inputs; }).devShell;
};
};
}

View File

@@ -1,6 +1,7 @@
{ inputs, ... }:
{
flake.nixosConfigurations = {
flake = {
nixosConfigurations = {
workstation = inputs.self.lib.createConfig "workstation" inputs.nixpkgs;
miniserver = inputs.self.lib.createConfig "miniserver" inputs.nixpkgs-small;
server = inputs.self.lib.createConfig "server" inputs.nixpkgs-small;
@@ -8,4 +9,9 @@
emacs = inputs.self.lib.createConfig "emacs" inputs.nixpkgs;
vps = inputs.self.lib.createConfig "vps" inputs.nixpkgs-small;
};
homeConfigurations.mac = inputs.self.lib.createHomeConfig {
name = "mac";
system = "aarch64-darwin";
};
};
}

View File

@@ -52,12 +52,16 @@
};
in
{
packages = (inputs.jawz-scripts.packages.${system} or { }) // {
emacs-vm = inputs.self.nixosConfigurations.emacs.config.system.build.vm;
vps-linode = vpsLinodeConfig.config.system.build.images.linode;
packages =
(inputs.jawz-scripts.packages.${system} or { })
// {
mcp-tests = mcpTests;
nixos-mcp = nixosMcp;
nixos-mcp-server = mcpServerPkg;
}
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
emacs-vm = inputs.self.nixosConfigurations.emacs.config.system.build.vm;
vps-linode = vpsLinodeConfig.config.system.build.images.linode;
};
};
}

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPm6OxkrbbYHHUK+6HFHyO1cZYEQR0Un11k2+9YRRIq carlosdaniloreyesmartinez@MacBook-Air-deCarlos-Danilo-Reyes.local

View File

@@ -39,3 +39,13 @@
- **Decision**: Support a gradual migration from mixed flat modules to feature directories with paired `nixos.nix` and `home.nix` files, discovered automatically by NixOS and Home Manager import loaders.
- **Rationale**: Keeps the current category-first browsing model while removing the need to embed Home Manager config inside NixOS modules, which is a cleaner fit for future standalone Home Manager and Darwin hosts.
- **Alternatives considered**: (a) Keep mixed modules and branch on platform forever (rejected: keeps NixOS/Home Manager tightly coupled); (b) Split into separate top-level `modules/nixos` and `modules/home` trees (rejected: loses adjacency between the two surfaces of a single feature).
## Decision 9 (2026-03-16): Shared helper layer for repeated Home Manager wrapper logic
- **Decision**: Keep split feature modules, but move repeated Home Manager wrapper logic into shared helpers in `parts/core.nix` exposed via `inputs.self.lib`.
- **Rationale**: Reduces boilerplate in `home.nix` modules without losing the explicit split between NixOS-owned and Home Manager-owned behavior.
- **Alternatives considered**: (a) Leave repeated wrapper code in every `home.nix` (rejected: noisy and brittle); (b) hide full feature behavior behind one generic abstraction (rejected: makes modules harder to read and reason about).
## Decision 10 (2026-03-16): Standalone Home Manager host for macOS
- **Decision**: Add a standalone `homeConfigurations.mac` target backed by `hosts/mac/home.nix` and `hosts/mac/toggles.nix`, reusing workstation-style dev and shell modules while excluding Linux GUI app modules.
- **Rationale**: Lets the repo model an upcoming macOS machine without forcing NixOS host semantics onto a Home Manager-only system.
- **Alternatives considered**: (a) Wait for the physical Mac and keep no target in the flake (rejected: delays validation and reuse work); (b) model the Mac as a fake NixOS host (rejected: does not match the intended deployment model).