From ce706dd76ae5eaa3d6e8e63c8499a357fb00e002 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 25 May 2025 13:14:20 -0700 Subject: [PATCH] feat: make lib work --- flake/default.nix | 1 - hosts/default.nix | 2 ++ hosts/mairley/default.nix | 4 ++-- hosts/marleycentre/default.nix | 4 ++-- hosts/marleynet/default.nix | 4 ++-- hosts/nyx/default.nix | 4 ++-- lib/default.nix | 3 +++ lib/module.nix | 2 +- 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/flake/default.nix b/flake/default.nix index 92d784b..0e43765 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -1,6 +1,5 @@ { imports = [ - # ../lib ./config.nix ../hosts diff --git a/hosts/default.nix b/hosts/default.nix index a9f03c7..d36180d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,6 +6,8 @@ imports = [inputs.easy-hosts.flakeModule]; config.easy-hosts = { + shared.specialArgs.marleylib = import ../lib; + ### Module Imports ### # TODO: Move module imports to custom module shared.modules = with inputs; [ diff --git a/hosts/mairley/default.nix b/hosts/mairley/default.nix index c9a44e3..dea874b 100644 --- a/hosts/mairley/default.nix +++ b/hosts/mairley/default.nix @@ -1,9 +1,9 @@ { - lib, + marleylib, config, ... }: let - inherit (lib.marleyos) enabled; + inherit (marleylib.module) enabled; in { networking = { computerName = "mairley"; diff --git a/hosts/marleycentre/default.nix b/hosts/marleycentre/default.nix index a6c4ebc..5cf08d3 100644 --- a/hosts/marleycentre/default.nix +++ b/hosts/marleycentre/default.nix @@ -1,5 +1,5 @@ -{lib, ...}: let - inherit (lib.marleyos) enabled; +{marleylib, ...}: let + inherit (marleylib.module) enabled; in { imports = [./hardware-configuration.nix]; diff --git a/hosts/marleynet/default.nix b/hosts/marleynet/default.nix index 4c0a516..8211ffc 100644 --- a/hosts/marleynet/default.nix +++ b/hosts/marleynet/default.nix @@ -1,5 +1,5 @@ -{lib, ...}: let - inherit (lib.marleyos) enabled; +{marleylib, ...}: let + inherit (marleylib.module) enabled; in { imports = [./hardware-configuration.nix]; diff --git a/hosts/nyx/default.nix b/hosts/nyx/default.nix index 3c938fa..413f24c 100644 --- a/hosts/nyx/default.nix +++ b/hosts/nyx/default.nix @@ -1,5 +1,5 @@ -{lib, ...}: let - inherit (lib.marleyos) enabled; +{marleylib, ...}: let + inherit (marleylib.module) enabled; in { imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix]; diff --git a/lib/default.nix b/lib/default.nix index e69de29..8d51c6a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -0,0 +1,3 @@ +{ + module = import ./module.nix; +} diff --git a/lib/module.nix b/lib/module.nix index 10bcdbd..cc9ed30 100644 --- a/lib/module.nix +++ b/lib/module.nix @@ -1,4 +1,4 @@ -_: { +{ enabled = { ## Quickly enable an option. ##