{"id":15747640,"url":"https://github.com/kachick/dotfiles","last_synced_at":"2025-05-07T08:14:24.864Z","repository":{"id":45702384,"uuid":"354522106","full_name":"kachick/dotfiles","owner":"kachick","description":"🤤✂🌳 ","archived":false,"fork":false,"pushed_at":"2025-05-07T07:43:16.000Z","size":2634,"stargazers_count":19,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T08:14:17.579Z","etag":null,"topics":["dotfiles","flakes","home-manager","nixos"],"latest_commit_sha":null,"homepage":"","language":"Nix","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/kachick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2021-04-04T11:05:57.000Z","updated_at":"2025-05-07T07:43:17.000Z","dependencies_parsed_at":"2024-01-15T04:50:54.358Z","dependency_job_id":"8fb16c2b-5d68-4094-bd68-6cefb60498ed","html_url":"https://github.com/kachick/dotfiles","commit_stats":{"total_commits":1653,"total_committers":6,"mean_commits":275.5,"dds":0.1960072595281307,"last_synced_commit":"3c601313ba2fa8d2e8eb3067aeeaacfa572b157a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachick%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachick%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachick%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kachick%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kachick","download_url":"https://codeload.github.com/kachick/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252839296,"owners_count":21812089,"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","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","flakes","home-manager","nixos"],"created_at":"2024-10-04T05:21:17.623Z","updated_at":"2025-05-07T08:14:24.795Z","avatar_url":"https://github.com/kachick.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotfiles\n\n[![Home Status](https://github.com/kachick/dotfiles/actions/workflows/ci-home.yml/badge.svg?branch=main)](https://github.com/kachick/dotfiles/actions/workflows/ci-home.yml?query=branch%3Amain+)\n[![Home Status](https://github.com/kachick/dotfiles/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/kachick/dotfiles/actions/workflows/windows.yml?query=branch%3Amain+)\n[![Nix Status](https://github.com/kachick/dotfiles/actions/workflows/ci-nix.yml/badge.svg?branch=main)](https://github.com/kachick/dotfiles/actions/workflows/ci-nix.yml?query=branch%3Amain+)\n[![CI - Go Status](https://github.com/kachick/dotfiles/actions/workflows/ci-go.yml/badge.svg?branch=main)](https://github.com/kachick/dotfiles/actions/workflows/ci-go.yml?query=branch%3Amain+)\n[![Container Status](https://github.com/kachick/dotfiles/actions/workflows/container.yml/badge.svg?branch=main)](https://github.com/kachick/dotfiles/actions/workflows/container.yml?query=branch%3Amain+)\n\nPersonal dotfiles that can be placed in the public repository\\\nAlso known as [盆栽(bonsai)](https://en.wikipedia.org/wiki/Bonsai) 🌳\n\n```mermaid\nblock-beta\n    columns 3\n\n    block:os:3\n        nixos((\"❄\")) macos((\"🍎\")) windows((\"🪟\"))\n    end\n\n    block:vm:3\n        lima(\"Lima\") quickemu(\"Quickemu\") wsl2(\"WSL2\")\n    end\n\n    block:container:3\n        podman(\"🦭\") k8s(\"☸️\") \n    end\n\n    nixos --\u003e lima\n    nixos --\u003e quickemu\n    macos --\u003e lima\n    windows --\u003e wsl2\n\n    vm --\u003e container\n    nixos --\u003e container\n```\n\n## For visitors\n\nIf you are using [Podman](https://podman.io/), you can test the pre-built [ubuntu container-image](containers) as follows.\n\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/kachick/dotfiles/main/containers/sandbox-with-ghcr.bash) latest\n```\n\nOr, you can directly use some commands with `nix run` without any installation steps.\n\n```bash\nnix run 'github:kachick/dotfiles#todo'\n```\n\nList them\n\n```bash\nnix flake show 'github:kachick/dotfiles' --json 2\u003e/dev/null | jq '.packages | .\"x86_64-linux\" | to_entries | map(\"\\(.key) # \\(.value.description)\")'\n```\n\n## NixOS\n\nList defined hostnames\n\n```bash\nnix eval --json 'github:kachick/dotfiles#nixosConfigurations' --apply 'builtins.attrNames' | jq '.[]'\n```\n\nUsing flake style is disabled in NixOS by default and [you should inject git command to use flakes](https://www.reddit.com/r/NixOS/comments/18jyd0r/cleanest_way_to_run_git_commands_on_fresh_nixos/).\n\n**NOTICE: This command might drop all existing users except which defined in configurations.**\n\n```bash\nnix --extra-experimental-features 'nix-command flakes' shell 'github:NixOS/nixpkgs/nixos-24.11#git' \\\n  --command sudo nixos-rebuild switch \\\n  --flake \"github:kachick/dotfiles#$(hostname)\" \\\n  --show-trace\n```\n\nIf you are experimenting to setup NixOS just after installing from their installer and want to avoid impure mode,\\\nSee [generic configuration](nixos/hosts/generic) for my current workaround.\n\nFinally, reboot the device\n\n```bash\nsudo reboot now\n```\n\n## home-manager\n\nList definitions\n\n```bash\nnix eval --json 'github:kachick/dotfiles#homeConfigurations' --apply 'builtins.attrNames' | jq '.[]'\n```\n\n## Ubuntu\n\n1. Install [Nix](https://nixos.org/) package manager with [DeterminateSystems/nix-installer](https://github.com/DeterminateSystems/nix-installer) to enable [Flakes](https://nixos.wiki/wiki/Flakes) by default.\n\n   ```bash\n   curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install\n   ```\n\n1. Make sure there is a nix directory that is used in the home-manager.\\\n   This is a workaround, See [the thread](https://www.reddit.com/r/Nix/comments/1443k3o/comment/jr9ht5g/?utm_source=reddit\u0026utm_medium=web2x\u0026context=3) for detail\n\n   ```bash\n   mkdir -p ~/.local/state/nix/profiles\n   ```\n\n1. Restart current shell to load Nix as a PATH\n\n   ```bash\n   bash\n   ```\n\n1. Apply dotfiles\n\n   ```bash\n   nix run 'github:kachick/dotfiles#home-manager' -- switch -b backup --flake 'github:kachick/dotfiles#wsl-ubuntu'\n   ```\n\n1. Apply system level dotfiles with [sudo for nix command](https://github.com/kachick/dotfiles/commit/2e47c6655dc74a4a56495fdcbebb9d15b0b57313)\n\n   ```bash\n   sudoc nix run 'github:kachick/dotfiles#apply-system'\n   ```\n\n1. Enable tailscale ssh if required\n\n   ```bash\n   sudoc tailscale up --ssh\n   ```\n\n### Podman on Ubuntu\n\n1. Install uidmap without Nix for use of podman even if the podman will be installed from nixpkgs\n\n   - \"shadow\" in nixpkg is not enough for podman - \u003chttps://github.com/NixOS/nixpkgs/issues/138423\u003e\n\n   ```bash\n   sudo apt-get install --assume-yes uidmap\n   ```\n\n1. Make sure the cgroup v1 is disabled if you on WSL, See [the docs](windows/WSL/README.md)\n\n1. Make sure you can run containers as `podman run public.ecr.aws/debian/debian:12.6-slim cat /etc/os-release`\n\n## Debian\n\nAfter installing missing tools, you can complete same steps as Ubuntu\n\n```bash\nsudo apt update\nsudo apt upgrade\nsudo apt install --assume-yes curl\nsudo apt install --assume-yes dbus-user-session # For podman\n```\n\nRemember to set special config and reboot if you on WSL\n\n```bash\necho '\n[boot]\nsystemd=true' | sudo tee /etc/wsl.conf\n```\n\n## Windows\n\n1. Install [WSL2](windows/WSL/README.md) with default Ubuntu. Activate home-manager as `kachick@wsl-ubuntu`\n1. Install [NixOS-WSL](https://github.com/nix-community/NixOS-WSL). Activate home-manager with `$(whoami)@wsl-nixos`\n1. Adjust Windows experience as written in [extracted steps](windows/README.md) and as written in [CI](.github/workflows/windows.yml) for further detail.\n\n## Multi-booting on Windows and Linux\n\nCheck [traps](./windows/Multi-booting.md)\n\n## macOS\n\nI basically [give up to maintain macOS environment](https://github.com/kachick/dotfiles/issues/911).\n\n1. Apply home-manager with `kachick@macbook` for minimum packages.\n1. Install [some packages](https://github.com/kachick/dotfiles/wiki/macOS) without Nix\n1. Use [Lima](#lima) for development tasks.\n\n## Lima\n\n1. Setup [Lima](https://github.com/lima-vm/lima) with default Ubuntu guest\n1. In the lima as `limactl start`, apply home-manager with `kachick@lima`\n1. You can run containers as `lima nerdctl run --rm hello-world`. You can also use podman after above `Podman on Ubuntu` setups\n\n## How to setup secrets\n\nExtracted to [wiki](https://github.com/kachick/dotfiles/wiki/Encryption)\n\n## Shorthand\n\nIf you are developing this repository, putting `.env` makes easy reactivations.\n\n```bash\necho 'HM_HOST_SLUG=wsl-ubuntu' \u003e .env\n```\n\nThen you can enable configurations with\n\n```bash\ntask apply\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkachick%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkachick%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkachick%2Fdotfiles/lists"}