{"id":23974100,"url":"https://github.com/anders130/modulix","last_synced_at":"2026-04-04T12:58:40.828Z","repository":{"id":270767096,"uuid":"911190454","full_name":"anders130/modulix","owner":"anders130","description":"library for creating modularized nixos hosts","archived":false,"fork":false,"pushed_at":"2025-03-25T12:26:04.000Z","size":102,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T17:51:32.458Z","etag":null,"topics":["flakes","library","modulix","nix","nix-modules","nixos"],"latest_commit_sha":null,"homepage":"https://anders130.github.io/modulix/","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/anders130.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}},"created_at":"2025-01-02T12:53:34.000Z","updated_at":"2025-03-25T12:26:07.000Z","dependencies_parsed_at":"2025-01-03T21:30:56.455Z","dependency_job_id":"1a11cf83-0e2f-482b-9f8a-76dc8a560617","html_url":"https://github.com/anders130/modulix","commit_stats":null,"previous_names":["anders130/modulix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anders130/modulix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2Fmodulix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2Fmodulix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2Fmodulix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2Fmodulix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders130","download_url":"https://codeload.github.com/anders130/modulix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2Fmodulix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31400460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":["flakes","library","modulix","nix","nix-modules","nixos"],"created_at":"2025-01-07T05:21:30.519Z","updated_at":"2026-04-04T12:58:40.808Z","avatar_url":"https://github.com/anders130.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# modulix\n\nA NixOS configuration framework that simplifies host and module management using a structured approach, built upon [haumea](https://github.com/nix-community/haumea).\n\nPlease see the [docs](https://anders130.github.io/modulix) for more information.\n\n## Basic Usage\n\nTo use this library, you need to have enabled the following experimental features:\n\n```conf\nexperimental-features = nix-command flakes pipe-operators\n```\n\nLook at the [example](./example) directory for a working example.\n\n`flake.nix`:\n\n```nix\n{\n    inputs = {\n        nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\";\n        modulix = {\n            url = \"github:anders130/modulix\";\n            inputs.nixpkgs.follows = \"nixpkgs\";\n        };\n    };\n\n    outputs = inputs: {\n        nixosConfigurations = inputs.modulix.lib.mkHosts {\n            inherit inputs;\n            src = ./hosts-directory; # optional (defaults to ./hosts)\n            flakePath = \"/path/to/flake\"; # for lib.mkSymlink\n            modulesPath = ./modules-directory; # optional\n            specialArgs = {\n                hostname = \"nixos\";\n                # put in your specialArgs like above\n            };\n        };\n    };\n}\n```\n\n### `hosts`-directory\n\nThe `hosts`-directory should contain a directory for each host you want to configure. The directory name will be the hostname of the host.\nThe host directory should contain a `default.nix` and a `config.nix`. The `default.nix` should contain the configuration for the host. The `config.nix` should contain the values for the specialArgs.\n\n```\n\nhosts\n├── host1\n│ ├── config.nix\n│ └── default.nix\n└── host2\n  ├── config.nix\n  └── default.nix\n\n```\n\nexample `config.nix`:\n\n```nix\ninputs: {\n    system = \"x86_64-linux\";\n    username = \"user1\";\n    hostname = \"host1\";\n    modules = [inputs.some-module.nixosModules.some-module];\n}\n```\n\n**default specialArgs**\n\nThe default specialArgs are:\n\n```nix\n{\n    isThinClient = false; # if true, lib.mkSymlink will use the store path instead of the flake path\n    system = \"x86_64-linux\"; # the system of the host\n    modules = []; # additional modules to add to the host\n}\n```\n\n### `modules`-directory\n\nThe `modules`-directory should contain a directory or a file for each module you want to declare.\n\nYou can declare simple to complex modules:\n\n```nix\n{\n    options = {\n        someOption = mkOption {\n            type = types.bool;\n            default = false;\n            description = \"Some option\";\n        };\n    };\n\n    config = cfg: {\n        someConfig = cfg.someOption;\n    };\n}\n```\n\n## Contributing\n\nContributions are welcome!\n\n### Documentation\n\nThe documentation is written in [mdbook](https://rust-lang.github.io/mdBook/) and can be found in the [docs](./docs) directory.\nYou can start a local server with:\n\n```bash\ncd docs\nnix develop\n```\n\nTo build the documentation locally, run the following command:\n\n```bash\ncd docs\nnix build\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders130%2Fmodulix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders130%2Fmodulix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders130%2Fmodulix/lists"}