From 788fb87fdc7699e026b614becf4cbb130c85606d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 21 Feb 2024 21:42:04 -0600 Subject: [PATCH] I guess lib and pkgs.lib aren't the same...? --- modules/nixos/wifi.nix | 4 ++-- nixos/dragon.nix | 21 +++++++++++++++++++++ nixos/foxtrot.nix | 23 ++++++++++++----------- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/modules/nixos/wifi.nix b/modules/nixos/wifi.nix index 5f7c918..108e87c 100644 --- a/modules/nixos/wifi.nix +++ b/modules/nixos/wifi.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: let - inherit (pkgs.lib) mkDefault; +{lib, ...}: let + inherit (lib) mkDefault; in { networking.networkmanager.enable = mkDefault true; systemd.services.NetworkManager-wait-online.enable = mkDefault false; diff --git a/nixos/dragon.nix b/nixos/dragon.nix index 0ea6dae..cb3a3f1 100644 --- a/nixos/dragon.nix +++ b/nixos/dragon.nix @@ -17,6 +17,27 @@ inputs.hardware.nixosModules.common-pc-ssd outputs.nixosModules.pipewire-low-latency + ({ + config, + pkgs, + lib, + ... + }: + with lib; let + cfg = config.services.myservice; + in { + options.services.myservice = { + enable = mkEnableOption "Enables the api.lyte.dev service"; + }; + + config = mkIf cfg.enable { + networking.hostName = "anything-to-test"; + }; + }) + { + services.myservice.enable = true; + } + desktop-usage podman postgres diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index 0f0bd68..8a020a6 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -13,19 +13,20 @@ in { ({ config, pkgs, + lib, ... - }: let - inherit (pkgs) lib; - cfg = config.services.myservice; - in { - options.services.myservice = { - enable = lib.mkEnableOption "Enables the api.lyte.dev service"; - }; - - config = - lib.mkIf cfg.enable { + }: + with lib; let + cfg = config.services.myservice; + in { + options.services.myservice = { + enable = mkEnableOption "Enables the api.lyte.dev service"; }; - }) + + config = + mkIf cfg.enable { + }; + }) { services.myservice.enable = true; }