From a62943d0bb5362b7ac3df88748f7fe9d983ac5c3 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 11 Feb 2022 10:03:01 +0100 Subject: [PATCH] Configure registry for customer projects I created a private repository within `registries/customer-projects`. This holds flakes. The folder is registered as registry. That allows to run the following from within a customer project: nix run cp\#reuter-phpstan In order to execute the customer specific application from flake. --- .gitignore | 1 + home.nix | 3 ++- home/files/{ => nix}/nix.conf | 0 home/files/nix/registry.json | 15 +++++++++++++++ readme.md | 7 +------ 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .gitignore rename home/files/{ => nix}/nix.conf (100%) create mode 100644 home/files/nix/registry.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f3b81 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/registries/customer-projects/ diff --git a/home.nix b/home.nix index 9b5404e..788db11 100644 --- a/home.nix +++ b/home.nix @@ -114,7 +114,8 @@ "phpactor/phpactor.yml".source = ./home/files/phpactor.yml; "tig/config".source = ./home/files/tig; - "nix/nix.conf".source = ./home/files/nix.conf; + "nix/nix.conf".source = ./home/files/nix/nix.conf; + "nix/registry.json".source = ./home/files/nix/registry.json; "cmus/smyckblue.theme".source = ./home/files/cmus/smyckblue.theme; "cmus/rc".source = ./home/files/cmus/rc; diff --git a/home/files/nix.conf b/home/files/nix/nix.conf similarity index 100% rename from home/files/nix.conf rename to home/files/nix/nix.conf diff --git a/home/files/nix/registry.json b/home/files/nix/registry.json new file mode 100644 index 0000000..a6cef38 --- /dev/null +++ b/home/files/nix/registry.json @@ -0,0 +1,15 @@ +{ + "flakes": [ + { + "from": { + "id": "cp", + "type": "indirect" + }, + "to": { + "path": "/home/daniels/.config/nixpkgs/registries/customer-projects", + "type": "path" + } + } + ], + "version": 2 +} \ No newline at end of file diff --git a/readme.md b/readme.md index 7dc99f3..5d374ae 100644 --- a/readme.md +++ b/readme.md @@ -60,7 +60,7 @@ It has the following sub folder: `flakes/` Holds structure with specific flakes. - Those should provide libraries and template for development projects. + Those should provide libraries and template. Update ------ @@ -102,11 +102,6 @@ Todos * Migrate firefox (with geckodriver), thunderbird, ungoogled chromium -* Begin migrating local development to execute php. On a per customer project. - - * `flake.nix` and `flake.lock` need to be checked into a repo … How to handle that if customer doesn't want the file? - Maybe symlinks will work, so I've a dedicated repo with the project flakes and link them into project repos? - * Migrate home manager to use flake for better rollback support if update breaks something. * Maybe PR upstream: `./home/modules/programs/languagetool.nix`.