nix-patterns | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / nix-patterns

nix-patterns

maintained by aiskillstore

star 124 account_tree 6 verified_user MIT License
bolt View GitHub

name: nix-patterns description: NixOS module patterns. Use when creating or editing NixOS/home-manager modules, adding packages, or configuring programs.

NixOS Module Patterns

Directory structure

  • modules/home/*.nix - Home-manager modules (user packages, dotfiles)
  • modules/nixos/*.nix - NixOS modules (system services)
  • hosts/*/ - Machine-specific configuration
  • home/default.nix - Main home-manager entry point

Adding packages

home.packages = with pkgs; [
  package-name
] ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [
  x86-only-package
];

Creating a module

{ pkgs, ... }:
{
  home.packages = with pkgs; [ mypackage ];
  xdg.configFile."app/config.json".text = builtins.toJSON { setting = "value"; };
}

Import in home/default.nix:

imports = [ ../modules/home/mymodule.nix ];

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 124
GitHub Forks 6
Created Jan 2026
Last Updated il y a 4 mois
tools tools system admin

Related Skills

docker-expert
chevron_right
discord-governance
chevron_right
hetzner-provisioner
chevron_right
telnyx-network
chevron_right
plex

plex

openclaw
star 2.4k
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.