Nix patterns
Skill aiskillstore/marketplace/skills/edgarpost/nix-patterns
NixOS module patterns. Use when creating or editing NixOS/home-manager modules, adding packages, or configuring programs.From its SKILL.md
npx -y skills add aiskillstore/marketplace --skill nix-patternsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
0.8 KB, 206 tokens by cl100k_base, as published. Nobody here has run it
NixOS Module Patterns
Directory structure
modules/home/*.nix- Home-manager modules (user packages, dotfiles)modules/nixos/*.nix- NixOS modules (system services)hosts/*/- Machine-specific configurationhome/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 ];
What ships with it: 1 file
16.2 KB alongside SKILL.md
- skill-report.json16.2 KB