Add extra function for lib, and refactor with loadImports
This commit is contained in:
parent
317a2b4a28
commit
2c997cddce
28 changed files with 111 additions and 204 deletions
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./nixos.nix
|
||||
./home.nix
|
||||
./templates.nix
|
||||
./perSystem.nix
|
||||
./deploy.nix
|
||||
./overlays.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
lib,
|
||||
inputs,
|
||||
self,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
rootPath = ./..;
|
||||
inherit (self) outputs;
|
||||
homeModules =
|
||||
(
|
||||
|
|
@ -46,6 +46,11 @@
|
|||
])
|
||||
++ [
|
||||
homeModules."${unixName}"
|
||||
]
|
||||
++ [
|
||||
{
|
||||
lib = {inherit (lib) youthlic;};
|
||||
}
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
|
|
|
|||
|
|
@ -2,11 +2,10 @@
|
|||
inputs,
|
||||
lib,
|
||||
self,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
rootPath = ./..;
|
||||
inherit (self) outputs;
|
||||
inherit (inputs) nixpkgs;
|
||||
in {
|
||||
flake = {
|
||||
nixosModules = {
|
||||
|
|
@ -15,10 +14,10 @@ in {
|
|||
};
|
||||
nixosConfigurations = let
|
||||
makeNixosConfiguration = hostName:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
lib.nixosSystem {
|
||||
modules = [(rootPath + "/nixos/configurations/${hostName}")];
|
||||
specialArgs = {
|
||||
inherit inputs outputs rootPath;
|
||||
inherit inputs outputs rootPath lib;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
self,
|
||||
inputs,
|
||||
lib,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
rootPath = ./..;
|
||||
inherit (self) outputs;
|
||||
importWithArgs = lib.flip import {inherit inputs outputs;};
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{inputs, ...}: let
|
||||
rootPath = ./..;
|
||||
in {
|
||||
{
|
||||
inputs,
|
||||
rootPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(rootPath + "/treefmt.nix")
|
||||
];
|
||||
|
|
@ -12,7 +14,7 @@ in {
|
|||
...
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
callPackages = lib.callPackagesWith (pkgs // {inherit callPackages inputs rootPath;});
|
||||
callPackages = lib.callPackagesWith (pkgs // {inherit callPackages inputs rootPath lib;});
|
||||
in {
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
flake-parts-lib,
|
||||
lib,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
rootPath = ./..;
|
||||
in {
|
||||
}: {
|
||||
options = {
|
||||
flake = flake-parts-lib.mkSubmoduleOptions {
|
||||
templates = lib.mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue