chore(helpers): clean up
This commit is contained in:
parent
5cf9fcd62e
commit
e061bf4db9
2 changed files with 13 additions and 14 deletions
|
@ -74,10 +74,8 @@
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
let
|
let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
helpers = import ./helpers.nix { inherit inputs outputs lib; };
|
|
||||||
in
|
in
|
||||||
with helpers; rec {
|
with (import ./lib { inherit inputs outputs; }); rec {
|
||||||
# Packages (`nix build`)
|
# Packages (`nix build`)
|
||||||
packages = forEachPkgs (pkgs:
|
packages = forEachPkgs (pkgs:
|
||||||
import ./pkgs { inherit pkgs; }
|
import ./pkgs { inherit pkgs; }
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ inputs, outputs, lib, ... }:
|
{ inputs, outputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (inputs) nixpkgs;
|
inherit (inputs) nixpkgs;
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
inherit (lib) mapAttrs;
|
inherit (lib) mapAttrs;
|
||||||
inherit (lib.attrsets) filterAttrs;
|
inherit (lib.attrsets) filterAttrs;
|
||||||
in
|
in
|
||||||
|
@ -51,13 +52,13 @@ rec {
|
||||||
f nixpkgs.legacyPackages.${system});
|
f nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
nixosModules = import ./modules/nixos;
|
nixosModules = import ../modules/nixos;
|
||||||
nixOnDroidModules = import ./modules/nix-on-droid;
|
nixOnDroidModules = import ../modules/nix-on-droid;
|
||||||
nixDarwinModules = import ./modules/nix-darwin;
|
nixDarwinModules = import ../modules/nix-darwin;
|
||||||
homeManagerModules = import ./modules/home-manager;
|
homeManagerModules = import ../modules/home-manager;
|
||||||
|
|
||||||
# Machines
|
# Machines
|
||||||
machines = recurseDir ./machines;
|
machines = recurseDir ../machines;
|
||||||
homeManagerMachines = machines.home-manager or { };
|
homeManagerMachines = machines.home-manager or { };
|
||||||
nixDarwinMachines = machines.nix-darwin or { };
|
nixDarwinMachines = machines.nix-darwin or { };
|
||||||
nixOnDroidMachines = machines.nix-on-droid or { };
|
nixOnDroidMachines = machines.nix-on-droid or { };
|
||||||
|
@ -77,7 +78,7 @@ rec {
|
||||||
users = lib.attrsets.genAttrs
|
users = lib.attrsets.genAttrs
|
||||||
users
|
users
|
||||||
(user: import (root + "/home/${user}.nix"));
|
(user: import (root + "/home/${user}.nix"));
|
||||||
|
sharedModules = builtins.attrValues homeManagerModules;
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
};
|
};
|
||||||
|
@ -171,7 +172,7 @@ rec {
|
||||||
config)
|
config)
|
||||||
(system: host: config:
|
(system: host: config:
|
||||||
mkNixosHost
|
mkNixosHost
|
||||||
./machines/nixos/${system}/${host}
|
../machines/nixos/${system}/${host}
|
||||||
system
|
system
|
||||||
host
|
host
|
||||||
(builtins.map
|
(builtins.map
|
||||||
|
@ -187,7 +188,7 @@ rec {
|
||||||
config)
|
config)
|
||||||
(system: host: config:
|
(system: host: config:
|
||||||
mkNixOnDroidHost
|
mkNixOnDroidHost
|
||||||
./machines/nix-on-droid/${system}/${host}
|
../machines/nix-on-droid/${system}/${host}
|
||||||
system
|
system
|
||||||
host)
|
host)
|
||||||
nixOnDroidMachines;
|
nixOnDroidMachines;
|
||||||
|
@ -200,7 +201,7 @@ rec {
|
||||||
config)
|
config)
|
||||||
(system: host: config:
|
(system: host: config:
|
||||||
mkNixDarwinHost
|
mkNixDarwinHost
|
||||||
./machines/nix-darwin/${system}/${host}
|
../machines/nix-darwin/${system}/${host}
|
||||||
system
|
system
|
||||||
host
|
host
|
||||||
(builtins.map
|
(builtins.map
|
||||||
|
@ -216,7 +217,7 @@ rec {
|
||||||
config)
|
config)
|
||||||
(system: host: config:
|
(system: host: config:
|
||||||
mkHomeManagerHost
|
mkHomeManagerHost
|
||||||
./machines/home-manager/${system}/${host}
|
../machines/home-manager/${system}/${host}
|
||||||
system
|
system
|
||||||
host)
|
host)
|
||||||
homeManagerMachines;
|
homeManagerMachines;
|
Loading…
Reference in a new issue