flake: inherit explicitly from parts of lib

Instea of doing `inherit (lib) <something>``, all inherits now use
`inherit (lib.<subsystem>) <something>`, which is much nicer.
This commit is contained in:
Bloxx12 2025-04-09 15:31:18 +02:00
commit f05dfab5c5
29 changed files with 67 additions and 45 deletions

View file

@ -5,8 +5,8 @@
...
}: let
inherit (lib.modules) mkForce;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.boot;
in {
options.modules.system.boot = {

View file

@ -4,8 +4,9 @@
pkgs,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.modules.system.hardware.bluetooth;
inherit (lib) mkIf;
in {
config = mkIf cfg.enable {
hardware.bluetooth = {

View file

@ -4,8 +4,7 @@
pkgs,
...
}: let
inherit (lib) mkDefault mkIf;
inherit (config.modules.system.video) nvidia amd;
inherit (lib.modules) mkDefault;
in {
hardware = {
cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -3,8 +3,9 @@
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.modules.system.sound;
inherit (lib) mkIf;
in {
config = mkIf cfg.enable {
services.pipewire = {

View file

@ -6,7 +6,8 @@
pkgs,
...
}: let
inherit (lib) mapAttrsToList mkForce;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.modules) mkForce;
in {
imports = [
./documentation.nix # nixos documentation

View file

@ -4,7 +4,7 @@
lib,
...
}: let
inherit (lib) mkIf mkForce;
inherit (lib.modules) mkIf mkForce;
inherit (builtins) map;
cfg = config.modules.system.impermanence;

View file

@ -1,5 +1,5 @@
{lib, ...}: let
inherit (lib) mkForce;
inherit (lib.modules) mkForce;
in {
networking.networkmanager = {
enable = true;

View file

@ -3,7 +3,7 @@
pkgs,
...
}: let
inherit (lib) mkForce mkDefault;
inherit (lib.modules) mkForce mkDefault;
in {
security = {
sudo-rs.enable = mkForce false;