From 3a9d5ce4c4bbea24222bda5c9edb95b83f75ab56 Mon Sep 17 00:00:00 2001 From: guangtao Date: Thu, 2 Nov 2023 03:20:55 -0700 Subject: [PATCH] refactor: layputs.default -> exports --- flake.lock | 12 +- flake.nix | 2 +- lib/mapPopsLayouts.nix | 2 +- local/cells/repo/configs.nix | 8 +- local/cells/repo/devshellProfiles.nix | 9 +- local/cells/repo/pops.nix | 23 ++ local/cells/repo/shells.nix | 6 +- local/flake.nix | 14 +- local/lock/flake.lock | 210 +++++++----------- local/lock/flake.nix | 2 - templates/hivebus/flake.nix | 2 +- templates/hivebus/nix/lib/flakeOutputs.nix | 6 +- templates/hivebus/nix/lib/hosts.nix | 4 +- .../units/nixos/hosts/darwin/layouts.nix | 2 +- templates/nixos/flake.nix | 2 +- templates/nixos/nix/lib/flakeOutputs.nix | 6 +- templates/nixos/nix/lib/hosts.nix | 4 +- .../units/nixos/hosts/darwin/layouts.nix | 2 +- tests/darwin/expr.nix | 2 +- tests/data/expr.nix | 4 +- tests/devshell/expr.nix | 2 +- tests/flake-parts/expr.nix | 2 +- tests/makes/expr.nix | 2 +- tests/nixos/__fixture/layouts.nix | 4 +- .../__fixture/pops/selfNixOSProfiles.nix | 2 +- tests/nixos/expr.nix | 2 +- tests/srvos/expr.nix | 2 +- units/configs/treefmt.nix | 2 +- units/devshell/profiles/nickel.nix | 19 ++ 29 files changed, 173 insertions(+), 186 deletions(-) create mode 100644 local/cells/repo/pops.nix create mode 100644 units/devshell/profiles/nickel.nix diff --git a/flake.lock b/flake.lock index bbb6fef..71f18a9 100644 --- a/flake.lock +++ b/flake.lock @@ -78,11 +78,11 @@ "yants": "yants" }, "locked": { - "lastModified": 1697778846, - "narHash": "sha256-QDgGaC67LbnnhRV/CpLomSz7UFs+pRnZsyU6xJcQIas=", + "lastModified": 1698920120, + "narHash": "sha256-WZp+URpmofB41FLzJySebl88Uinyed7QY6xLSjnnMks=", "owner": "gtrunsec", "repo": "flops", - "rev": "5adeb160bf489b042951dd1bf89840ca14288cfb", + "rev": "5e297f19c97d6b4d6e0e68072c883c70f170ae16", "type": "github" }, "original": { @@ -129,11 +129,11 @@ }, "nixlib_2": { "locked": { - "lastModified": 1697331025, - "narHash": "sha256-a5LJWWHfEvnq9tBd9UyNVdtzLXc2ehu5MCp//Bex/0E=", + "lastModified": 1698540503, + "narHash": "sha256-YN6DJQc7SMe6ep9FhD2BGl92bo24NPNRWjADEJE4xeU=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "05c07c73de74725ec7efa6609011687035a92c0f", + "rev": "ce2acb20a405bf6f910081c2adc988bbc8100e4c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 195971a..9b6d3b1 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ } // lib.flakeOutputs; library = import ./lib/__init.nix { inherit inputs omnibus; }; - lib = library.layouts.default; + lib = library.exports.default; in lib.flakeOutputs // { diff --git a/lib/mapPopsLayouts.nix b/lib/mapPopsLayouts.nix index b696606..0d2fe03 100644 --- a/lib/mapPopsLayouts.nix +++ b/lib/mapPopsLayouts.nix @@ -24,5 +24,5 @@ in # map (attr: f attr set.${attr}) (lib.attrNames set) # ); lib.mapAttrsRecursiveCond ((as: !(as ? "layouts" && as.layouts ? "default"))) - (_: v: v.layouts.default or v) + (_: v: v.exports.default or v) pops diff --git a/local/cells/repo/configs.nix b/local/cells/repo/configs.nix index 48ccf09..29a21dc 100755 --- a/local/cells/repo/configs.nix +++ b/local/cells/repo/configs.nix @@ -10,12 +10,8 @@ with inputs.std.inputs.dmerge; let inherit (inputs) nixpkgs; - configs = - let - inputs' = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs; - in - inputs.omnibus.pops.configs.addLoadExtender { load.inputs.inputs = inputs'; }; - inherit (configs.layouts.default) treefmt lefthook conform; + + inherit (cell.pops.configs.exports.default) treefmt lefthook conform; in { inherit treefmt lefthook; diff --git a/local/cells/repo/devshellProfiles.nix b/local/cells/repo/devshellProfiles.nix index 0660773..962b895 100644 --- a/local/cells/repo/devshellProfiles.nix +++ b/local/cells/repo/devshellProfiles.nix @@ -1,8 +1 @@ -let - inptus' = (inputs.omnibus.pops.flake.setSystem inputs.nixpkgs.system).inputs; -in -(inputs.omnibus.pops.devshellProfiles.addLoadExtender { - load.inputs = { - inputs = inptus'; - }; -}).layouts.default +cell.pops.devshellProfiles.exports.self.exports.default diff --git a/local/cells/repo/pops.nix b/local/cells/repo/pops.nix new file mode 100644 index 0000000..4126518 --- /dev/null +++ b/local/cells/repo/pops.nix @@ -0,0 +1,23 @@ +let + inherit (inputs) nixpkgs; + inputs' = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs; +in +{ + devshellProfiles = + (inputs.omnibus.pops.devshellProfiles.addLoadExtender { + load.inputs.inputs = inputs'; + }).addExporter + { + exports = { + self = + (inputs.omnibus.pops.devshellProfiles.addLoadExtender { + load.inputs = { + inputs = inputs'; + }; + }); + }; + }; + configs = inputs.omnibus.pops.configs.addLoadExtender { + load.inputs.inputs = inputs'; + }; +} diff --git a/local/cells/repo/shells.nix b/local/cells/repo/shells.nix index 5a9970b..74ab858 100755 --- a/local/cells/repo/shells.nix +++ b/local/cells/repo/shells.nix @@ -12,7 +12,7 @@ in default = lib.dev.mkShell { name = "omnibus devshell"; - # imports = [ devshellProfiles.rust ]; + imports = [ cell.pops.devshellProfiles.exports.default.nickel ]; # Tool Homepage: https://nix-community.github.io/nixago/ # This is Standard's devshell integration. @@ -22,7 +22,9 @@ in cell.configs.conform.custom ) (std.lib.dev.mkNixago std.lib.cfg.lefthook cell.configs.lefthook.default) - (std.lib.dev.mkNixago std.lib.cfg.treefmt cell.configs.treefmt.default) + (std.lib.dev.mkNixago std.lib.cfg.treefmt cell.configs.treefmt.default + cell.configs.treefmt.topiary + ) ]; packages = [ nixpkgs.d2 ]; diff --git a/local/flake.nix b/local/flake.nix index fba673a..ef4e508 100755 --- a/local/flake.nix +++ b/local/flake.nix @@ -1,5 +1,16 @@ { - description = "omnibus"; + nixConfig = { + extra-substituters = [ + "https://tweag-topiary.cachix.org" + "https://tweag-nickel.cachix.org" + ]; + extra-trusted-public-keys = [ + "tweag-topiary.cachix.org-1:8TKqya43LAfj4qNHnljLpuBnxAY/YwEBfzo3kzXxNY0=" + "tweag-nickel.cachix.org-1:GIthuiK4LRgnW64ALYEoioVUQBWs0jexyoYVeLDBwRA=" + ]; + }; + + description = "omnibus & std"; inputs.std.follows = "std-ext/std"; inputs.nixpkgs.follows = "std-ext/nixpkgs"; @@ -26,6 +37,7 @@ (nixago "configs") (devshells "shells") (functions "devshellProfiles") + (functions "pops") ]; } { diff --git a/local/lock/flake.lock b/local/lock/flake.lock index 02baa40..725dec0 100644 --- a/local/lock/flake.lock +++ b/local/lock/flake.lock @@ -116,20 +116,17 @@ }, "crane_4": { "inputs": { - "flake-compat": "flake-compat_6", - "flake-utils": "flake-utils_9", "nixpkgs": [ "typst", "nixpkgs" - ], - "rust-overlay": "rust-overlay_7" + ] }, "locked": { - "lastModified": 1693787605, - "narHash": "sha256-rwq5U8dy+a9JFny/73L0SJu1GfWwATMPMTp7D+mjHy8=", + "lastModified": 1698166613, + "narHash": "sha256-y4rdN4flxRiROqNi1waMYIZj/Fs7L2OrszFk/1ry9vU=", "owner": "ipetkov", "repo": "crane", - "rev": "8b4f7a4dab2120cf41e7957a28a853f45016bd9d", + "rev": "b7db46f0f1751f7b1d1911f6be7daf568ad5bc65", "type": "github" }, "original": { @@ -302,41 +299,21 @@ "type": "github" } }, - "flake-compat_6": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { - "nixpkgs-lib": [ - "typst", - "nixpkgs" - ] + "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1693611461, - "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" + "id": "flake-parts", + "type": "indirect" } }, "flake-utils": { @@ -357,24 +334,6 @@ "type": "github" } }, - "flake-utils_10": { - "inputs": { - "systems": "systems_10" - }, - "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "flake-utils_2": { "inputs": { "systems": "systems_3" @@ -498,24 +457,6 @@ "type": "github" } }, - "flake-utils_9": { - "inputs": { - "systems": "systems_9" - }, - "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -616,9 +557,7 @@ "crane": "crane", "flake-utils": "flake-utils_2", "nix-input": "nix-input", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", "rust-overlay": "rust-overlay_2", "topiary": [ @@ -626,11 +565,11 @@ ] }, "locked": { - "lastModified": 1697457450, - "narHash": "sha256-j4J7FPifGzjNDiSpj9AJeVhMwX5H8DwBNIQTfX1Z2yk=", + "lastModified": 1698656630, + "narHash": "sha256-ZJJDQao+yOiE2MvxtoZ6fRrk6xDVo7MoaueRZl7iZ5Y=", "owner": "tweag", "repo": "nickel", - "rev": "2a727baaea35ba88852fe05ef4ab91355b666031", + "rev": "28672ee45bfe78dc3dc828ac1fe4fa40f99965e9", "type": "github" }, "original": { @@ -701,7 +640,7 @@ "inputs": { "flake-compat": [], "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -735,6 +674,24 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1696019113, + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -816,6 +773,21 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1693565476, + "narHash": "sha256-ya00zHt7YbPo3ve/wNZ/6nts61xt7wK/APa6aZAfey0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aa8aa7e2ea35ce655297e8322dc82bf77a31d04b", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1667292599, "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", @@ -831,7 +803,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1697059129, "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=", @@ -847,7 +819,23 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { + "locked": { + "lastModified": 1688981480, + "narHash": "sha256-AYgIAotBA5C+55PjXKck8cpDgWYrUYsTMpMxH1bZ7/M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b9ebd80c7dbcdec2240c5baae334365eaf3d7230", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { "locked": { "lastModified": 1681358109, "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", @@ -946,7 +934,7 @@ "nixos": [ "nixpkgs" ], - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nur": "nur", "ragenix": "ragenix", "sops-nix": "sops-nix", @@ -1104,7 +1092,7 @@ "rust-overlay_6": { "inputs": { "flake-utils": "flake-utils_8", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1689042658, @@ -1120,33 +1108,6 @@ "type": "github" } }, - "rust-overlay_7": { - "inputs": { - "flake-utils": [ - "typst", - "crane", - "flake-utils" - ], - "nixpkgs": [ - "typst", - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1693707092, - "narHash": "sha256-HR1EnynBSPqbt+04/yxxqsG1E3n6uXrOl7SPco/UnYo=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "98ccb73e6eefc481da6039ee57ad8818d1ca8d56", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -1203,21 +1164,6 @@ "type": "github" } }, - "systems_10": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -1344,17 +1290,15 @@ "crane": "crane_3", "flake-utils": "flake-utils_7", "nix-filter": "nix-filter", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_6" }, "locked": { - "lastModified": 1696406653, - "narHash": "sha256-o9+gmPwgzhKucWTM4GeDTY7pZq7z1zmDK9BF6gg3RlI=", + "lastModified": 1698060390, + "narHash": "sha256-GEM01jYAGOv6Jb51bs4wsZFeg12ZPyw5E7601pY7vJI=", "owner": "tweag", "repo": "topiary", - "rev": "48659c7bfa8975c179d6d2cd77bd2aa6b510db4e", + "rev": "79b93527d9bd59533f9a79fe490567963193fafd", "type": "github" }, "original": { @@ -1367,17 +1311,17 @@ "inputs": { "crane": "crane_4", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_10", "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems_9" }, "locked": { - "lastModified": 1697568781, - "narHash": "sha256-LRRMeWFR+KINNHKUMzyarqWfd8Z3TMjlSo494JuZbao=", + "lastModified": 1698781821, + "narHash": "sha256-i+lrB63D7XBTUmLK8gybzYt9c6WJcNNpFRRRVmAUzVs=", "owner": "typst", "repo": "typst", - "rev": "c0dbb900e859ea3a14632a59c76174fde8b50d51", + "rev": "0f274f8edbbb93d65cb11713f4bdf912b3286800", "type": "github" }, "original": { diff --git a/local/lock/flake.nix b/local/lock/flake.nix index 1fff3e4..ddd48ed 100644 --- a/local/lock/flake.nix +++ b/local/lock/flake.nix @@ -25,12 +25,10 @@ nur.url = "github:nix-community/NUR"; topiary.url = "github:tweag/topiary"; - topiary.inputs.nixpkgs.follows = "nixpkgs"; }; inputs = { nickel.url = "github:tweag/nickel"; - nickel.inputs.nixpkgs.follows = "nixpkgs"; nickel.inputs.topiary.follows = "topiary"; nil.url = "github:oxalica/nil"; diff --git a/templates/hivebus/flake.nix b/templates/hivebus/flake.nix index ba670be..1fc7941 100644 --- a/templates/hivebus/flake.nix +++ b/templates/hivebus/flake.nix @@ -15,7 +15,7 @@ "aarch64-darwin" ]; library = import ./nix/lib/__init.nix { inherit inputs eachSystem; }; - lib = library.layouts.default; + lib = library.exports.default; in lib.flakeOutputs // { diff --git a/templates/hivebus/nix/lib/flakeOutputs.nix b/templates/hivebus/nix/lib/flakeOutputs.nix index 70c06bd..5258620 100644 --- a/templates/hivebus/nix/lib/flakeOutputs.nix +++ b/templates/hivebus/nix/lib/flakeOutputs.nix @@ -25,12 +25,12 @@ in inputs' = (super.pops.flake.setSystem system).inputs; allData = (super.pops.omnibus.lib.addLoadExtender { load.inputs.inputs = inputs'; }) - .layouts.default.pops.allData; + .exports.default.pops.allData; in { data = (allData.addLoadExtender { load.src = projectDir + "/local/data"; }) - .layouts.default; + .exports.default; } ); @@ -45,6 +45,6 @@ in loader = _: path: inputs.nixpkgs.callPackage path { }; transformer = [ (_cursor: dir: if dir ? default then dir.default else dir) ]; }) - ).layouts.default + ).exports.default ); } diff --git a/templates/hivebus/nix/lib/hosts.nix b/templates/hivebus/nix/lib/hosts.nix index 7a1c5c4..2cb3be9 100644 --- a/templates/hivebus/nix/lib/hosts.nix +++ b/templates/hivebus/nix/lib/hosts.nix @@ -4,8 +4,8 @@ inputs = { inputs = inputs // root.pops.subflake.inputs; omnibus = inputs.omnibus // { - self = root.omnibus.lib.layouts.default; + self = root.omnibus.lib.exports.default; }; }; }; -}).layouts.default +}).exports.default diff --git a/templates/hivebus/units/nixos/hosts/darwin/layouts.nix b/templates/hivebus/units/nixos/hosts/darwin/layouts.nix index 94eeca1..8626748 100644 --- a/templates/hivebus/units/nixos/hosts/darwin/layouts.nix +++ b/templates/hivebus/units/nixos/hosts/darwin/layouts.nix @@ -20,7 +20,7 @@ in }; darwinSuites = lib.flatten [ - # outputs.darwinModules.layouts.default.homebrew + # outputs.darwinModules.exports.default.homebrew # # # --custom profiles # outputs.pops.nixosProfiles.layouts.customProfiles.presets.nix # outputs.pops.nixosProfiles.layouts.customProfiles.presets.boot diff --git a/templates/nixos/flake.nix b/templates/nixos/flake.nix index ba670be..1fc7941 100644 --- a/templates/nixos/flake.nix +++ b/templates/nixos/flake.nix @@ -15,7 +15,7 @@ "aarch64-darwin" ]; library = import ./nix/lib/__init.nix { inherit inputs eachSystem; }; - lib = library.layouts.default; + lib = library.exports.default; in lib.flakeOutputs // { diff --git a/templates/nixos/nix/lib/flakeOutputs.nix b/templates/nixos/nix/lib/flakeOutputs.nix index 70c06bd..5258620 100644 --- a/templates/nixos/nix/lib/flakeOutputs.nix +++ b/templates/nixos/nix/lib/flakeOutputs.nix @@ -25,12 +25,12 @@ in inputs' = (super.pops.flake.setSystem system).inputs; allData = (super.pops.omnibus.lib.addLoadExtender { load.inputs.inputs = inputs'; }) - .layouts.default.pops.allData; + .exports.default.pops.allData; in { data = (allData.addLoadExtender { load.src = projectDir + "/local/data"; }) - .layouts.default; + .exports.default; } ); @@ -45,6 +45,6 @@ in loader = _: path: inputs.nixpkgs.callPackage path { }; transformer = [ (_cursor: dir: if dir ? default then dir.default else dir) ]; }) - ).layouts.default + ).exports.default ); } diff --git a/templates/nixos/nix/lib/hosts.nix b/templates/nixos/nix/lib/hosts.nix index 7a1c5c4..2cb3be9 100644 --- a/templates/nixos/nix/lib/hosts.nix +++ b/templates/nixos/nix/lib/hosts.nix @@ -4,8 +4,8 @@ inputs = { inputs = inputs // root.pops.subflake.inputs; omnibus = inputs.omnibus // { - self = root.omnibus.lib.layouts.default; + self = root.omnibus.lib.exports.default; }; }; }; -}).layouts.default +}).exports.default diff --git a/templates/nixos/units/nixos/hosts/darwin/layouts.nix b/templates/nixos/units/nixos/hosts/darwin/layouts.nix index 94eeca1..8626748 100644 --- a/templates/nixos/units/nixos/hosts/darwin/layouts.nix +++ b/templates/nixos/units/nixos/hosts/darwin/layouts.nix @@ -20,7 +20,7 @@ in }; darwinSuites = lib.flatten [ - # outputs.darwinModules.layouts.default.homebrew + # outputs.darwinModules.exports.default.homebrew # # # --custom profiles # outputs.pops.nixosProfiles.layouts.customProfiles.presets.nix # outputs.pops.nixosProfiles.layouts.customProfiles.presets.boot diff --git a/tests/darwin/expr.nix b/tests/darwin/expr.nix index 7677f1b..c89752f 100644 --- a/tests/darwin/expr.nix +++ b/tests/darwin/expr.nix @@ -6,7 +6,7 @@ omnibus, }: let - exporter = root.nixos.pops.layouts.default; + exporter = root.nixos.pops.exports.default; in { darwinFontProfile = diff --git a/tests/data/expr.nix b/tests/data/expr.nix index 40c019d..fa0f96c 100644 --- a/tests/data/expr.nix +++ b/tests/data/expr.nix @@ -8,10 +8,10 @@ let inputs.nixpkgs = nixpkgs.legacyPackages.x86_64-linux; }; }; - }).layouts.default.pops.allData; + }).exports.default.pops.allData; in (allData.addLoadExtender { load = { src = ./__fixture; }; -}).layouts.default +}).exports.default diff --git a/tests/devshell/expr.nix b/tests/devshell/expr.nix index ff65949..a5f9c0c 100644 --- a/tests/devshell/expr.nix +++ b/tests/devshell/expr.nix @@ -28,7 +28,7 @@ let inherit (inputs) fenix nixpkgs; }; }; - }).layouts.default; + }).exports.default; shell = inputs.devshell.mkShell { name = "rust"; diff --git a/tests/flake-parts/expr.nix b/tests/flake-parts/expr.nix index 344bfc2..3e12c69 100644 --- a/tests/flake-parts/expr.nix +++ b/tests/flake-parts/expr.nix @@ -32,7 +32,7 @@ let }; }; }; - }).layouts.default.process-compose; + }).exports.default.process-compose; mkFlake = flake.inputs.flake-parts.lib.mkFlake diff --git a/tests/makes/expr.nix b/tests/makes/expr.nix index b97706e..224d41f 100644 --- a/tests/makes/expr.nix +++ b/tests/makes/expr.nix @@ -11,7 +11,7 @@ let }; }; }; - }).layouts.default.makes; + }).exports.default.makes; inherit (makesLib) makeScript; in diff --git a/tests/nixos/__fixture/layouts.nix b/tests/nixos/__fixture/layouts.nix index 18a236d..2d1990f 100644 --- a/tests/nixos/__fixture/layouts.nix +++ b/tests/nixos/__fixture/layouts.nix @@ -1,6 +1,6 @@ let inherit (inputs) nixpkgs darwin nixos; - # layouts.default to be default + # exports.default to be default outputs = omnibus.lib.mapPopsLayouts' super.pops; # with multi-layout outputs' = omnibus.lib.mapPopsLayouts super.pops; @@ -41,7 +41,7 @@ in # exporter.homeProfiles.default.presets.bat # # The parent directory of "presets" is categorized as a list type of "suites" # (exporter.homeProfiles.default.shell { }).default - # super.pops.homeModules.layouts.default.wayland.windowManager.hyprland + # super.pops.homeModules.exports.default.wayland.windowManager.hyprland ]; nixosConfiguration = diff --git a/tests/nixos/__fixture/pops/selfNixOSProfiles.nix b/tests/nixos/__fixture/pops/selfNixOSProfiles.nix index 4af1420..cdbceef 100644 --- a/tests/nixos/__fixture/pops/selfNixOSProfiles.nix +++ b/tests/nixos/__fixture/pops/selfNixOSProfiles.nix @@ -6,7 +6,7 @@ inputs = { omnibus = { nixosProfiles = super.nixosProfiles.outputs.nixosProfiles; - data = super.data.layouts.default; + data = super.data.exports.default; }; }; }; diff --git a/tests/nixos/expr.nix b/tests/nixos/expr.nix index 767b9ee..0cd8552 100644 --- a/tests/nixos/expr.nix +++ b/tests/nixos/expr.nix @@ -4,7 +4,7 @@ lib, }: let - out = super.pops.layouts.default.layouts; + out = super.pops.exports.default.layouts; extraHomeModule = m: { home-manager.users.admin = { imports = lib.flatten m; diff --git a/tests/srvos/expr.nix b/tests/srvos/expr.nix index bd1348e..6d2d481 100644 --- a/tests/srvos/expr.nix +++ b/tests/srvos/expr.nix @@ -5,7 +5,7 @@ root, }: let - exporter = root.nixos.pops.layouts.default; + exporter = root.nixos.pops.exports.default; in { srvosCommonOpenssh = diff --git a/units/configs/treefmt.nix b/units/configs/treefmt.nix index 369cfff..f1830f3 100644 --- a/units/configs/treefmt.nix +++ b/units/configs/treefmt.nix @@ -101,7 +101,7 @@ with dmerge; { topiary = { data.formatter.topiary = { command = "topiary"; - options = [ "fmt" ]; + options = [ "format" ]; includes = [ "*.ncl" ]; }; packages = [ topiary.packages.default ]; diff --git a/units/devshell/profiles/nickel.nix b/units/devshell/profiles/nickel.nix new file mode 100644 index 0000000..ab1bd05 --- /dev/null +++ b/units/devshell/profiles/nickel.nix @@ -0,0 +1,19 @@ +{ + omnibus, + inputs, + config, +}: +let + inherit + (omnibus.lib.errors.requiredInputs inputs "omnibus.pops.devshellProfiles" [ + "nickel" + ]) + nickel + ; +in +{ + packages = [ + nickel.packages.default + nickel.packages.lsp-nls + ]; +}