dotfiles

My PC Dotfiles & Website
commit e32c493b9c6e88140a9a4b8ac44bfa5a9e8e1eb2
parent b05208bb1c3b5ba3161c91465a271eb017906f65
Author: maydayv7 <maydayv7@gmail.com>
Date:   Sat, 20 Apr 2024 14:36:38 +0530

feat: Add back `overlays`

Also change `nixos.wiki` -> `wiki.nixos.org`

Diffstat:

MREADME.md | 2+-
Mpackages/README.md | 2++
Mpackages/flake.nix | 41++++++++++++++++++++++-------------------
Apackages/overlays/chrome.nix | 12++++++++++++
Apackages/overlays/nixFlakes.nix | 4++++
Musers/README.md | 4++--
6 files changed, 43 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md @@ -376,7 +376,7 @@ 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://nixos.wiki/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 diff --git a/packages/README.md b/packages/README.md @@ -2,6 +2,8 @@ The `packages` directory contains custom-built packages (can be accessed by `github:maydayv7/dotfiles#packages.${system}`). Packages which have a separate `metadata.nix` can be automatically updated using `sh update.sh` +The `overlays` directory contains overrides for pre-built packages (See [this](https://wiki.nixos.org/wiki/Overlays) for more information) + It is advisable to use Flake `inputs` as package sources. To pin it to a specific commit/revision add `?rev=` after the `url`. Else you may also specify the source using `fetch` functions. In case you don't know the hash for the source, set: ``` diff --git a/packages/flake.nix b/packages/flake.nix @@ -4,7 +4,7 @@ ... }: let inherit (util) map; - inherit (builtins) any isPath; + inherit (builtins) any attrValues isPath; in { ## Package Configuration ## perSystem = { @@ -47,25 +47,25 @@ in { ) rec { inherit system config; - overlays = [ - vsppuccin.overlays.default - (pkg: _: { - nixFlakes = pkg.unstable.nixVersions.nix_2_20; + overlays = + (attrValues self.overlays or {}) + ++ [ + vsppuccin.overlays.default + (_: _: { + custom = self.packages."${system}"; + unstable = import unstable {inherit system config;}; - custom = self.packages."${system}"; - unstable = import unstable {inherit system config;}; - - code = vscode.extensions."${system}"; - gaming = gaming.packages."${system}"; - wine = windows.packages."${system}"; - wayworld = - wayland.packages."${system}" - // hycov.packages."${system}" - // hyprspace.packages."${system}" - // hyprland-plugins.packages."${system}" - // hyprland.packages."${system}"; - }) - ]; + code = vscode.extensions."${system}"; + gaming = gaming.packages."${system}"; + wine = windows.packages."${system}"; + wayworld = + wayland.packages."${system}" + // hycov.packages."${system}" + // hyprspace.packages."${system}" + // hyprland-plugins.packages."${system}" + // hyprland.packages."${system}"; + }) + ]; }; # Custom Packages @@ -77,4 +77,7 @@ in { // map.modules ../scripts call.script // inputs'.proprietary.packages; }); + + # Package Overrides + flake.overlays = map.modules ./overlays import; } diff --git a/packages/overlays/chrome.nix b/packages/overlays/chrome.nix @@ -0,0 +1,12 @@ +final: prev: { + # Google Chrome Flags + google-chrome = prev.google-chrome.overrideAttrs (old: { + installPhase = + old.installPhase + + '' + fix=" --enable-features=WebUIDarkMode,TouchpadOverscrollHistoryNavigation --force-dark-mode" + substituteInPlace $out/share/applications/google-chrome.desktop \ + --replace $exe "$exe$fix" + ''; + }); +} diff --git a/packages/overlays/nixFlakes.nix b/packages/overlays/nixFlakes.nix @@ -0,0 +1,4 @@ +final: prev: { + # Nix Version + nixFlakes = final.unstable.nixVersions.nix_2_20; +} diff --git a/users/README.md b/users/README.md @@ -1,5 +1,5 @@ ### 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://mipmip.github.io/home-manager-option-search/). 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 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 -There is also a `recovery` user defined in the system configuration as a [specialisation](https://nixos.wiki/wiki/Specialisation) +There is also a `recovery` user defined in the system configuration as a [specialisation](https://wiki.nixos.org/wiki/Specialisation)