{"id":14967928,"url":"https://github.com/shzhng/nix-config","last_synced_at":"2025-07-22T22:33:53.871Z","repository":{"id":247861981,"uuid":"827033207","full_name":"shzhng/nix-config","owner":"shzhng","description":"❄️ Personal Nix config files for my development machines \u0026 VMs","archived":false,"fork":false,"pushed_at":"2025-07-22T17:31:19.000Z","size":1697,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T19:23:10.604Z","etag":null,"topics":["dotfiles","home-manager","macos","nix","nix-darwin","nixos","nixos-config","wezterm"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shzhng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-10T22:15:53.000Z","updated_at":"2025-07-22T17:31:24.000Z","dependencies_parsed_at":"2024-07-11T02:27:27.296Z","dependency_job_id":"0c416aaa-4a22-452a-95e3-48b8182ab173","html_url":"https://github.com/shzhng/nix-config","commit_stats":{"total_commits":52,"total_committers":4,"mean_commits":13.0,"dds":"0.32692307692307687","last_synced_commit":"b5d94bc12497d2cf0e0693131a2fea9ec7c4239f"},"previous_names":["shzhng/nix-config"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shzhng/nix-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shzhng%2Fnix-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shzhng%2Fnix-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shzhng%2Fnix-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shzhng%2Fnix-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shzhng","download_url":"https://codeload.github.com/shzhng/nix-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shzhng%2Fnix-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586171,"owners_count":23952170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotfiles","home-manager","macos","nix","nix-darwin","nixos","nixos-config","wezterm"],"created_at":"2024-09-24T13:38:53.346Z","updated_at":"2025-07-22T22:33:53.838Z","avatar_url":"https://github.com/shzhng.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nix/MacOS System Configurations\n\n[![NixOS 24.05](https://img.shields.io/badge/NixOS-24.05-blue.svg?style=flat-square\u0026logo=NixOS\u0026logoColor=white)](https://nixos.org)\n[![NixOS 24.05](https://img.shields.io/badge/nixpkgs-24.05-blue.svg?style=flat-square\u0026logo=NixOS\u0026logoColor=white)](https://github.com/NixOS/nixpkgs)\n\nThis repository contains my own personal MacOS (using\n[nix-darwin](https://github.com/LnL7/nix-darwin)) and\n[home-manager](https://github.com/nix-community/home-manager) system\nconfigurations. I use this to provision my MacOS instance, as well as provision\nthe same environment on Linux systems (currently non-NixOS) using standalone\nhome-manager.\n\n\u003e [!IMPORTANT]\n\u003e This is a work in progress and may not work as expected. It isn't\n\u003e intended to be used by other people in their own setup, but feel free to\n\u003e reference it as you get into using `nix`.\n\n![MacOS](./assets/darwin-wezterm.png)\n\n## Setup\n\n1. Install `nix` (if not on NixOS) I prefer to use the [Determinate Systems\ninstaller](https://github.com/DeterminateSystems/nix-installer).\n\n```sh\ncurl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install\n```\n\n2.a Initialize the MacOS system, with home-manager as a module\n\n```sh\nnix run nix-darwin -- switch --flake .\n```\n\n2.b. Initialize home-manager on a Linux system\n\n```sh\nnix run home-manager -- switch --flake .\n```\n\n3.a. Reload the full system on MacOS\n\n```sh\ndarwin-rebuild switch --flake .\n```\n\n3.b. Reload home-manager on a Linux system\n\n```sh\nhome-manager switch --flake .\n```\n\n## Code Formatting\n\nThis repository uses automatic code formatting to maintain consistent style across all Nix files. The formatting is enforced using git pre-commit hooks that run before each commit.\n\n### Setting Up Pre-commit Hooks\n\nTo set up the pre-commit hooks:\n\n```sh\nnix run .#install-git-hooks\n```\n\nThis will install a git pre-commit hook that automatically formats all Nix files using `nixfmt-rfc-style` whenever you make a commit.\n\n### Manual Formatting\n\nIf you want to manually format all Nix files in the repository:\n\n```sh\nfind . -name \"*.nix\" -type f -exec nix run nixpkgs#nixfmt-rfc-style -- {} \\;\n```\n\n### How It Works\n\n- The hooks are configured in the `flake.nix` file using [git-hooks.nix](https://github.com/cachix/git-hooks.nix)\n- A `.pre-commit-config.yaml` file is generated automatically (and git-ignored)\n- The hooks run `nixfmt-rfc-style` on all Nix files before each commit\n- If formatting fails, the commit is aborted\n\n### Skipping Hooks\n\nIf you need to bypass the pre-commit hooks for a specific commit:\n\n```sh\ngit commit --no-verify\n```\n\nHowever, it's generally recommended to let the hooks run to maintain consistent formatting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshzhng%2Fnix-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshzhng%2Fnix-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshzhng%2Fnix-config/lists"}