{"id":18107728,"url":"https://github.com/zetavg/rails-nix-sample","last_synced_at":"2026-04-28T08:03:35.097Z","repository":{"id":42612049,"uuid":"176971455","full_name":"zetavg/rails-nix-sample","owner":"zetavg","description":"Minimum Rails app packaged by Nix","archived":false,"fork":false,"pushed_at":"2023-01-19T12:12:37.000Z","size":251,"stargazers_count":1,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-03T10:50:35.104Z","etag":null,"topics":["nix","rails","sample","sample-project"],"latest_commit_sha":null,"homepage":"https://rails.sample.serv.cat/","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/zetavg.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}},"created_at":"2019-03-21T15:17:41.000Z","updated_at":"2020-03-01T10:10:51.000Z","dependencies_parsed_at":"2023-01-28T17:02:01.098Z","dependency_job_id":null,"html_url":"https://github.com/zetavg/rails-nix-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zetavg/rails-nix-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetavg%2Frails-nix-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetavg%2Frails-nix-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetavg%2Frails-nix-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetavg%2Frails-nix-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zetavg","download_url":"https://codeload.github.com/zetavg/rails-nix-sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetavg%2Frails-nix-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"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":["nix","rails","sample","sample-project"],"created_at":"2024-10-31T23:13:22.775Z","updated_at":"2026-04-28T08:03:35.079Z","avatar_url":"https://github.com/zetavg.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Rails App with Nix\n\nThis is a sample Rails application packaged with [Nix, The Purely Functional Package Manager](https://nixos.org/nix/).\n\n## Development\n\nYou can enter the development environment by either running `nix-shell` at the project root (where there's the `default.nix`), or with [direnv](https://direnv.net/) installed then just `cd` into the project.\n\n### Update Dependencies\n\nIf you add or removed some dependency, say after editing `Gemfile`, run `bin/update-dependencies` to get them updated.\n\n## Install in Nix Environment\n\nTo install the application into your Nix Environment, `cd` into the project directory then run:\n\n```bash\nnix-env --install -f default.nix\n```\n\nAfterwards, you can start the application server by running `sample-rails-app-rails server`, or get into the console with `sample-rails-app-rails console`. Other executables such as `sample-rails-app-setup` are available as well.\n\n## Use as a Package\n\nYou can also use this application as a dependent package, living under a system service such as Nginx + Passenger:\n\n```nix\n# NixOS Configuration\n{ ... }:\n\nlet\n  mkTheSampleRailsApp = import path/to/the/project/directory;\n  app = mkTheSampleRailsApp {\n    actionCable = {\n      adapter = \"redis\";\n      url = \"redis://localhost:6379/0\";\n      channel_prefix = \"sample-app-cable\";\n    };\n  };\nin {\n  services.nginx = {\n    virtualHosts.\"sample.rails.app\" = {\n      root = \"${app}/public\";\n      extraConfig = ''\n        passenger_enabled on;\n        passenger_sticky_sessions on;\n        passenger_ruby ${app.ruby}/bin/ruby;\n        passenger_env_var GEM_HOME ${app.gemHome};\n        passenger_env_var BUNDLE_GEMFILE ${app.bundleGemfile};\n        passenger_env_var BUNDLE_PATH ${app.bundlePath};\n        location /cable {\n          passenger_app_group_name ${app.name}_action_cable;\n          passenger_force_max_concurrent_requests_per_process 0;\n        }\n      '';\n    };\n  };\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetavg%2Frails-nix-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzetavg%2Frails-nix-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetavg%2Frails-nix-sample/lists"}