dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit efbc46071c9945fed8dac259f1f1236cd01db1b7 parent cfdb488b113d4c956cb26efd2a7d867309f62c24 Author: maydayv7 <maydayv7@gmail.com> Date: Wed, 20 Apr 2022 16:37:45 +0530 chore: Upgrade Nix Version Changes: + Upgrade Nix to 2.8.0 + Configure `formatter.${system}`
Diffstat:
| M | configuration.nix | | | 3 | +++ |
| M | files/gnome/nix.lang | | | 57 | +++++++++++++++++++++++++++++---------------------------- |
| M | packages/overlays/nixFlakes.nix | | | 14 | +++----------- |
3 files changed, 35 insertions(+), 39 deletions(-)
diff --git a/configuration.nix b/configuration.nix @@ -47,6 +47,9 @@ in pkgs.mkShell {inherit (self.checks."${system}".commit) shellHook;}; }; + ## Code Formatter ## + formatter = pkgs.unstable.alejandra; + ## Package Configuration ## legacyPackages = self.channels."${system}".stable; diff --git a/files/gnome/nix.lang b/files/gnome/nix.lang @@ -42,14 +42,14 @@ <definitions> <!--contexts NOT used in the main context--> - <context id="antiquotation" style-ref="def:statement"> - <start>\${</start> - <end>}</end> - <include> - <context ref="nix"/> - </include> - </context> - + <context id="antiquotation" style-ref="def:statement"> + <start>\${</start> + <end>}</end> + <include> + <context ref="nix"/> + </include> + </context> + <context id="null-value" style-ref="null-value"> <keyword>null</keyword> </context> @@ -105,6 +105,7 @@ <keyword>div</keyword> <keyword>elem</keyword> <keyword>elemAt</keyword> + <keyword>fetchClosure</keyword> <keyword>fetchGit</keyword> <keyword>fetchMercurial</keyword> <keyword>fetchTarball</keyword> @@ -185,41 +186,41 @@ <keyword>zipAttrsWith</keyword> </context> - <context id="indented-string" style-ref="indented-string" class="string" class-disabled="no-spell-check"> + <context id="indented-string" style-ref="indented-string" class="string" class-disabled="no-spell-check"> <start>''</start> <end>''</end> <include> - <context id="indented-string-escape-antiquotation" style-ref="escape"> - <match>''\${</match> - </context> - <context id="indented-string-escape" style-ref="escape"> - <match>''\\.</match> - </context> - <context ref="antiquotation"/> + <context id="indented-string-escape-antiquotation" style-ref="escape"> + <match>''\${</match> + </context> + <context id="indented-string-escape" style-ref="escape"> + <match>''\\.</match> + </context> + <context ref="antiquotation"/> </include> </context> - <context id="string" style-ref="indented-string" class="string" class-disabled="no-spell-check"> + <context id="string" style-ref="indented-string" class="string" class-disabled="no-spell-check"> <start>"</start> <end>"</end> <include> - <context ref="def:escape"/> - <context ref="antiquotation"/> + <context ref="def:escape"/> + <context ref="antiquotation"/> </include> </context> - <context id="operators" style-ref="def:operator" extend-parent="false"> + <context id="operators" style-ref="def:operator" extend-parent="false"> <match>@|:|(//)|\+|\?|(==)|(\|\|)|(&&)|!|(->)</match> </context> <context id="path" style-ref="path" class="path"> - <match case-sensitive="false">(/|\./|\.\./)[a-zA-Z0-9\./\-_]*</match> - </context> + <match case-sensitive="false">(/|\./|\.\./)[a-zA-Z0-9\./\-_]*</match> + </context> + + <context id="uri" style-ref="uri" class="uri"> + <match case-sensitive="false">\%{def:net-address}</match> + </context> - <context id="uri" style-ref="uri" class="uri"> - <match case-sensitive="false">\%{def:net-address}</match> - </context> - <!--main context--> <context id="nix" class="no-spell-check"> <include> @@ -235,8 +236,8 @@ <context ref="functions"/> <context ref="null-value"/> <context ref="operators"/> - <context ref="path"/> - <context ref="uri"/> + <context ref="path"/> + <context ref="uri"/> </include> </context> <!--main context--> diff --git a/packages/overlays/nixFlakes.nix b/packages/overlays/nixFlakes.nix @@ -1,25 +1,17 @@ final: prev: { # Update Nix to Latest Version and Patch using unmerged PRs nixFlakes = prev.nixFlakes.overrideAttrs (old: rec { - version = "2.7+"; + version = "2.8+"; longVersion = builtins.replaceStrings ["+"] [""] version + ".0"; src = prev.fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = longVersion; - sha256 = "sha256-m8tqCS6uHveDon5GSro5yZor9H+sHeh+v/veF1IGw24="; + sha256 = "sha256-gWYNlEyleqkPfxtGXeq6ggjzJwcXJVdieJxA1Obly9s="; }; + patches = []; buildInputs = old.buildInputs ++ [final.nlohmann_json]; - patches = [ - /* - (prev.fetchpatch { - name = "dirty-rev.patch"; - sha256 = final.lib.fakeSha256; - url = "https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/5385.patch"; - }) - */ - ]; }); }