From a3b2bcf3d57be28c27119a44445cfdde38349cb9 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 18 Sep 2021 16:50:51 +0300 Subject: [PATCH 01/13] fix typo in CONTRIBUTING.md --- doc/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 8574dae..86f5dd7 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## TL;DR; - **Target Branch**: `main` -- **Merge Policy**: [`bors`][bors] is alwyas right (→ `bors try`) +- **Merge Policy**: [`bors`][bors] is always right (→ `bors try`) - **Docs**: every changeset is expected to contain doc updates - **Commit Msg**: be a poet! Comprehensive and explanatory commit messages should cover the motivation and use case in an easily understandable manner From 54a9a8366e796661be44f8ab6f913632c02e0c34 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sat, 18 Sep 2021 15:47:11 -0400 Subject: [PATCH 02/13] ci: workflows on `main` push should trigger on `master` push --- .github/workflows/check.yml | 1 + .github/workflows/mdbook_docs.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c8a8f64..0638c4c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - master - trying - staging jobs: diff --git a/.github/workflows/mdbook_docs.yml b/.github/workflows/mdbook_docs.yml index 5faf9c2..706b3bd 100644 --- a/.github/workflows/mdbook_docs.yml +++ b/.github/workflows/mdbook_docs.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - master jobs: deploy: From c3461cd2c3f947c3ed30d64565d4e78c80d1fdba Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sat, 18 Sep 2021 15:47:59 -0400 Subject: [PATCH 03/13] docs: `master` is the current target branch for pull requests --- doc/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 86f5dd7..2b5241a 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Pull Requests ## TL;DR; -- **Target Branch**: `main` +- **Target Branch**: `master` - **Merge Policy**: [`bors`][bors] is always right (→ `bors try`) - **Docs**: every changeset is expected to contain doc updates - **Commit Msg**: be a poet! Comprehensive and explanatory commit messages From f13c11ea174fd508a7a327e13ad8fffff95facd6 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 19 Sep 2021 11:17:01 -0600 Subject: [PATCH 04/13] README.md: fix broken links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6607bb4..1d81382 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ They also make [Nix expressions](https://nixos.org/manual/nix/unstable/expressio ## Getting Started Check out the [guide](https://devos.divnix.com/start) to get up and running. -Also, have a look at [_flake.nix_][toc]. If anything is not immediately +Also, have a look at [_flake.nix_](./flake.nix). If anything is not immediately discoverable via "[`digga`][digga]'s [`mkFlake`][mk-flake], please file a bug report. @@ -88,4 +88,4 @@ DevOS is licensed under the [MIT License][mit]. [nixpkgs]: https://github.com/NixOS/nixpkgs [nvfetcher]: https://github.com/berberman/nvfetcher [please]: https://github.com/nrdxp/devos/tree/nrd - +[matrix]: https://matrix.to/#/#devos:nixos.org From 955b9ce1c1691d5ecd54bd666b0b47e42559a382 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sat, 18 Sep 2021 15:19:35 -0400 Subject: [PATCH 05/13] docs(bud): replace references to `flk` --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .gitignore | 2 +- doc/concepts/users.md | 6 +++--- doc/integrations/deploy.md | 2 +- doc/start/from-nixos.md | 4 ++-- doc/start/index.md | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ca1ca28..1040ee6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -35,4 +35,4 @@ Please search on the [issue tracker](../) before creating one. ## Your Environment - + diff --git a/.gitignore b/.gitignore index 4a99123..6cce155 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ result .direnv doc/index.html -# Result of flk commands +# Result of bud commands vm iso doi diff --git a/doc/concepts/users.md b/doc/concepts/users.md index 12bf562..9be3ca8 100644 --- a/doc/concepts/users.md +++ b/doc/concepts/users.md @@ -48,7 +48,7 @@ argument that gets passed to your home-manager users. ## External Usage You can easily use the defined home-manager configurations outside of NixOS -using the `homeConfigurations` flake output. The [flk](../flk/index.md) helper +using the `homeConfigurations` flake output. The [bud](../bud/index.md) helper script makes this even easier. This is great for keeping your environment consistent across Unix systems, @@ -57,10 +57,10 @@ including OSX. ### From within the projects devshell: ```sh # builds the nixos user defined in the NixOS host -flk home NixOS nixos +bud home NixOS nixos # build and activate -flk home NixOS nixos switch +bud home NixOS nixos switch ``` ### Manually from outside the project: diff --git a/doc/integrations/deploy.md b/doc/integrations/deploy.md index 2903210..f66d2b5 100644 --- a/doc/integrations/deploy.md +++ b/doc/integrations/deploy.md @@ -40,7 +40,7 @@ And the private key to your user: And run the deployment: ```sh -deploy "flk#hostName" --hostname host.example.com +deploy "bud#hostName" --hostname host.example.com ``` > ##### _Note:_ diff --git a/doc/start/from-nixos.md b/doc/start/from-nixos.md index 0e1d48c..ce79063 100644 --- a/doc/start/from-nixos.md +++ b/doc/start/from-nixos.md @@ -4,7 +4,7 @@ Assuming you're happy with your existing partition layout, you can generate a basic NixOS configuration for your system using: ```sh -flk up +bud up ``` This will make a new file `hosts/up-$(hostname).nix`, which you can edit to @@ -38,7 +38,7 @@ Now might be a good time to read the docs on [suites](../concepts/suites.md) and Once you're ready to deploy `hosts/my-host.nix`: ```sh -flk my-host switch +bud my-host switch ``` diff --git a/doc/start/index.md b/doc/start/index.md index f3f1127..7dd8002 100644 --- a/doc/start/index.md +++ b/doc/start/index.md @@ -6,10 +6,10 @@ 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/divnix/devos/archive/core.tar.gz -A shell \ - --run "flk get core" +nix-shell https://github.com/divnix/devos/archive/master.tar.gz -A shell \ + --run "bud get master" -cd flk +cd bud nix-shell @@ -18,7 +18,7 @@ git add . git commit -m init ``` -This will place you in a new folder named `flk` with git initialized, and a +This will place you in a new folder named `bud` with git initialized, and a nix-shell that provides all the dependencies, including the unstable nix version required. From 19666a06a7598872a0781e1b07fd267dac3d989f Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sat, 18 Sep 2021 15:21:03 -0400 Subject: [PATCH 06/13] fix: `bud get` should init flake based off `master` --- bud/get.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bud/get.bash b/bud/get.bash index 3b4d9a7..770c002 100644 --- a/bud/get.bash +++ b/bud/get.bash @@ -1 +1 @@ -nix flake new -t "github:divnix/devos/core" "${2:-devos}" +nix flake new -t "github:divnix/devos/master" "${2:-devos}" From 57a14bb4119f19cf7b56adec41a7fe8797a5b000 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sat, 18 Sep 2021 15:26:15 -0400 Subject: [PATCH 07/13] docs: update links to point to `master` instead of `core` --- doc/concepts/profiles.md | 2 +- doc/concepts/users.md | 2 +- doc/integrations/nvfetcher.md | 2 +- doc/tests.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/concepts/profiles.md b/doc/concepts/profiles.md index a5eda3e..36e423f 100644 --- a/doc/concepts/profiles.md +++ b/doc/concepts/profiles.md @@ -63,5 +63,5 @@ specific belongs in your [host](hosts.md) files instead. [definition]: https://nixos.org/manual/nixos/stable/index.html#sec-option-definitions [declaration]: https://nixos.org/manual/nixos/stable/index.html#sec-option-declarations [options]: https://nixos.org/manual/nixos/stable/index.html#sec-writing-modules -[spec]: https://github.com/divnix/devos/tree/core/lib/devos/mkProfileAttrs.nix +[spec]: https://github.com/divnix/devos/tree/master/lib/devos/mkProfileAttrs.nix [config]: https://nixos.wiki/wiki/Module#structure diff --git a/doc/concepts/users.md b/doc/concepts/users.md index 9be3ca8..d18d51d 100644 --- a/doc/concepts/users.md +++ b/doc/concepts/users.md @@ -73,5 +73,5 @@ nix build "github:divnix/devos#homeConfigurations.nixos@NixOS.home.activationPac ``` [home-manager]: https://nix-community.github.io/home-manager -[modules-list]: https://github.com/divnix/devos/tree/core/users/modules/module-list.nix +[modules-list]: https://github.com/divnix/devos/tree/master/users/modules/module-list.nix [portableuser]: https://digga.divnix.com/api-reference-home.html#homeusers diff --git a/doc/integrations/nvfetcher.md b/doc/integrations/nvfetcher.md index 4670657..107a169 100644 --- a/doc/integrations/nvfetcher.md +++ b/doc/integrations/nvfetcher.md @@ -40,4 +40,4 @@ fetch.git = "https://github.com/mlvzk/manix.git" # responsible for fetching [nvf]: https://github.com/berberman/nvfetcher [nvf-readme]: https://github.com/berberman/nvfetcher#readme -[sources.toml]: https://github.com/divnix/devos/tree/core/pkgs/sources.toml +[sources.toml]: https://github.com/divnix/devos/tree/master/pkgs/sources.toml diff --git a/doc/tests.md b/doc/tests.md index 1d7b65e..6a62c72 100644 --- a/doc/tests.md +++ b/doc/tests.md @@ -26,7 +26,7 @@ and the examples in [nixpkgs][nixos-tests]. [test-doc]: https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests [test-blog]: https://www.haskellforall.com/2020/11/how-to-use-nixos-for-lightweight.html -[default]: https://github.com/divnix/devos/tree/core/tests/default.nix +[default]: https://github.com/divnix/devos/tree/master/tests/default.nix [run-test]: https://github.com/NixOS/nixpkgs/blob/6571462647d7316aff8b8597ecdf5922547bf365/lib/debug.nix#L154-L166 [nixos-tests]: https://github.com/NixOS/nixpkgs/tree/master/nixos/tests [testing-python]: https://github.com/NixOS/nixpkgs/tree/master/nixos/lib/testing-python.nix From 252769ce465660b1480fcc127b54dab6262f4b3f Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sat, 18 Sep 2021 15:27:49 -0400 Subject: [PATCH 08/13] ci: update release workflow to checkout code from `master` branch --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b22de0..111be31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: core + ref: master - name: Update Changelog uses: heinrichreimer/github-changelog-generator-action@v2.1.1 with: @@ -49,7 +49,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: core + ref: master - name: Get Changelog Entry id: changelog_reader From 0770c7f9009293412c53d4f901bf23ff5d368769 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sun, 19 Sep 2021 23:30:16 -0400 Subject: [PATCH 09/13] docs: `bud get` creates a directory named `devos` by default As mentioned in #370 it would not result in a directory called `bud`, as can be seen in the custom `get.bash` command where the directory name defaults to `devos`. --- doc/start/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/start/index.md b/doc/start/index.md index 7dd8002..ed1a114 100644 --- a/doc/start/index.md +++ b/doc/start/index.md @@ -9,7 +9,7 @@ nix-shell -p cachix --run "cachix use nrdxp" nix-shell https://github.com/divnix/devos/archive/master.tar.gz -A shell \ --run "bud get master" -cd bud +cd devos nix-shell @@ -18,7 +18,7 @@ git add . git commit -m init ``` -This will place you in a new folder named `bud` with git initialized, and a +This will place you in a new folder named `devos` with git initialized, and a nix-shell that provides all the dependencies, including the unstable nix version required. From ccf160dd218aa48346ce2d9802d937757ccb1bd5 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sun, 19 Sep 2021 23:40:19 -0400 Subject: [PATCH 10/13] docs: `deploy` command example is run from repo root --- doc/integrations/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/integrations/deploy.md b/doc/integrations/deploy.md index f66d2b5..81507fc 100644 --- a/doc/integrations/deploy.md +++ b/doc/integrations/deploy.md @@ -40,7 +40,7 @@ And the private key to your user: And run the deployment: ```sh -deploy "bud#hostName" --hostname host.example.com +deploy ".#hostName" --hostname host.example.com ``` > ##### _Note:_ From 95f89c0b44acf92e16ec702b38a23016616d8a2b Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sun, 19 Sep 2021 23:43:29 -0400 Subject: [PATCH 11/13] docs: use single quotes in example to avoid shell expansion --- doc/integrations/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/integrations/deploy.md b/doc/integrations/deploy.md index 81507fc..642267c 100644 --- a/doc/integrations/deploy.md +++ b/doc/integrations/deploy.md @@ -40,7 +40,7 @@ And the private key to your user: And run the deployment: ```sh -deploy ".#hostName" --hostname host.example.com +deploy '.#hostName' --hostname host.example.com ``` > ##### _Note:_ From e5660cdf83d9581f971504db8024240346328de8 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Sun, 19 Sep 2021 23:53:14 -0400 Subject: [PATCH 12/13] ci: remove lingering references to `main` in workflow configs `main` is no longer in use. See #369 --- .github/workflows/check.yml | 1 - .github/workflows/mdbook_docs.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 0638c4c..e80861b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,6 @@ name: "Check & Cachix" on: push: branches: - - main - master - trying - staging diff --git a/.github/workflows/mdbook_docs.yml b/.github/workflows/mdbook_docs.yml index 706b3bd..9d15cc1 100644 --- a/.github/workflows/mdbook_docs.yml +++ b/.github/workflows/mdbook_docs.yml @@ -3,7 +3,6 @@ name: Deploy Docs to GitHub Pages on: push: branches: - - main - master jobs: From e0da74c87c62b1acca275f11af80a3c9fb556f33 Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Fri, 24 Sep 2021 11:40:53 -0700 Subject: [PATCH 13/13] Update flake to use new moddules options --- flake.lock | 69 ++++++++++++++++++++++++++++++++++++----------- flake.nix | 8 +++--- shell/default.nix | 4 +-- 3 files changed, 60 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index b3efea0..5dff3b1 100644 --- a/flake.lock +++ b/flake.lock @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1628068208, - "narHash": "sha256-akJBkj6os4bjO1drhketJvXNC21yPuy4ufL2pyius4M=", + "lastModified": 1628752686, + "narHash": "sha256-Lzh9MYUJDsjgif+YEyOErXtj1IH+ci8J1C30g1ms69s=", "owner": "serokell", "repo": "deploy-rs", - "rev": "d72174307d5b88ec24cc2e69e875228fe3d642ed", + "rev": "e5546f9c2503c26d175f08a81fc0a0f330be4cbe", "type": "github" }, "original": { @@ -108,11 +108,11 @@ }, "devshell": { "locked": { - "lastModified": 1625086391, - "narHash": "sha256-IpNPv1v8s4L3CoxhwcgZIitGpcrnNgnj09X7TA0QV3k=", + "lastModified": 1629275356, + "narHash": "sha256-R17M69EKXP6q8/mNHaK53ECwjFo1pdF+XaJC9Qq8zjg=", "owner": "numtide", "repo": "devshell", - "rev": "4b5ac7cf7d9a1cc60b965bb51b59922f2210cbc7", + "rev": "26f25a12265f030917358a9632cd600b51af1d97", "type": "github" }, "original": { @@ -131,6 +131,7 @@ "home-manager": [ "home" ], + "nix": "nix", "nixlib": [ "nixos" ], @@ -140,11 +141,11 @@ ] }, "locked": { - "lastModified": 1628211944, - "narHash": "sha256-2q1dNUzitVd0JNRHYTubbyb8ks3fL9hPJOvQgofxELE=", + "lastModified": 1632784893, + "narHash": "sha256-SBmGCObLqF9CrWoF7hrBpiCMPTUFzHiBvAtCJXQrPg4=", "owner": "divnix", "repo": "digga", - "rev": "760bb9c29063258ba547145de0ab96acd7eba4c0", + "rev": "6316878be3527ef2b27b8e92afb44ce1857830b3", "type": "github" }, "original": { @@ -192,16 +193,15 @@ ] }, "locked": { - "lastModified": 1627071952, - "narHash": "sha256-FhE0KOuI9Kl4eyGJXu4bh9fBP2hbxjnD1DlKHljCcYs=", - "owner": "gytis-ivaskevicius", + "lastModified": 1630859749, + "narHash": "sha256-qkoU2rIbbP2+T0dfcqXW35GCWNsi0Y1IgN9BELmt4Zo=", + "owner": "divnix", "repo": "flake-utils-plus", - "rev": "51a82925db31073bc4822c9b538a0a3ebf1134b2", + "rev": "a4e267e3fc87e60c5029c6c3855935ff1ff3018e", "type": "github" }, "original": { - "owner": "gytis-ivaskevicius", - "ref": "staging", + "owner": "divnix", "repo": "flake-utils-plus", "type": "github" } @@ -243,6 +243,23 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1617481909, + "narHash": "sha256-SqnfOFuLuVRRNeVJr1yeEPJue/qWoCp5N6o5Kr///p4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "148f9b2f586c41b7e36e73009db43ea68c7a1a4d", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "ref": "VERSION_0_8_4", + "repo": "lowdown", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": [ @@ -286,6 +303,28 @@ "type": "github" } }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": [ + "digga", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1630335771, + "narHash": "sha256-eljjEPJdLK3aDskF7qX4YM/6KCq+w9nr+IKhrKW/AIQ=", + "owner": "nixos", + "repo": "nix", + "rev": "50a35860ee9237d341948437c5f70a7f0987d393", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nix", + "type": "github" + } + }, "nixos": { "locked": { "lastModified": 1628203131, diff --git a/flake.nix b/flake.nix index bba4f43..1ebdd84 100644 --- a/flake.nix +++ b/flake.nix @@ -99,8 +99,8 @@ hostDefaults = { system = "x86_64-linux"; channelName = "nixos"; - imports = [ (digga.lib.importModules ./modules) ]; - externalModules = [ + imports = [ (digga.lib.importExportableModules ./modules) ]; + modules = [ { lib.our = self.lib; } digga.nixosModules.bootstrapIso digga.nixosModules.nixConfig @@ -126,8 +126,8 @@ }; home = { - imports = [ (digga.lib.importModules ./users/modules) ]; - externalModules = [ ]; + imports = [ (digga.lib.importExportableModules ./users/modules) ]; + modules = [ ]; importables = rec { profiles = digga.lib.rakeLeaves ./users/profiles; suites = with profiles; rec { diff --git a/shell/default.nix b/shell/default.nix index aef90a5..d22b3af 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -1,9 +1,9 @@ { self, inputs, ... }: { - externalModules = with inputs; [ + modules = with inputs; [ bud.devshellModules.bud ]; - modules = [ + exportedModules = [ ./devos.nix ]; }