I guess lib and pkgs.lib aren't the same...?

This commit is contained in:
Daniel Flanagan 2024-02-21 21:42:04 -06:00
parent 65241635b2
commit 788fb87fdc
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
3 changed files with 35 additions and 13 deletions

View file

@ -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;

View file

@ -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

View file

@ -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;
}