From cd611b3841edcb38f4429bd01ff3fe94ca8e0ea3 Mon Sep 17 00:00:00 2001 From: guangtao Date: Sat, 21 Oct 2023 17:46:54 -0700 Subject: [PATCH] chore: clean path --- local/cells/repo/configs.nix | 28 +++++++++++-------- local/cells/repo/devshellProfiles.nix | 4 ++- local/cells/repo/shells.nix | 2 +- .../pops/__hostsLoad/darwinModules.nix | 3 +- .../pops/__hostsLoad/darwinProfiles.nix | 4 +-- .../exporter/pops/__hostsLoad/homeModules.nix | 8 +----- .../pops/__hostsLoad/homeProfiles.nix | 8 +----- .../pops/__hostsLoad/nixosModules.nix | 4 +-- .../pops/__hostsLoad/nixosProfiles.nix | 8 +----- .../units/nixos/hosts/darwin/layouts.nix | 8 ++++-- .../nixos/hosts/nixos/nixosConfiguration.nix | 2 +- .../pops/__hostsLoad/darwinModules.nix | 3 +- .../pops/__hostsLoad/darwinProfiles.nix | 4 +-- .../exporter/pops/__hostsLoad/homeModules.nix | 8 +----- .../pops/__hostsLoad/homeProfiles.nix | 8 +----- .../pops/__hostsLoad/nixosModules.nix | 4 +-- .../pops/__hostsLoad/nixosProfiles.nix | 8 +----- .../nixos/nix/lib/exporter/pops/subflake.nix | 4 +-- 18 files changed, 43 insertions(+), 75 deletions(-) diff --git a/local/cells/repo/configs.nix b/local/cells/repo/configs.nix index e15aa55..48ccf09 100755 --- a/local/cells/repo/configs.nix +++ b/local/cells/repo/configs.nix @@ -15,18 +15,24 @@ 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; in { - conform'.data = { - commit.conventional.scopes = append [ - "nixosModules" - "nixosProfiles" - "homeProfiles" - "homeModules" - "darwinModules" - "darwinProfiles" - ".*." - ]; + inherit treefmt lefthook; + conform = { + inherit (conform) default; + custom = { + data = { + commit.conventional.scopes = append [ + "nixosModules" + "nixosProfiles" + "homeProfiles" + "homeModules" + "darwinModules" + "darwinProfiles" + ".*." + ]; + }; + }; }; - inherit (configs.layouts.default) treefmt lefthook conform; } diff --git a/local/cells/repo/devshellProfiles.nix b/local/cells/repo/devshellProfiles.nix index ebe2b0f..0660773 100644 --- a/local/cells/repo/devshellProfiles.nix +++ b/local/cells/repo/devshellProfiles.nix @@ -2,5 +2,7 @@ let inptus' = (inputs.omnibus.pops.flake.setSystem inputs.nixpkgs.system).inputs; in (inputs.omnibus.pops.devshellProfiles.addLoadExtender { - load.inputs = inptus'; + load.inputs = { + inputs = inptus'; + }; }).layouts.default diff --git a/local/cells/repo/shells.nix b/local/cells/repo/shells.nix index 256239a..5a9970b 100755 --- a/local/cells/repo/shells.nix +++ b/local/cells/repo/shells.nix @@ -19,7 +19,7 @@ in # It runs the startup hook when entering the shell. nixago = [ (std.lib.dev.mkNixago std.lib.cfg.conform cell.configs.conform.default - cell.configs.conform' + 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) diff --git a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix index c79745b..a8b3228 100644 --- a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix +++ b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix @@ -2,7 +2,8 @@ (root.exporter.pops.nixosModules.addLoadExtender { load = { inputs = { - inputs = inputs; + # only for host + # custom = inputs.custom; }; }; }) diff --git a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix index c79745b..3e0b72c 100644 --- a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix +++ b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix @@ -1,8 +1,6 @@ { root, inputs }: (root.exporter.pops.nixosModules.addLoadExtender { load = { - inputs = { - inputs = inputs; - }; + inputs = { }; }; }) diff --git a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeModules.nix b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeModules.nix index e9e1b72..916e192 100644 --- a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeModules.nix +++ b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeModules.nix @@ -1,9 +1,3 @@ { root, inputs }: name: -(root.exporter.pops.homeModules.addLoadExtender { - load = { - inputs = { - inputs = inputs; - }; - }; -}) +(root.exporter.pops.homeModules.addLoadExtender { load = { }; }) diff --git a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix index 3890624..8402b86 100644 --- a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix +++ b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix @@ -1,8 +1,2 @@ { root, inputs }: -(root.exporter.pops.homeProfiles.addLoadExtender { - load = { - inputs = { - inputs = inputs; - }; - }; -}) +(root.exporter.pops.homeProfiles.addLoadExtender { load = { }; }) diff --git a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix index 8cbaa83..6e02d4b 100644 --- a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix +++ b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix @@ -2,8 +2,6 @@ name: (root.exporter.pops.nixosModules.addLoadExtender { load = { - inputs = { - inputs = inputs; - }; + inputs = { }; }; }) diff --git a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix index 871489f..f309388 100644 --- a/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix +++ b/templates/hivebus/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix @@ -1,8 +1,2 @@ { root, inputs }: -(root.exporter.pops.nixosProfiles.addLoadExtender { - load = { - inputs = { - inputs = inputs; - }; - }; -}) +(root.exporter.pops.nixosProfiles.addLoadExtender { load = { }; }) diff --git a/templates/hivebus/units/nixos/hosts/darwin/layouts.nix b/templates/hivebus/units/nixos/hosts/darwin/layouts.nix index 68c2c23..94eeca1 100644 --- a/templates/hivebus/units/nixos/hosts/darwin/layouts.nix +++ b/templates/hivebus/units/nixos/hosts/darwin/layouts.nix @@ -1,9 +1,13 @@ +{ + inputs, + self, + lib, +}: let outputs = inputs.self; in -# self' = inputs.self.hosts.nixos; { - system = "aarch64-darwin"; + system = "aarch64-aarch"; data = outputs.local.${self.system}.data; diff --git a/templates/hivebus/units/nixos/hosts/nixos/nixosConfiguration.nix b/templates/hivebus/units/nixos/hosts/nixos/nixosConfiguration.nix index f7e5f22..efee22e 100644 --- a/templates/hivebus/units/nixos/hosts/nixos/nixosConfiguration.nix +++ b/templates/hivebus/units/nixos/hosts/nixos/nixosConfiguration.nix @@ -1,5 +1,5 @@ let - inherit (inputs) nixos; + inherit (inputs) nixpkgs; in nixpkgs.lib.nixosSystem rec { system = super.layouts.system; diff --git a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix index c79745b..a8b3228 100644 --- a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix +++ b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinModules.nix @@ -2,7 +2,8 @@ (root.exporter.pops.nixosModules.addLoadExtender { load = { inputs = { - inputs = inputs; + # only for host + # custom = inputs.custom; }; }; }) diff --git a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix index c79745b..3e0b72c 100644 --- a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix +++ b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/darwinProfiles.nix @@ -1,8 +1,6 @@ { root, inputs }: (root.exporter.pops.nixosModules.addLoadExtender { load = { - inputs = { - inputs = inputs; - }; + inputs = { }; }; }) diff --git a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeModules.nix b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeModules.nix index e9e1b72..916e192 100644 --- a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeModules.nix +++ b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeModules.nix @@ -1,9 +1,3 @@ { root, inputs }: name: -(root.exporter.pops.homeModules.addLoadExtender { - load = { - inputs = { - inputs = inputs; - }; - }; -}) +(root.exporter.pops.homeModules.addLoadExtender { load = { }; }) diff --git a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix index 3890624..8402b86 100644 --- a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix +++ b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/homeProfiles.nix @@ -1,8 +1,2 @@ { root, inputs }: -(root.exporter.pops.homeProfiles.addLoadExtender { - load = { - inputs = { - inputs = inputs; - }; - }; -}) +(root.exporter.pops.homeProfiles.addLoadExtender { load = { }; }) diff --git a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix index 8cbaa83..6e02d4b 100644 --- a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix +++ b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosModules.nix @@ -2,8 +2,6 @@ name: (root.exporter.pops.nixosModules.addLoadExtender { load = { - inputs = { - inputs = inputs; - }; + inputs = { }; }; }) diff --git a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix index 871489f..f309388 100644 --- a/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix +++ b/templates/nixos/nix/lib/exporter/pops/__hostsLoad/nixosProfiles.nix @@ -1,8 +1,2 @@ { root, inputs }: -(root.exporter.pops.nixosProfiles.addLoadExtender { - load = { - inputs = { - inputs = inputs; - }; - }; -}) +(root.exporter.pops.nixosProfiles.addLoadExtender { load = { }; }) diff --git a/templates/nixos/nix/lib/exporter/pops/subflake.nix b/templates/nixos/nix/lib/exporter/pops/subflake.nix index ad8ec86..7955865 100644 --- a/templates/nixos/nix/lib/exporter/pops/subflake.nix +++ b/templates/nixos/nix/lib/exporter/pops/subflake.nix @@ -5,9 +5,7 @@ subflake = omnibus.pops.flake.setInitInputs ../../../lock; in { - inputs = subflake.inputs // { - nixpkgs = subflake.inputs.nixpkgs.legacyPackages; - }; + inputs = subflake.inputs; } ) ))