From 95c6ee036831a098ec6a5398fc7406c514b15a35 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Wed, 17 Feb 2021 14:15:43 -0700 Subject: [PATCH] nix: fix #126 * Update the readme to pull from cachix first, so users don't have to build nix. * Pull `nixFlakes` from override for slightly newer ui, and consistency for users who change the nixos flake ref to something newer. --- doc/start/index.md | 6 ++++-- overlays/nixFlakes.nix | 14 +++++++++----- overrides/default.nix | 1 + 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/start/index.md b/doc/start/index.md index 14745e7..3af0b3d 100644 --- a/doc/start/index.md +++ b/doc/start/index.md @@ -4,6 +4,8 @@ The only dependency is nix, so make sure you have it [installed][install-nix]. ## Get the Template Here is a snippet that will get you the template without the git history: ```sh +nix-shell -p cachix --run cachix use nrdxp + nix-shell https://github.com/nrdxp/nixflk/archive/core.tar.gz -A shell \ --run "flk get core" @@ -14,8 +16,6 @@ nix-shell git init git add . git commit -m init - -cachix use nrdxp ``` This will place you in a new folder named `flk` with git initialized, and a @@ -29,6 +29,8 @@ In addition, the [binary cache](../../cachix) is added for faster deployment. > in the call to `flk get` > - Flakes ignore files that have not been added to git, so be sure to stage new > files before building the system. +> - You can choose to simply clone the repo with git if you want to follow +> upstream changes. ## Next Steps: - [Make installable ISO](./iso.md) diff --git a/overlays/nixFlakes.nix b/overlays/nixFlakes.nix index f557f0c..54c8a0d 100644 --- a/overlays/nixFlakes.nix +++ b/overlays/nixFlakes.nix @@ -1,8 +1,12 @@ final: prev: { nixFlakes = prev.nixFlakes.overrideAttrs - (self: { - patches = [ - ../pkgs/tools/package-management/nix/0001-nix-command-and-flakes-by-default.patch - ]; - }); + (self: + let + oldPatches = self.patches or [ ]; + in + { + patches = oldPatches ++ [ + ../pkgs/tools/package-management/nix/0001-nix-command-and-flakes-by-default.patch + ]; + }); } diff --git a/overrides/default.nix b/overrides/default.nix index c243297..47a5a23 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -14,6 +14,7 @@ element-desktop manix nixpkgs-fmt + nixFlakes qutebrowser signal-desktop starship;