{"id":34569233,"url":"https://github.com/kahnwong/nix","last_synced_at":"2025-12-24T09:14:31.894Z","repository":{"id":64053265,"uuid":"572437501","full_name":"kahnwong/nix","owner":"kahnwong","description":"nix","archived":false,"fork":false,"pushed_at":"2025-12-22T07:38:30.000Z","size":2403,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-23T18:56:09.279Z","etag":null,"topics":["brew","darwin","dotfiles","flatpak","linux","nix","setup-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kahnwong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-30T09:19:57.000Z","updated_at":"2025-12-22T07:38:34.000Z","dependencies_parsed_at":"2023-10-16T22:01:08.621Z","dependency_job_id":"74063ebf-b69d-40f3-8b5a-58e0a84e64ac","html_url":"https://github.com/kahnwong/nix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kahnwong/nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kahnwong%2Fnix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kahnwong%2Fnix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kahnwong%2Fnix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kahnwong%2Fnix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kahnwong","download_url":"https://codeload.github.com/kahnwong/nix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kahnwong%2Fnix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27999539,"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-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["brew","darwin","dotfiles","flatpak","linux","nix","setup-script"],"created_at":"2025-12-24T09:14:31.428Z","updated_at":"2025-12-24T09:14:31.889Z","avatar_url":"https://github.com/kahnwong.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nix\n\nFlake migration based on \u003chttps://github.com/sebastiant/dotfiles\u003e.\n\n## Pre-requisites\n\nCreate `./scripts/apply.sh` and set appropriate build command. See `flake.nix` for available options.\n\nFile content should look like this:\n\n```bash\n#!/bin/bash\n\nexport NIXPKGS_ALLOW_UNFREE=1\n\n## macbook\n#nix build '.#homeManagerConfigurations.macbookMain.system' --experimental-features 'nix-command flakes' --impure\n# linux\nnix build '.#homeManagerConfigurations.workstation.activationPackage' --experimental-features 'nix-command flakes' --impure\n\nif [[ $(uname -s) == 'Darwin' ]]; then\n    sudo ./result/activate\n\n    elif [[ $(uname -s) == 'Linux' ]]; then\n    ./result/activate\nfi\n```\n\n## Usage\n\n```bash\nmake common\n\n# optional\nmake common-dev\n```\n\n### Rust\n\nIf nix gc borks rust, run following commands:\n\n```bash\nrustup show\nrustup toolchain remove $toolchain_version\nrustup install 1.90.0\n```\n\n### Run `sudo` without typing password\n\n```bash\necho \"$(whoami) ALL=(ALL) NOPASSWD: ALL\" | sudo tee /etc/sudoers.d/99-nopasswd-$(whoami)\n```\n\n### Mac OS Extras\n\n1. Login to `App Store`\n2. `make mac`\n\n### Linux Extras\n\n- If you need `tailscale`, `caddy`, `fail2ban`, or `docker` on your server, install it via your system's package\n  manager, since nix requires you to set up systemd services explicitly.\n\n## Post-installation instructions\n\n### Linux: Set default shell\n\n```bash\n`chsh` and type `$HOME/.nix-profile/bin/fish`\n\n# or this one\n`vi /etc/passwd` and specify shell for your user\n```\n\n### MacOS: Misc config\n\n- set `tap to single click`\n- set `three-finger drag`\n\n## Useful commands\n\n```bash\n# backup vscode extensions list\ncode --list-extensions | xargs -L 1 echo code --install-extension \u003e ext_install.sh\n\n# backup vscode config\ncp \"/users/$USER/Library/Application Support/Code/User/keybindings.json\" .\ncp \"/users/$USER/Library/Application Support/Code/User/settings.json\" .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkahnwong%2Fnix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkahnwong%2Fnix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkahnwong%2Fnix/lists"}