{"id":14968034,"url":"https://github.com/r17x/universe","last_synced_at":"2025-04-07T06:05:45.908Z","repository":{"id":36988584,"uuid":"457550816","full_name":"r17x/universe","owner":"r17x","description":"my development universe ❄️ ƛ","archived":false,"fork":false,"pushed_at":"2025-03-30T00:05:58.000Z","size":2261,"stargazers_count":94,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T18:55:15.621Z","etag":null,"topics":["dotfiles","home-manager","linux","nix","nix-darwin","nixpkgs","nixvim","osx","sketchybar","skhd","unix","wm","yabai"],"latest_commit_sha":null,"homepage":"https://rin.rocks","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/r17x.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}},"created_at":"2022-02-09T22:35:03.000Z","updated_at":"2025-03-28T08:44:40.000Z","dependencies_parsed_at":"2024-01-15T08:49:45.793Z","dependency_job_id":"89309eae-cbd5-447c-82f2-f002daca283e","html_url":"https://github.com/r17x/universe","commit_stats":{"total_commits":480,"total_committers":2,"mean_commits":240.0,"dds":"0.014583333333333282","last_synced_commit":"6c5b79221a12801e826a6e2987904bf688683afc"},"previous_names":["r17x/universe"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Funiverse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Funiverse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Funiverse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Funiverse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r17x","download_url":"https://codeload.github.com/r17x/universe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601447,"owners_count":20964864,"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","home-manager","linux","nix","nix-darwin","nixpkgs","nixvim","osx","sketchybar","skhd","unix","wm","yabai"],"created_at":"2024-09-24T13:39:08.678Z","updated_at":"2025-04-07T06:05:45.875Z","avatar_url":"https://github.com/r17x.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eR17{x} Universe ❄️\u003c/h1\u003e\n    \u003cbr\u003e\n    \u003cdiv align=\"center\"\u003e\n        \u003ca href=\"https://github.com/r17x/universe/stargazers\"\u003e\n            \u003cimg src=\"https://img.shields.io/github/stars/r17x/universe?color=A0C981\u0026labelColor=303446\u0026style=for-the-badge\u0026logo=starship\u0026logoColor=A0C981\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/r17x/universe/\"\u003e\n            \u003cimg src=\"https://img.shields.io/github/repo-size/r17x/universe?color=D48AEA\u0026labelColor=303446\u0026style=for-the-badge\u0026logo=github\u0026logoColor=D48AEA\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://nixos.org\"\u003e\n            \u003cimg src=\"https://img.shields.io/badge/NixOS-Unstable-blue?style=for-the-badge\u0026logo=NixOS\u0026logoColor=white\u0026label=Nixpkgs\u0026labelColor=303446\u0026color=6CB6EB\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/r17x/universe/blob/main/LICENSE\"\u003e\n            \u003cimg src=\"https://img.shields.io/static/v1.svg?style=for-the-badge\u0026label=License\u0026message=MIT\u0026colorA=313244\u0026colorB=EF9F76\u0026logo=unlicense\u0026logoColor=EF9F76\u0026\"/\u003e\n        \u003c/a\u003e\n    \u003c/div\u003e\n    \u003cbr\u003e\n\u003c/div\u003e\n\n## Motivation\n\n(DRY) - Don't repeat yourself is a principle in software development. We should use this principle to reduce repetitive and time-consuming work. Personally, I just try to apply this principle in my professional and personal work. The most basic example is making these dotfiles, so that I don't have to provide the needs of the devices or tools used in everyday life. So, from this motivation you can see the main goal (Goal).\n\nThe work of a software developer, software engineer, or software laborer requires tools that are used on top of a running system (termed an operating system or OS). I am familiar with using operating systems such as OSX based on Darwin/Unix made by Apple and ArchLinux based on Linux. Well my goal is to become a human user agnostic (not religiously attached to a system but still loyal to the creator of the user, except for the operating system made by Mikocok). The tools are collected in one place to store everything about tools, configurations, settings, credentials, and others that support the needs of working or just operating a computer. Where is my container? In this github, then we need git or other tools, which is clear that we stay in sync between each machine we use so that we don't do repetitive things.\n\nTo keep it pure and the same between each machine, I decided to use Nix.\n\n## Nix\n\nNix is a \"purely functional package manager\", the Nix experience is completely different than other package managers. For some people it may seem complicated to use, but it is worth it if you understood what you really need.\n\nIf you have ever used the \"virtual env\" tool popular in the \"python\" ecosystem then you can experience the same thing but across operating systems, platforms, and programming language ecosystems.\n\nSince nix uses functional concepts like declarative then it should be utilized well. such as declaring needs and then declaring with nix language.\n\n\u003chr/\u003e\n\n\u003e Heavily inspired from ([malob/nixpkgs](https://github.com/malob/nixpkgs)) (especially [in v1](https://github.com/r17x/universe/tree/v1))\n\nThis is my personal configuration with [nix](https://nixos.org/) using [**flakes**](https://nixos.wiki/wiki/Flakes), [**flake.part**](https://flake.parts/), [**home-manager**](https://github.com/nix-community/home-manager), \u0026 [**nix-darwin**](https://github.com/LnL7/nix-darwin) for Darwin or MacOS System.\n\n## Structures\n\n```mermaid\ngraph LR\nF[Flake] --\u003e N(nixosConfigurations)\nF --\u003e D(darwinConfigurations)\nF --\u003e H(homeCofigurations)\n\nN --aarch64-linux--\u003e VM(VM)\nD --aarch64-darwin--\u003e d1(eR17)\nD --aarch64-darwin--\u003e d2(eR17x)\n\nH --\u003e h1(r17)\n\nd1 --\"r17@eR17\"--\u003e h1\nd2 --\"r17@eR17x\"--\u003e h1\nd2 --virtual machine with: aarch64-linux--\u003e LB(linux-builder)\n\nF --\u003e M\nM(modules) --\u003e DM(Darwin Modules)\nDM --\u003e D\nM --\u003e NM(NixOS Modules)\nNM --\u003e N\nM --\u003e HM(Home Modules)\nHM --\u003e H\nM --\u003e CM(Cross Modules)\nCM --\u003e D\nCM --\u003e N\nM --\u003e FM(Flake Modules)\nFM --\u003e F\n```\n\n* [Flake](./flake.nix)\n* [configurations](./nix/configurations/)\n* [home](./nix/configurations/home)\n* [r17](./nix/configurations/home/r17.nix) - home-manager configurations for user `r17` and use at host [eR17](./nix/configurations/darwin/eR17.nix) and [eR17x](./nix/configurations/darwin/eR17x.nix)\n* [darwin](./nix/configurations/darwin/)\n* [eR17](./nix/configurations/darwin/eR17.nix)\n* [eR17x](./nix/configurations/darwin/eR17x.nix)\n* [nixos](./nix/configurations/nixos)\n* [vm](./nix/configurations/nixos/vm.nix) - currently deploy to linux-builder at [eR17x](./nix/configurations/darwin/eR17x.nix)\n* [modules](./nix/modules/)\n\n## Usage\n\n### Prerequisite\n\n#### **Nix**\n\n##### using Nix Flake\n\nIf you are not familiar with Nix, it is recommended to read [this onboard by zero-to-nix](https://zero-to-nix.com/start/install) to get started.\n\nBut if you want to use Nix, go jump to command below:\n\n```console\ncurl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install\n```\n\n##### using Legacy Nix\n\n\u003cdetails\u003e\n    \u003csummary\u003eClick to expand\u003c/summary\u003e\n\n\n    | System                                         | Single User | Multiple User | Command                                                             |\n| ---------------------------------------------- | ----------- | ------------- | ------------------------------------------------------------------- |\n| **Linux**                                      | ✅          | ✅            | [Single User](#linux-single-user) • [Multi User](#linux-multi-user) |\n| **Darwin** (MacOS)                             | ❌          | ✅            | [Multi User](#darwin-multi-user)                                    |\n| [**More...**](https://nixos.org/download.html) |             |               |                                                                     |\n\n    ##### Linux Single User\n\n    ```console\nsh \u003c(curl -L https://nixos.org/nix/install) --daemon\n    ```\n\n    ##### Linux Multi User\n\n    ```console\nsh \u003c(curl -L https://nixos.org/nix/install) --no-daemon\n    ```\n\n    ##### Darwin Multi User\n\n    ```console\nsh \u003c(curl -L https://nixos.org/nix/install)\n    ```\n\n    #### Enable `experimental-features`\n\nIn general installation of nix, the nix configuration is located in `~/.config/nix/nix.conf`.\nYou **MUST** be set the `experimental-features` before use [this configuration](https://github.com/r17x/universe).\n\n    ```cfg\nexperimental-features = nix-command flakes\n\n// (optional) for distribution cache (DON'T COPY THIS COMMENT LINE)\nsubstituters = https://cache.nixos.org https://cache.nixos.org/ https://r17.cachix.org\n    ```\n\n\u003c/details\u003e\n\n\n### Setup\n\nAfter you have installed Nix, you can use the following command to clone this repository:\n\nYou can use the following nix options on this repository:\n\n#### Using development environment\n```console\nnix develop github:r17x/universe#\u003cDEVELOPMENT_ENVIRONMENT_NAME\u003e\n```\n\u003e [!NOTE]\n\u003e `DEVELOPMENT_ENVIRONMENT_NAME` is only available by [devShells definitions](./nix/devShells.nix#L37:L175)\nnix build github:r17x/universe#darwinConfigurations.$HOSTNAME.system\n\n##### with `direnv`\n\n```console\necho \"use flake github:r17x/universe#\u003cDEVELOPMENT_ENVIRONMENT_NAME\u003e\" \u003e .envrc\ndirenv allow\n\n# example:\necho \"use flake github:r17x/universe#node20\" \u003e .envrc\ndirenv allow\n\u003e node -v\n\u003c v20.10.0\n\n\n```\n#### Activation `nix-darwin` for MacOS Environment\n\n##### Build\n\n```console\n\n# output `result` to `/tmp/result`\nnix build github:r17x/universe#darwinConfigurations.$HOSTNAME.system -o /tmp/result\n\n# example: nix build github:r17x/universe#darwinConfigurations.eR17x.system -o /tmp/result\n\n```\n\n##### Switch - `Activate`\n\n```console\n# run `darwin-rebuild switch` to switch to latest build\n# and wait until `darwin-rebuild` finish\n/tmp/result/sw/bin/darwin-rebuild switch --flake github:r17x/universe#$HOSTNAME \n\n# example: /tmp/result/sw/bin/darwin-rebuild switch --flake github:r17x/universe#eR17x \n```\n\n\u003e [!NOTE]\n\u003e `$HOSTNAME` is only available by [hosts definitions](./nix/hosts/default.nix#L107:L108)\n\n## `Alias` Command List\n\n* `drb` - darwin rebuild aliases - rebuild this nixpkgs.\n* `drs` - darwin rebuild and switch the build version (make current build to current version of environment).\n* `lenv` - list of build version `\u003cVERSION\u003e`, that's usefull for switch aka rollback environment.\n* `senv \u003cVERSION\u003e` - switch spesific version (number).\n\n## Resources \n\n### Options\n* [home-manager-options](https://home-manager-options.extranix.com/?query=\u0026release=master)\n\n## Acknowledgement\n\n* [**malob/nixpkgs**](https://github.com/malob/nixpkgs) ~ [malob](https://github.com/malob) Nix System configs!.\n* [**srid/nixos-flake**](https://github.com/srid/nixos-flake) ~ for flake-parts inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr17x%2Funiverse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr17x%2Funiverse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr17x%2Funiverse/lists"}