Files
nixy/docs/GROUPS-REMOTE.md
admin 4e28ca9b48 Remove unused configurations and packages from laptop setup
- Removed USBGuard configuration and its associated comments from configuration.nix.
- Cleaned up flake.nix by removing unnecessary overlays.
- Updated home.nix to remove references to Helium and Proton, and added Steam.
- Deleted secrets.default.nix and secrets.secrets.yaml files for security reasons.
- Removed Omen laptop specific configuration from omen.nix.
- Deleted vencord.nix as it is no longer needed.
2026-06-23 22:23:40 +02:00

3.7 KiB

Using Groups with a Different Remote Origin URL

When your repository URL differs from the default github:anotherhadi/nixy, you need to update the input URL in your consuming flake. Here's how to use the groups with any remote URL.

Update the Input in Your Flake

Example 1: GitHub URL

inputs.nixy.url = "github:yourusername/nixy";

Example 2: GitLab URL

inputs.nixy.url = "gitlab:yourusername/nixy";

Example 3: Gitea URL (like the current origin)

inputs.nixy.url = "gitea:yourusername/nixy.git";

Example 4: SSH URL

inputs.nixy.url = "git+ssh://git@github.com/yourusername/nixy.git";

Example 5: Local file path (for development/testing)

inputs.nixy.url = "path:/path/to/nixy";

Using Groups in Home Manager

Once the input URL is configured, you can import any group module:

{ inputs, ... }: {
  imports = [
    inputs.nixy.homeManagerModules.cybersecurity
    # inputs.nixy.homeManagerModules.dev
    # inputs.nixy.homeManagerModules.basic-apps
    # inputs.nixy.homeManagerModules.misc
  ];
}

This will:

  • Install all packages from the cybersecurity group
  • Set up ~/Cyber/wordlists/ directory with SecLists, fuzz4bounty, and hashcat rules
  • Create ~/Cyber/tmp/ as a temporary workspace

Using Groups in nix shell

For a quick shell with the group's packages without installing:

nix shell yourusername/nixy#cybersecurity
nix shell yourusername/nixy#dev

Replace yourusername/nixy with the actual path to the flake.

Important Notes

1. Group Output Names Must Match

The group names available in your local flake (flake.nix) are defined in the homeManagerModules output. Currently these groups are defined:

  • dev - Go, Bun, Air, and other development tools
  • cybersecurity - Security tools (nmap, john, dirb, ffuf, etc.)
  • basic-apps - Basic applications
  • misc - Miscellaneous packages

2. Access to Groups vs Packages

There are two ways to access groups:

  • inputs.nixy.homeManagerModules.<group> - For Home Manager integration (packages + files + systemd units)
  • inputs.nixy.packages.<group> - For standalone environments (packages only)

Both require the same input URL configuration.

3. Flake Lock Consistency

After changing the input URL, run:

nix flake lock --update-input nixy

or

nix flake update

This ensures the flake.lock file references the correct commit.

4. Using with Multiple Remote URLs

If you need to reference the same flake from different remotes, you can specify multiple inputs:

inputs = {
  nixy-main.url = "github:anotherhadi/nixy";
  nixy-personal.url = "github:yourusername/nixy";

  # Then reference them as inputs.nixy-main.homeManagerModules.cybersecurity
  # or inputs.nixy-personal.packages.dev
};

5. Checking Available Groups

You can check which groups are available by inspecting the flake output:

nix flake show yourusername/nixy#groups

This will display all available outputs including the homeManagerModules and packages groups.

Troubleshooting

Error: "Unknown flake output"

Cause: The input URL points to a location that doesn't have the expected flake structure.

Solution: Verify the repository has the expected flake.nix and the correct outputs are defined.

Error: "Not a flake"

Cause: The input URL might be pointing to a non-git repository or a branch/tag that doesn't have a flake.

Solution: Check the URL path and ensure it points to a valid git repository with a flake.nix file.

Error: "Permission denied"

Cause: Using SSH URLs with read-only access or incorrect credentials.

Solution: Use HTTPS URLs for read-only access, or configure SSH keys properly for SSH URLs.