{"id":27183170,"url":"https://github.com/99linesofcode/home-manager","last_synced_at":"2026-01-30T14:26:52.776Z","repository":{"id":277231544,"uuid":"930319050","full_name":"99linesofcode/home-manager","owner":"99linesofcode","description":"Declarative and reproducible Linux environments using Nix and Home-Manager ","archived":false,"fork":false,"pushed_at":"2026-01-22T16:34:59.000Z","size":917,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-23T09:24:58.569Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/99linesofcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-02-10T12:51:19.000Z","updated_at":"2026-01-12T23:35:23.000Z","dependencies_parsed_at":"2025-02-12T21:26:30.890Z","dependency_job_id":"55d545ab-8979-4725-9785-654a29dc22a9","html_url":"https://github.com/99linesofcode/home-manager","commit_stats":null,"previous_names":["99linesofcode/home-manager"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/99linesofcode/home-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99linesofcode%2Fhome-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99linesofcode%2Fhome-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99linesofcode%2Fhome-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99linesofcode%2Fhome-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/99linesofcode","download_url":"https://codeload.github.com/99linesofcode/home-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99linesofcode%2Fhome-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-04-09T15:55:32.329Z","updated_at":"2026-01-30T14:26:52.752Z","avatar_url":"https://github.com/99linesofcode.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home-Manager\n\nMy flake based standalone [home-manager](https://nix-community.github.io/home-manager/) configuration. While I run NixOS on all of my systems I prefer using Home Manager so it can be used irrespective of the Linux operating system.\n\n## How to Use\n\nHome-manager is a Nix powered tool and while knowledge of [Nix](https://nix.dev), the [Nix Module System](https://nix.dev/tutorials/module-system/) and [Nix Flakes](https://nix.dev/concepts/flakes) will make your life a lot easier, I've set up this repository in such a way that you should be able to get up and running in no time. I've made a conscious effort to stay away from libraries such as [flake-utils](https://github.com/numtide/flake-utils) to keep things simple and remain as close to the Nix language as possible.\n\nTo start using this repository to manage your own dotfiles with Nix, there are only a couple of things you need to do:\n\n1. Make sure that your system has both Nix and Home Manager installed;\n1. Define a `HomeConfiguration` for your host and user;\n1. Add a custom user configuration under `hosts/`;\n1. Configure your user and enable any Nix Modules found in `modules/` that you would like to use;\n1. Add encrypted secrets if you are using any modules that depend on [SOPS](https://github.com/getsops/sops);\n1. Activate your configuration.\n\n#### Defining a `HomeConfiguration`\n\nThe `HomeConfiguration` function is defined in `flake.nix`. `Outputs` returns an attribute set with `homeConfigurations` containing one or more `HomeConfiguration`. Below you can find an example of the one I use for the host `luna` and username `shorty`:\n\nhttps://github.com/99linesofcode/home-manager/blob/50fff4aeadfcc5a513a75e7e49599a625559c635/flake.nix#L58-L66\n\nThe `hostname`, `username` and `role` arguments passed as `extraSpecialArgs` are used to determine which `hosts/{hostname}/role/{role}/` and `hosts/{hostname}/users/{username}/` configuration will get used.\n\n#### Add a user configuration\n\nThe `HomeConfiguration` function automatically imports `hosts/`. `default.nix` is used as a default file when importing directories:\n\nhttps://github.com/99linesofcode/home-manager/blob/50fff4aeadfcc5a513a75e7e49599a625559c635/hosts/default.nix#L16-L23\n\nAs you can see this file imports the `shared/` and the `hosts/{hostname}/` directories which in turn contain their own `default.nix` files with their own import logic. Every one of these files is in and of itself nothing but a simple Nix module.\n\n### Configure your user and enable Nix modules\n\nReusable modules that have already been built live in the `modules/` directory. Most of them are pretty straightforward and consist of a simple `mkEnableOption` and the relevant module `config`. Let's look at a simple example:\n\nhttps://github.com/99linesofcode/home-manager/blob/50fff4aeadfcc5a513a75e7e49599a625559c635/modules/dunst.nix#L1-L23\n\nEnabling this module is as easy as adding `home.dunst.enable = true;` to your user's configuration. Take a look at [hosts/luna/users/shorty/default.nix](https://github.com/99linesofcode/home-manager/blob/50fff4aeadfcc5a513a75e7e49599a625559c635/hosts/luna/users/shorty/default.nix) for a complete example.\n\n#### Encrypted secrets\n\nSecrets such as your SSH keys, configuration files containing authentication tokens or anything else you might want to hide from the outside world and restrict access to are encrypted and managed through SOPS. Decrypting, storing and using them within Nix is done through https://github.com/Mic92/sops-nix.\n\nThe `.sops.yaml` file configures the public keys that will be used to encrypt files in certain directories:\n\nhttps://github.com/99linesofcode/home-manager/blob/50fff4aeadfcc5a513a75e7e49599a625559c635/.sops.yaml#L2-L20\n\nAs you can see I've configured both the `master` and `luna_shorty` keys to be able to encrypt (and decrypt) files under `hosts/shared/secrets/`, `hosts/luna/secrets/` and `hosts/luna/users/{username}/secrets/`.\n\nEverytime you use sops to create a file inside one of these directories they will automatically be encrypted with the referenced public keys. Either private key corresponding to one of the public keys can then be used to decrypt the file. Be sure to check out the SOPS repository to learn more.\n\nNow that we've encrypted our secrets, the last step is to learn how to use them inside your Nix modules. SOPS supports a variety of formats but here is an example of how to import a binary file and expose it to your Nix module using the already built in `sops-nix` library:\n\nhttps://github.com/99linesofcode/home-manager/blob/50fff4aeadfcc5a513a75e7e49599a625559c635/modules/rclone.nix#L21-L28\n\nWhen switching to your new configuration, `sops-nix` will use `sops` to decrypt the file using the private key stored in `$XDG_CONFIG_HOME/sops/age/keys.txt` and make it available under `XDG_RUNTIME_DIR/secrets.d` and, in this case, create a symlink to that file under `$HOME/.config/rclone/rclone.conf;`. \n\n#### Activate your configuration\n\nCongratulations, you should now have all the pieces to cobble together your own - declaractive - Linux environment using Nix and Home Manager! Once you're ready to check out your work, simply run the following command and enjoy:\n\n`home-manager switch --flake .#{homeConfigAttributeName}` where `{homeConfigAttributeName}` is something like `luna.shorty` in my examples.\n\n## Work In Progress\n\nI've only just started along this journey of Nix myself and there are still quite a few bits and bobs that are missing or a little rough around the edges. For example, some programs might not be bundled with the right module. I'm sure I'll get around to it some day but please be aware that you might run into some issues along the way. If you do, please [create a new issue](https://github.com/99linesofcode/home-manager/issues/new/choose) and I'd be happy to help you sort 'em out.\n\n## Contributing\n\nPlease review our [Contribution Guidelines](https://github.com/99linesofcode/.github/blob/main/.github/CONTRIBUTING.md).\n\n## Code of Conduct\n\nIn order to ensure that the community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/99linesofcode/.github?tab=coc-ov-file).\n\n## Security Vulnerabilities\n\nPlease review [our security policy](https://github.com/99linesofcode/.github?tab=security-ov-file) on how to report security vulnerabilities.\n\n## License\n\nThis software is open source and licensed under the [MIT license](https://github.com/99linesofcode/.github?tab=MIT-1-ov-file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F99linesofcode%2Fhome-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F99linesofcode%2Fhome-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F99linesofcode%2Fhome-manager/lists"}