ref: flatten out inputs
This commit is contained in:
parent
16b3fad559
commit
cd7fb4f54c
8 changed files with 18 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ lib, nixpkgs, userSelf, inputs, ... }:
|
{ lib, nixpkgs, userSelf, userFlakeInputs, ... }:
|
||||||
|
|
||||||
{ modules, ... } @ args:
|
{ modules, ... } @ args:
|
||||||
lib.nixosSystem (args // {
|
lib.nixosSystem (args // {
|
||||||
|
@ -23,7 +23,7 @@ lib.nixosSystem (args // {
|
||||||
disabledModules = map (x: [ x ])
|
disabledModules = map (x: [ x ])
|
||||||
(lib.remove modules.core suites.allProfiles);
|
(lib.remove modules.core suites.allProfiles);
|
||||||
|
|
||||||
nix.registry = lib.mapAttrs (n: v: { flake = v; }) inputs;
|
nix.registry = lib.mapAttrs (n: v: { flake = v; }) userFlakeInputs;
|
||||||
|
|
||||||
isoImage.isoBaseName = "nixos-" + config.networking.hostName;
|
isoImage.isoBaseName = "nixos-" + config.networking.hostName;
|
||||||
isoImage.contents = [{
|
isoImage.contents = [{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, nixpkgs, inputs, userSelf, ... }:
|
{ lib, nixpkgs, userFlakeInputs, userSelf, ... }:
|
||||||
|
|
||||||
{ dir, extern, suites, overrides, multiPkgs, ... }:
|
{ dir, extern, suites, overrides, multiPkgs, ... }:
|
||||||
let
|
let
|
||||||
|
@ -38,7 +38,7 @@ let
|
||||||
nix.nixPath = [
|
nix.nixPath = [
|
||||||
"nixpkgs=${nixpkgs}"
|
"nixpkgs=${nixpkgs}"
|
||||||
"nixos-config=${userSelf}/compat/nixos"
|
"nixos-config=${userSelf}/compat/nixos"
|
||||||
"home-manager=${inputs.home}"
|
"home-manager=${userFlakeInputs.home}"
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.pkgs = lib.mkDefault multiPkgs.${config.nixpkgs.system};
|
nixpkgs.pkgs = lib.mkDefault multiPkgs.${config.nixpkgs.system};
|
||||||
|
@ -46,7 +46,7 @@ let
|
||||||
nix.registry = {
|
nix.registry = {
|
||||||
devos.flake = userSelf;
|
devos.flake = userSelf;
|
||||||
nixos.flake = nixpkgs;
|
nixos.flake = nixpkgs;
|
||||||
override.flake = inputs.override;
|
override.flake = userFlakeInputs.override;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.package = pkgs.nixFlakes;
|
nix.package = pkgs.nixFlakes;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, nixpkgs, userSelf, inputs, ... }:
|
{ lib, nixpkgs, userSelf, utils, userFlakeInputs, ... }:
|
||||||
|
|
||||||
{ extern, overrides }:
|
{ extern, overrides }:
|
||||||
(inputs.utils.lib.eachDefaultSystem
|
(utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
overridePkgs = lib.os.pkgImport inputs.override [ ] system;
|
overridePkgs = lib.os.pkgImport userFlakeInputs.override [ ] system;
|
||||||
overridesOverlay = overrides.packages;
|
overridesOverlay = overrides.packages;
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
let callLibs = file: import file
|
let callLibs = file: import file
|
||||||
({
|
({
|
||||||
lib = final;
|
lib = final;
|
||||||
inputs = inputs;
|
userFlakeInputs = {}; # TODO: Erm, this must become a proper argument to mkFlake
|
||||||
} // inputs);
|
} // inputs);
|
||||||
in
|
in
|
||||||
with final;
|
with final;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ lib, inputs, ... }:
|
{ lib, utils, deploy, ... }:
|
||||||
let
|
let
|
||||||
inherit (dev) os;
|
inherit (dev) os;
|
||||||
inherit (inputs) utils deploy;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
_: { self, ... } @ args:
|
_: { self, ... } @ args:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ userSelf, lib, inputs, utils, ... }:
|
{ userSelf, lib, nixpkgs, utils, ... }:
|
||||||
|
|
||||||
{ args }:
|
{ args }:
|
||||||
let
|
let
|
||||||
|
@ -54,7 +54,7 @@ let
|
||||||
options = with types; {
|
options = with types; {
|
||||||
input = mkOption {
|
input = mkOption {
|
||||||
type = flakeType;
|
type = flakeType;
|
||||||
default = inputs.nixpkgs;
|
default = nixpkgs;
|
||||||
description = ''
|
description = ''
|
||||||
nixpkgs flake input to use for this channel
|
nixpkgs flake input to use for this channel
|
||||||
'';
|
'';
|
||||||
|
@ -199,7 +199,7 @@ let
|
||||||
let
|
let
|
||||||
default = {
|
default = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
input = inputs.nixpkgs;
|
input = nixpkgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, inputs, system, nixpkgs, ... }:
|
{ lib, devshell, deploy, system, nixpkgs, ... }:
|
||||||
let
|
let
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.devshell.overlay
|
devshell.overlay
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
deploy-rs =
|
deploy-rs =
|
||||||
inputs.deploy.packages.${prev.system}.deploy-rs;
|
deploy.packages.${prev.system}.deploy-rs;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ pkgs, system, inputs, nixpkgs, lib, ... }:
|
{ pkgs, system, deploy, nixpkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
mkChecks = { hosts, nodes, homes ? { } }:
|
mkChecks = { hosts, nodes, homes ? { } }:
|
||||||
let
|
let
|
||||||
deployHosts = lib.filterAttrs
|
deployHosts = lib.filterAttrs
|
||||||
(n: _: hosts.${n}.config.nixpkgs.system == system)
|
(n: _: hosts.${n}.config.nixpkgs.system == system)
|
||||||
nodes;
|
nodes;
|
||||||
deployChecks = inputs.deploy.lib.${system}.deployChecks { nodes = deployHosts; };
|
deployChecks = deploy.lib.${system}.deployChecks { nodes = deployHosts; };
|
||||||
tests =
|
tests =
|
||||||
lib.optionalAttrs (deployHosts != { }) {
|
lib.optionalAttrs (deployHosts != { }) {
|
||||||
profilesTest = profilesTest (hosts.${(builtins.head (builtins.attrNames deployHosts))});
|
profilesTest = profilesTest (hosts.${(builtins.head (builtins.attrNames deployHosts))});
|
||||||
|
|
Loading…
Reference in a new issue