From 0fd37a9919aff2c05c70aa9854e4bfff279eed26 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 27 Jan 2025 18:16:37 -0500 Subject: [PATCH] refactor: move all inputs to --- _outputs.nix | 42 +---------------------- inputs/default.nix | 84 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 60 insertions(+), 66 deletions(-) diff --git a/_outputs.nix b/_outputs.nix index bfbf0ef3..ab5a2710 100644 --- a/_outputs.nix +++ b/_outputs.nix @@ -1,45 +1,5 @@ { - inputs = let - inherit (import ./inputs) mkInput extraInputs; - - mainInputs = { - systems = mkInput { - owner = "nix-systems"; - repo = "default-linux"; - }; - - nixpkgs = mkInput { - owner = "NixOS"; - repo = "nixpkgs"; - ref = "nixos-unstable-small"; - }; - - home-manager = mkInput { - owner = "nix-community"; - repo = "home-manager"; - }; - - nix-on-droid = mkInput { - owner = "nix-community"; - repo = "nix-on-droid"; - - inputs.home-manager.follows = "home-manager"; - }; - - sops-nix = mkInput { - owner = "Mic92"; - repo = "sops-nix"; - }; - - secrets = mkInput { - type = "git"; - url = "ssh://git@git.nelim.org/matt1432/nixos-secrets"; - - inputs.sops-nix.follows = "sops-nix"; - }; - }; - in - mainInputs // extraInputs; + inputs = import ./inputs; outputs = inputs @ { self, diff --git a/inputs/default.nix b/inputs/default.nix index 8adc4f33..dc927af0 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -4,6 +4,43 @@ let inherit (builtins) listToAttrs map removeAttrs; # Inputs + mainInputs = { + systems = mkInput { + owner = "nix-systems"; + repo = "default-linux"; + }; + + nixpkgs = mkInput { + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-unstable-small"; + }; + + home-manager = mkInput { + owner = "nix-community"; + repo = "home-manager"; + }; + + nix-on-droid = mkInput { + owner = "nix-community"; + repo = "nix-on-droid"; + + inputs.home-manager.follows = "home-manager"; + }; + + sops-nix = mkInput { + owner = "Mic92"; + repo = "sops-nix"; + }; + + secrets = mkInput { + type = "git"; + url = "ssh://git@git.nelim.org/matt1432/nixos-secrets"; + + inputs.sops-nix.follows = "sops-nix"; + }; + }; + nixTools = { nix-fast-build = mkInput { owner = "Mic92"; @@ -385,28 +422,25 @@ let repo = "sioyek"; } ]; -in { - inherit mkInput mkSrc; - - extraInputs = - { - flakegen = { - url = "github:jorsn/flakegen"; - inputs.systems.follows = "systems"; - }; - } - // nixTools - // overlays - // nvimInputs - // clusterInputs - // serviviInputs - // nosInputs - // bbsteamieInputs - // desktopInputs.hyprlandInputs - // desktopInputs.agsInputs - // (listToAttrs (map (x: { - name = x.name or "${x.repo}-src"; - value = mkSrc (removeAttrs x ["name"]); - }) - srcs)); -} +in + { + flakegen = { + url = "github:jorsn/flakegen"; + inputs.systems.follows = "systems"; + }; + } + // mainInputs + // nixTools + // overlays + // nvimInputs + // clusterInputs + // serviviInputs + // nosInputs + // bbsteamieInputs + // desktopInputs.hyprlandInputs + // desktopInputs.agsInputs + // (listToAttrs (map (x: { + name = x.name or "${x.repo}-src"; + value = mkSrc (removeAttrs x ["name"]); + }) + srcs))