├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 JT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rustux 2 | 3 | A thought experiment in creating a Rust-based Linux distro. 4 | 5 | Note: this is UNSUPPORTED. It's just for fun :D 6 | 7 | ## Picking the distro 8 | 9 | For this experiment, I picked [Arch linux](https://archlinux.org/) as it felt like the easiest way to start with a known, well-supported base. You could also use some of the Linux-from-scratch style distros. 10 | 11 | For the installation of Arch, I chose to only install the basic graphical system without installing any desktops. We'll pick our window manager later. 12 | 13 | For this I chose: `archlinux-2022.06.01-x86_64.iso` 14 | 15 | Then `archinstall` on boot. 16 | Then, I set the profile to the `xorg` profile. Made a user. Set up NetworkManager. 17 | Finish the install and reboot and we're in. Now to start installing our Rust tools. 18 | 19 | ## Installing Rust 20 | 21 | Install Rust via [rustup](https://rustup.rs/) 22 | If you chose Arch, you can also install [paru](https://github.com/Morganamilo/paru) (a Rust-based AUR tool). It will also install Rust for you. 23 | 24 | You may want to install [rust-analyzer](https://github.com/rust-lang/rust-analyzer) to go with helix (below). 25 | 26 | ## Install our first tools 27 | 28 | Once Rust is installed, it's time to add some good commandline tools to help us do the rest of the setup. Arch doesn't come with vim by default. That's okay, we have [helix](https://github.com/helix-editor/helix). 29 | 30 | You can also install `ripgrep` and `fd-find` from cargo here. 31 | 32 | ## Install leftwm 33 | 34 | Install [leftwm](https://github.com/leftwm/leftwm), a Rust-based window manager 35 | Install [leftwm-theme](https://github.com/leftwm/leftwm-theme), so we can easily pick a theme 36 | 37 | You may also want to install `elogind` if you have any issues getting leftwm to work. 38 | 39 | ## Install alacritty 40 | 41 | We need a terminal, and [alacritty](https://github.com/alacritty/alacritty) fits the bill. 42 | 43 | You may also want to configure `leftwm` to run alacritty as your default terminal. 44 | 45 | ## Startup X 46 | 47 | Let's configure leftwm and get into a graphical environment. 48 | 49 | With `elogind`, we can make our .xinitrc: 50 | 51 | ```shell 52 | # .xinitrc 53 | exec dbus-launch leftwm 54 | ``` 55 | 56 | Then `startx` and we're in. 57 | 58 | ## Shell 59 | 60 | Let's give ourselves a shell. [nushell](https://github.com/nushell/nushell) is great. You can install [starship](https://github.com/starship/starship) to go with it. 61 | 62 | You may want to install some nerd fonts to get the most out of these. 63 | 64 | `let-env EDITOR = "helix"` will let you set a default editor. 65 | 66 | If you want to make `nu` your default shell, you may want to run `config env` and set up the PATH to be what you want. You can put something like this at the bottom. 67 | 68 | ```nushell 69 | let-env PATH = [ 70 | # all your paths 71 | ] 72 | ``` 73 | 74 | ## Areas that need some love 75 | 76 | Graphical apps in general. There are [some](https://github.com/rust-unofficial/awesome-rust) but it's still really early days for Rust and graphical apps. 77 | 78 | We don't have a browser. If you're brave, you can try using [servo](https://github.com/servo/servo). 79 | 80 | ## Going further 81 | 82 | You can go deeper by installing the [rewrite of coreutils to Rust](https://github.com/uutils/coreutils) 83 | 84 | --------------------------------------------------------------------------------