dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit 2233c9110d74718e791220a9c1ef55e7b048c8c8 parent 16debb3a6df786d6747022a4eb9f945f6a48bfbd Author: maydayv7 <maydayv7@gmail.com> Date: Tue, 30 Dec 2025 18:16:54 +0530 docs: Update Also fix `swaync` styling
Diffstat:
| M | README.md | | | 57 | +++++++++++++++++++++++++++++++++++---------------------- |
| M | devices/README.md | | | 8 | ++++++-- |
| M | files/README.md | | | 3 | ++- |
| M | files/swaync.css | | | 12 | +++++++++--- |
| M | modules/README.md | | | 9 | +++++---- |
| M | scripts/README.md | | | 4 | ++-- |
| M | secrets/README.md | | | 9 | +++++++-- |
| M | site/README.md | | | 2 | +- |
| M | users/README.md | | | 6 | ++++-- |
9 files changed, 71 insertions(+), 39 deletions(-)
diff --git a/README.md b/README.md @@ -4,9 +4,14 @@ <img alt="Logo" src="files/images/logo/dark.png"> </picture> -  [](https://nixos.org) + + +[](https://nixos.org) -This [repository](https://github.com/maydayv7/dotfiles) contains the configuration and `dotfiles` for my continuously evolving multi-PC setup (using [Nix](https://nixos.org/)). All the devices I own, controlled by code. It also builds and deploys my website to [maydayv7.site](https://maydayv7.site). You can follow along with my [NixOS Desktop](https://maydayv7.site/series/nixos-desktop/) Series +This [repository](https://github.com/maydayv7/dotfiles) contains the configuration and `dotfiles` for my continuously evolving multi-PC setup (using [Nix](https://nixos.org/)). +All the devices I own, controlled by code. +It also builds and deploys my website to [maydayv7.site](https://maydayv7.site). +You can follow along with my [NixOS Desktop](https://maydayv7.site/series/nixos-desktop/) Series <details> <summary><b>Pictures</b></summary> @@ -88,7 +93,7 @@ This [repository](https://github.com/maydayv7/dotfiles) contains the configurati - Comprehensive User Configuration using the [`home-manager`](https://github.com/nix-community/home-manager) module, with [support](./modules/user/default.nix) for setting global conditionals and shared/user-specific configuration - Ephemeral, Opt-In filesystem state using the [`impermanence`](https://github.com/nix-community/impermanence) module and [ZFS](https://zfsonlinux.org/) - Support for Secure Boot using [`lanzaboote`](https://github.com/nix-community/lanzaboote) -- Support for multiple development [`shells`](./shells) integrated with [`direnv`](https://direnv.net/) and [`lorri`](https://github.com/nix-community/lorri) +- Multiple development [`shells`](./shells) integrated with [`direnv`](https://direnv.net/) and [`lorri`](https://github.com/nix-community/lorri) - Automatic `packages` updates using [`update.sh`](./packages/update.sh) - Syntax [formatting](./modules/nix/format.nix) using [`treefmt`](https://github.com/numtide/treefmt) - Support for `source` filters with [`nix-filter`](https://github.com/numtide/nix-filter) @@ -218,21 +223,24 @@ github:maydayv7/dotfiles <details> <summary><b>Already Installed</b></summary> -In case you want to use my configuration as-is for a fresh NixOS install, you can try the following steps: +To use my configuration as-is for a fresh NixOS installation, you can try the following steps: -**_Note:_** You can run `nix develop` in the repository to install all required dependencies +**_Note:_** Run `nix develop` in the repository to install all required dependencies -1. Prepare `/etc/nixos`: <pre><code>sudo mkdir /etc/nixos +1. Prepare `/etc/nixos`: + <pre><code>sudo mkdir /etc/nixos sudo chown $USER /etc/nixos && sudo chmod ugo+rw /etc/nixos cd /etc/nixos </code></pre> -2. Clone this repository (and preferably initialize it using `git`): <pre><code>nix flake init -t github:maydayv7/dotfiles +2. Clone this repository (and preferably initialize it using `git`): + <pre><code>nix flake init -t github:maydayv7/dotfiles git init </code></pre> 3. Install `gnupg` and generate a GPG Key for yourself (if you don't already have one), and include it in the [`secrets.yaml`](./secrets/secrets.yaml) file (using `gpg --list-keys`). You can use the following commands to generate the GPG key (Ultimate trust and w/o passphrase is preferred): - _Replace_ **_USER_** _,_ **_EMAIL_** _and_ **_COMMENT_** <pre><code>gpg --full-generate-key + _Replace_ **_USER_** _,_ **_EMAIL_** _and_ **_COMMENT_** + <pre><code>gpg --full-generate-key 1 4096 0 @@ -244,14 +252,16 @@ In case you want to use my configuration as-is for a fresh NixOS install, you ca gpg --output public.pgp --armor --export <b><i>USER</i></b>@<b><i>EMAIL</i></b> gpg --output private.pgp --armor --export-secret-key <b><i>USER</i></b>@<b><i>EMAIL</i></b> </code></pre> + _Save the keys `public.gpg` and `private.gpg` in a secure location_ 4. Import all required GPG Keys into a convenient location (like `/etc/gpg`) using <code>gpg --homedir <i>DIR</i> import</code> and specify it at `config.sops.gnupg.home` (Required for decryption of `secrets` on boot, can also be on an external drive) 5. Make new `secrets` and `passwords` in the desired directories by appending the paths to `secrets.yaml` and then using the following command (The [`nixos`](./scripts/README.md) script can be used to simplify the process): - _Replace_ **_PATH_** _with the path to the `secret`_ <pre><code>sops --config <i>/path/to/<b>secrets.yaml</b></i> -i <b><i>PATH</i></b></code></pre> + _Replace_ **_PATH_** _with the path to the `secret`_ + <pre><code>sops --config <i>/path/to/<b>secrets.yaml</b></i> -i <b><i>PATH</i></b></code></pre> -6. Add device-specific configuration by creating a new file in [`devices`](./devices) (bear in mind that the name of the file must be same as the `HOSTNAME` of your device), and if required, hardware configuration using the `hardware.modules` option. Do keep in mind that the filesystems must be appropriately created and labeled as defined [here](./modules/hardware/filesystem.nix). +6. Add device-specific configuration by creating a new file in [`devices`](./devices). Do keep in mind that the filesystems must be appropriately created and labeled as defined [here](./modules/hardware/filesystem.nix). 7. Finally, run `nixos-rebuild switch --flake /etc/nixos#HOSTNAME` (as `root`) to switch to the configuration! @@ -362,7 +372,7 @@ _Replace_ **_DEVICE_** _with the name of Device to build_ #### Partition Scheme -_Note that the `install` script automatically creates and labels all the required partitions, so it is recommended that only the partition table on the disk be created and have enough free space_ +_The `install` script handles partition creation and labeling, so it is recommended to create only the partition table and ensure sufficient free space_ | Name | Label | Format | Size (minimum) | | :------------- | :----: | :----: | :------------: | @@ -386,7 +396,8 @@ _In case you are using the `advanced` filesystem scheme, you may need to set the <details> <summary><b>Build It Yourself</b></summary> -If you really want to get dirty with Nix and decide to invest oodles of your time into building your own configuration, this repository can be used as inspiration. You can check out the list of links below to resourceful Nix documentation/tutorials/projects that may be helpful in your endeavour +If you really want to get dirty with Nix and decide to invest oodles of your time into building your own configuration, this repository can be used as inspiration. +You can check out the list of links below to resourceful Nix documentation/tutorials/projects that may be helpful in your endeavour. **Welcome** to the Nix Community! ;) @@ -396,19 +407,20 @@ If you really want to get dirty with Nix and decide to invest oodles of your tim ### Caution -This repository contains my personal configuration, and may cause undesirable effects on other systems. It may also be subject to rapid undocumented changes, and uses Nix [Flakes](https://wiki.nixos.org/wiki/Flakes), an experimental feature +This repository contains my personal configuration, and may cause undesirable effects on other systems. +It may also be subject to rapid undocumented changes, and uses Nix [Flakes](https://wiki.nixos.org/wiki/Flakes), an experimental feature. > [!NOTE] > Required Nix Version >= 2.19 -It is not recommended to use NixOS if you are a beginner just starting out, without acquaintance with either the command-line or functional programming languages, since the learning curve is steep, debugging issues is difficult, documentation is shallow, and the effort required/time spent isn't worth the hassle for a novice/casual user +It is not recommended to use NixOS if you are a beginner just starting out, without acquaintance with either the command-line or functional programming languages, since the learning curve is steep, debugging issues is difficult, documentation is shallow, and the effort required/time spent isn't worth the hassle for a novice/casual user. ### Platform _May change according to available hardware_ -This configuration works well with an Intel CPU + iGPU, and is currently being improved to support an AMD APU + Nvidia GPU. Any other setup is untested -The `hardware.modules` option can be used to load relevant configuration from [`nixos-hardware`](https://github.com/nixos/nixos-hardware) +This configuration works well with an Intel CPU + iGPU, and is currently being improved to support an AMD APU + Nvidia GPU. Any other setup is untested. +The `hardware.modules` option can be used to load relevant configuration from [`nixos-hardware`](https://github.com/nixos/nixos-hardware). See [this](./modules/hardware/README.md) for additional information @@ -418,16 +430,20 @@ The system build cache is publicly hosted using [Cachix](https://www.cachix.org) ### Continuous Integration -This repository makes use of [`GitHub Actions`](./checks/github/workflows) in order to automatically check the configuration syntax on every commit and format it (using [`treefmt-nix`](https://github.com/numtide/treefmt-nix)), update the `inputs` and build the Install Media `.iso` every month, and upload the build cache to [Cachix](https://app.cachix.org/cache/maydayv7-dotfiles) (You can also find `GitLab CI/CD` configuration in [`.gitlab`](./checks/gitlab/.gitlab-ci.yml)). A `git` [hook](./.git-hooks) is used to check the commit message to adhere to the [`Conventional Commits`](https://www.conventionalcommits.org) specification +This repository makes use of [`GitHub Actions`](./checks/github/workflows) in order to automatically check the configuration syntax on every commit and format it (using [`treefmt-nix`](https://github.com/numtide/treefmt-nix)), update the `inputs` and build the Install Media `.iso` every month, and upload the build cache to [Cachix](https://app.cachix.org/cache/maydayv7-dotfiles) (You can also find `GitLab CI/CD` configuration [here](./checks/gitlab/.gitlab-ci.yml)). +A `git` [hook](./files/git/hooks) is used to check the commit message to adhere to the [`Conventional Commits`](https://www.conventionalcommits.org) specification ##### Variables -- [`ACCESS_TOKEN`](./secrets/github-token.secret): Personal Access Token (To create one - [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)) +- [`ACCESS_TOKEN`](./secrets/github-token.secret): Personal Access Token + (To create one - [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)) - [`CACHIX_TOKEN`](./secrets/cachix-token.secret): Cachix Authentication Token ### Home Manager -The [`home-manager`](https://github.com/nix-community/home-manager) module is used in tandem with the system configuration in order to define user-specific configuration. The `config.user.homeConfig` option, from which the final user configuration is built, has been declared in [`modules/user/default.nix`](./modules/user/default.nix) in order to effortlessly configure shared configuration for all users of the system. The system `config` can be accessed using the `sys` parameter in `home-manager` modules +The [`home-manager`](https://github.com/nix-community/home-manager) module is used in tandem with the system configuration in order to define user-specific configuration. +The `config.user.homeConfig` option, from which the final user configuration is built, has been declared in [`modules/user/default.nix`](./modules/user/default.nix) in order to effortlessly configure shared configuration for all users of the system. +The system `config` can be accessed using the `sys` parameter in `home-manager` modules ## Links @@ -508,6 +524,3 @@ _Thanks a lot! ;)_ > Last Updated: **December** 2025 If you like this project, consider leaving a [star](https://github.com/maydayv7/dotfiles) - -**V 7** -<maydayv7@gmail.com> diff --git a/devices/README.md b/devices/README.md @@ -1,6 +1,10 @@ ### Devices -The `devices` directory contains the core definitions for multiple PCs and various other devices. To add a new device, simply create a configuration file for it (name of the file/directory must be the same as the `hostname` of the device) and write down the configuration using the options of the desired modules from the [`modules`](../modules/README.md) directory, or add your own configuration modules using the `imports` keyword. Optionally, add user-specific configuration in [`users`](../users/README.md). Then, run the command `nixos-rebuild switch --flake .#HOSTNAME` and let Nix do all the work for you! +The `devices` directory contains the core definitions for multiple PCs and various other devices. +To add a device, create a configuration file matching the device's `hostname`. +Define the configuration using options from the [`modules`](../modules/README.md) directory, or add your own modules using the `imports` keyword. +Optionally, add user-specific configuration in [`users`](../users/README.md). +Then, run the command `nixos-rebuild switch --flake .#HOSTNAME` and let Nix do all the work for you! #### Additional Options @@ -11,6 +15,6 @@ These are the options that can be used in addition to the ones exposed by the [` - `timezone`: System Time Zone - Ex. `"Asia/Kolkata"` - `locale`: Default Locale - Ex. `"IN"` - `kernel`: Linux Kernel to use (from `pkgs.linuxKernel.packages.linux_${kernel}`) - Ex. `zfs` -- `kernelModules`: Additional Kernel Modules (to add to `config.boot.initrd.availableKernelModules`) - Ex. `[ "nvme" ]` +- `kernelModules`: Additional Kernel Modules (added to `config.boot.initrd.availableKernelModules`) - Ex. `[ "nvme" ]` - `user` or `users` (--> `config.user.settings`): Used to specify Device User/Multiple Users per Device - Ex. `users = [ { name "1"; } { name = "2"; } ]` - `update`: Enable Automatic System Upgrades - Ex. `weekly` diff --git a/files/README.md b/files/README.md @@ -1,5 +1,6 @@ ### Dotfiles -The `files` directory is used to store all my plain-text program configuration files _(or as we all love to call it, the `dotfiles`)_ +The `files` directory is used to store all my plain-text program configuration files +_(or as we all love to call it, the `dotfiles`)_ Read [`flake.nix`](./flake.nix) to understand how they are used diff --git a/files/swaync.css b/files/swaync.css @@ -13,7 +13,9 @@ margin: 6px 12px; border-radius: 7px; border: solid 0.5px #@base05; - box-shadow: 0 0 8px rgba(0, 0, 0, 0.8), inset 0 0 0 1px #@base03; + box-shadow: + 0 0 8px rgba(0, 0, 0, 0.8), + inset 0 0 0 1px #@base03; padding: 0; } @@ -111,7 +113,9 @@ color: #@base05; padding: 14px; border-radius: 7px; - box-shadow: 0 0 8px rgba(0, 0, 0, 0.8), inset 0 0 0 1px #@base02; + box-shadow: + 0 0 8px rgba(0, 0, 0, 0.8), + inset 0 0 0 1px #@base02; } /* Title */ @@ -222,7 +226,9 @@ trough slider { } trough slider:hover { - box-shadow: 0 0 2px rgba(0, 0, 0, 0.8), 0 0 8px #@base0D; + box-shadow: + 0 0 2px rgba(0, 0, 0, 0.8), + 0 0 8px #@base0D; } /* Scrollbar */ diff --git a/modules/README.md b/modules/README.md @@ -1,6 +1,7 @@ ### Custom Configuration Modules -The `modules` directory contains custom-made pure Flakes-compatible configuration modules, which form the very core of my configuration for multiple PCs and various use-cases. The following is a summary of all the present configuration options exposed by the particular module: +The `modules` directory contains custom-made pure Flakes-compatible configuration modules, which form the very core of my configuration for multiple PCs and various use-cases. +The following is a summary of all the present configuration options exposed by the particular module: Configuration [Builder](./configuration.nix) @@ -15,7 +16,7 @@ Configuration [Builder](./configuration.nix) - `support`: Enable Support for `git` Runners - `"github" / "gitlab"` - `secret`: Path to Secret for `git` Runner - `wine` - - - `enable`: Install Utility Windows apps - `true / false` + - `utilities`: Install Utility Windows apps - `true / false` - `package`: Package to use for `wine` - Ex. `pkgs.winePackages.staging` - `logseq.style`: Path to Logseq Notes CSS - `ytmusic.style`: YouTube Music CSS @@ -73,7 +74,7 @@ Configuration [Builder](./configuration.nix) - `support`: List of Additional Supported Hardware - `[ "laptop" "mobile" "printer" "virtualisation" "blockchain" ]` - `vm`: Configure Virtualisation Support - - `android`: Enable Android Virtualisation - `true / false` - - `vfio`: Configure VFIO PCI passthrough - `true / false` + - `vfio`: Configure VFIO PCI passthrough - `"on" / "setup" / "off"` - `passthrough`: PCI Device IDs for VFIO - Ex. `[ "10de:28e0" "10de:22be" ]` - [`nix`](./nix): Module that configures the Nix Package Manager - @@ -93,8 +94,8 @@ Configuration [Builder](./configuration.nix) - `autologin`: Enable Automatic User Login - `"true" / "false"` - `minimal`: Enable Minimal User Configuration - `"true" / "false"` - `homeConfig`: User Specific Home Configuration + - `shells`: List of Additional Supported Shells - Ex. `[ "zsh" ]` - [`shell`](./shell): Module that contains User Shell Environment Configuration - - `utilities`: Enable Additional Shell Utilities - `true / false` - `prompt`: Enable Fancy Shell Prompt - `true / false` - - `support`: List of Additional Supported Shells - Ex. `[ "bash" ]` diff --git a/scripts/README.md b/scripts/README.md @@ -2,6 +2,6 @@ The `scripts` directory contains a combination of custom Bash Scripts (with `nix` shebangs, and can be run using <code><i>./path/to/script</i></code>) as well as ones written in conjunction with the Nix Syntax (which can be accessed by `github:maydayv7/dotfiles#apps.${system}`) -A system management script is present, invoked with the command [`nixos`](./nixos.nix), which can be used to apply user and device configuration changes, setup the device on first boot, and perform various other useful functions (If you have a working NixOS install, you can check it out using `nix run github:maydayv7/dotfiles`) +A system management script is present, invoked via the [`nixos`](./nixos.nix) command, which can be used to apply user and device configuration changes, setup the device on first boot, and perform various other useful functions (If you have a working NixOS install, you can check it out using `nix run github:maydayv7/dotfiles`) -There is also a system install script, invoked with the command [`os-install`](./install.nix), that painlessly installs the OS +There is also a system install script, invoked via the [`os-install`](./install.nix) command, that painlessly installs the OS diff --git a/secrets/README.md b/secrets/README.md @@ -1,5 +1,10 @@ ### Credentials -The authentication credentials are managed using [`sops-nix`](https://github.com/Mic92/sops-nix) at `secrets`. The [`sops`](https://github.com/mozilla/sops) encrypted secrets (using GPG authentication) are stored at multiple places, like in this directory, as well as [`users/passwords`](../users/passwords). User passwords are made using the command `mkpasswd -m sha-512` and specified using the `hashedPasswordFile` option. The `sops` encrypted secrets are of `binary` format (and have the extension `.secret`) and can be conveniently managed using the [`nixos`](../scripts/README.md) `secret` command. The `keys` directory contains the _public_ User GPG Keys which are automatically imported +The authentication credentials are managed using [`sops-nix`](https://github.com/Mic92/sops-nix) at `secrets`. +The [`sops`](https://github.com/mozilla/sops) encrypted secrets (using GPG) are stored at multiple places, like in this directory, as well as [`users/passwords`](../users/passwords). +User passwords are generated using `mkpasswd -m sha-512` and specified using the `hashedPasswordFile` option. +The `sops` encrypted secrets are of `binary` format (and have the extension `.secret`) and can be conveniently managed using the [`nixos`](../scripts/README.md) `secret` command. +The `keys` directory contains the _public_ User GPG Keys which are automatically imported -To create a secret, use the `nixos secret create` command, and append the directory along with requisite access permissions to the `secrets.yaml` file. Device-specific secrets are automatically imported, if a directory (with the same name as the device `HOSTNAME`) containing them is present in this directory +To create a secret, use the `nixos secret create` command, and append the directory along with requisite access permissions to the `secrets.yaml` file. +Device-specific secrets are automatically imported, if a directory (with the same name as the device `HOSTNAME`) containing them is present in this directory diff --git a/site/README.md b/site/README.md @@ -2,7 +2,7 @@ [](https://maydayv7.site) -Generated using [Zola](https://www.getzola.org/) and Deployed with [Nix](https://nixos.org/), [GitHub Pages](https://pages.github.com/) and [Netlify](https://netlify.com) +Generated using [Zola](https://www.getzola.org/), Deployed via [Nix](https://nixos.org/), [GitHub Pages](https://pages.github.com/) and [Netlify](https://netlify.com) Hosted at [maydayv7.site](https://maydayv7.site) diff --git a/users/README.md b/users/README.md @@ -1,5 +1,7 @@ ### Users -The `users` directory contains the individual user-specific configurations for multiple users (of a single PC or multiple ones). To add a new user, simply create a configuration file for it (name of the file/directory must be the same as the `username` of the user) and write down the configuration using the `home-manager` module [options](https://home-manager-options.extranix.com/). The configuration is automatically imported, if present. Do not forget to create a `USERNAME.secret` file (using `nixos secret create`) in [`passwords`](./passwords) containing the user password +The `users` directory contains the individual user-specific configurations for multiple users (of a single PC or multiple ones). +To add a user, create a configuration file matching the `username` and write down the configuration using the `home-manager` module [options](https://home-manager-options.extranix.com/). The configuration is automatically imported, if present. +Do not forget to create a `USERNAME.secret` file (using `nixos secret create`) in [`passwords`](./passwords) containing the user password. -There is also a `recovery` user defined in the system configuration as a [specialisation](https://wiki.nixos.org/wiki/Specialisation) +There is also a `recovery` user defined in the system configuration as a [specialisation](https://wiki.nixos.org/wiki/Specialisation).