{"id":20784923,"url":"https://github.com/emad-elsaid/archlinux","last_synced_at":"2025-11-09T04:03:57.683Z","repository":{"id":178038570,"uuid":"661279789","full_name":"emad-elsaid/archlinux","owner":"emad-elsaid","description":"Configuration DSL for Archlinux, similar to /etc/nixos/configuration.nix but uses your normal archlinux tools (pacman, systemd, gnu-utils) and doesn't do weird acrobat with stores and stuff","archived":false,"fork":false,"pushed_at":"2024-04-21T08:25:23.000Z","size":1246,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T14:53:59.632Z","etag":null,"topics":["archlinux","linux","nixos"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/emad-elsaid.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":"2023-07-02T11:00:03.000Z","updated_at":"2025-03-19T19:34:00.000Z","dependencies_parsed_at":"2023-12-16T21:27:27.746Z","dependency_job_id":"0a0894fa-c283-49c3-8ab4-81d2bb687fbd","html_url":"https://github.com/emad-elsaid/archlinux","commit_stats":null,"previous_names":["emad-elsaid/archlinux"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emad-elsaid/archlinux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emad-elsaid%2Farchlinux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emad-elsaid%2Farchlinux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emad-elsaid%2Farchlinux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emad-elsaid%2Farchlinux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emad-elsaid","download_url":"https://codeload.github.com/emad-elsaid/archlinux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emad-elsaid%2Farchlinux/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266604008,"owners_count":23954725,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["archlinux","linux","nixos"],"created_at":"2024-11-17T14:34:32.640Z","updated_at":"2025-07-23T02:04:20.358Z","avatar_url":"https://github.com/emad-elsaid.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Archlinux\n\n[![Gem Version](https://badge.fury.io/rb/archlinux.svg)](https://badge.fury.io/rb/archlinux)\n\n\u003e [!WARNING]\n\u003e this can break your system, don't use it on your running system\n\nA ruby API to manage the state of an Archlinux system.\n\n* This project is early alpha\n* It aims to have a DSL like NixOS for Archlinux\n* It allow declaring the state of the system then it applies that to the current system\n* The idea is to have simple and user friendly API to declare everything, system and user related\n\n## Getting started\n\nThe project is a Ruby Gem. Create a ruby file and require the gem:\n\n```ruby\nrequire 'bundler/inline'\n\ngemfile do\n  source \"https://rubygems.org\"\n\n  gem \"archlinux\", github: \"emad-elsaid/archlinux\"\nend\n```\n\nUse `linux` function to define your system state, for example:\n\n```ruby\nlinux do\n  hostname 'earth'\n\n  timedate timezone: 'Europe/Berlin',\n           ntp: true\n\n  locale \"en_US.UTF-8\"\n  keyboard keymap: 'us',\n           layout: \"us,ara\",\n           model: \"\",\n           variant: \"\",\n           options: \"ctrl:nocaps,caps:lctrl,ctrl:swap_lalt_lctl,grp:alt_space_toggle\"\n\n  package %w[\n          linux\n          linux-firmware\n          linux-headers\n          base\n          base-devel\n          bash-completion\n          pacman-contrib\n          docker\n          locate\n          syncthing\n          ]\n\n  service %w[\n          docker\n          NetworkManager\n          ]\n\n  timer 'plocate-updatedb'\n\n  user 'smith', groups: ['wheel', 'docker'] do\n    aur %w[\n        kernel-install-mkinitcpio\n        google-chrome\n        ]\n\n    service %w[\n            ssh-agent\n            syncthing\n            ]\n\n    copy './user/.config/.', '/home/smith/.config'\n  end\n\n  firewall :syncthing\n\n  on_finalize do\n    sudo 'bootctl install'\n    sudo 'reinstall-kernels'\n  end\n\n  file '/etc/X11/xorg.conf.d/40-touchpad.conf', \u003c\u003c~EOT\n  Section \"InputClass\"\n          Identifier \"libinput touchpad catchall\"\n          MatchIsTouchpad \"on\"\n          MatchDevicePath \"/dev/input/event*\"\n          Driver \"libinput\"\n          Option \"Tapping\" \"on\"\n          Option \"NaturalScrolling\" \"true\"\n  EndSection\n  EOT\n\n  replace '/etc/mkinitcpio.conf', /^(.*)base udev(.*)$/, '\\1systemd\\2'\nend\n```\n\nNow you can run the script with ruby as root:\n\n```shell\nsudo ruby \u003cscript-name.rb\u003e\n```\n\n\nIt will do the following:\n- Install missing packages, remove any other package\n- Make sure services and timers are running\n- Do other configurations like locale, X11 keyboard settings, hostname\n- Ensure users are created and in specified groups\n\n\n# Concepts\n\n## Declarations:\n\nFunctions the user will run to declare the state of the system like packages to\nbe present, files, services, user, group...etc\n\n## Utilities:\n\nMethods for logging and small predicates, technically any ruby method is a\nutility. calling it executes the code directly instead of declaring a state.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femad-elsaid%2Farchlinux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femad-elsaid%2Farchlinux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femad-elsaid%2Farchlinux/lists"}