{"id":30659837,"url":"https://github.com/noteed/firefox-vm","last_synced_at":"2025-10-25T13:01:58.729Z","repository":{"id":285236886,"uuid":"957476662","full_name":"noteed/firefox-vm","owner":"noteed","description":"A NixOS VM containing Firefox","archived":false,"fork":false,"pushed_at":"2025-03-30T13:27:00.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T14:25:54.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/noteed.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":"2025-03-30T13:25:12.000Z","updated_at":"2025-03-30T13:27:03.000Z","dependencies_parsed_at":"2025-03-30T14:25:58.773Z","dependency_job_id":"0f23f81e-1d55-44b8-907d-8ada5721b2db","html_url":"https://github.com/noteed/firefox-vm","commit_stats":null,"previous_names":["noteed/firefox-vm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noteed/firefox-vm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noteed%2Ffirefox-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noteed%2Ffirefox-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noteed%2Ffirefox-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noteed%2Ffirefox-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noteed","download_url":"https://codeload.github.com/noteed/firefox-vm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noteed%2Ffirefox-vm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272983158,"owners_count":25026048,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"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":[],"created_at":"2025-08-31T13:06:23.274Z","updated_at":"2025-10-25T13:01:58.622Z","avatar_url":"https://github.com/noteed.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is an attempt at running Firefox in a NixOS VM. I've tried Playwright, but\nmaybe a \"real\" Firefox will allow something more accurate (e.g. start Firefox\nwith a configuration for high-dpi display).\n\n# Run the VM interactively\n\n```\n$ scripts/runvm.sh\n```\n\nUse Ctrl-Alt-F to exit the fullscreen mode, and use Ctrl-Alt-Q to quit QEMU\n(this doesn't work while in fullscreen).\n\n# Run the VM as a NixOS test\n\nDisabling the sandbox is necessary to allow the VM to have network access. The\nresult contains a screenshot of the Refli web site.\n\n```\n$ nix-build --no-out-link vm-test.nix --option sandbox false\n```\n\n# Notes\n\nThe above `runvm.sh` script is already configured to do the \"right things\" but\nhere is how I achieved it manually first.\n\nIn the VM, to use 2880x1920:\n\n```\n$ gtf 2880 1920 60\n$ xrandr --newmode \"2880x1920_60.00\" 473.06 2880 3104 3424 3969 1920 1921 1924 1987 -HSync +Vsync\n$ xrandr --addmode Virtual-2 \"2880x1920_60.00\"\n$ xrandr --output Virtual-2 --mode \"2880x1920_60.00\"\n```\n\nThe corresponding NixOS bits are\n\n```\n  services.xserver = {\n    monitorSection = ''\n      Modeline \"2880x1920_60.00\" 473.06 2880 3104 3424 3968 1920 1921 1924 1987 -HSync +Vsync\n      Option \"PreferredMode\" \"2880x1920_60.00\"\n    '';\n  };\n```\n\nIn Firefox `about:config`: `layout.css.devPixelsPerPx` is set to 0.9. Then\nrestart Firefox.\n\nThe default font size is set to 14.\n\nIn the console, `window.devicePixelRatio` equals 2.4. (When\n`layout.css.devPixelsPerPx` equals -1, it equals 2.60869).\n\nThis means that on a fullscreen 2880x1920 window, Firefox reports a viewport of\n1200x800.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoteed%2Ffirefox-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoteed%2Ffirefox-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoteed%2Ffirefox-vm/lists"}