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:
parent
0b78657f3b
commit
f05dfab5c5
29 changed files with 67 additions and 45 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mapAttrsToList mkForce;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
imports = [
|
||||
./documentation.nix # nixos documentation
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkForce;
|
||||
inherit (lib.modules) mkIf mkForce;
|
||||
inherit (builtins) map;
|
||||
|
||||
cfg = config.modules.system.impermanence;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkForce;
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkForce mkDefault;
|
||||
inherit (lib.modules) mkForce mkDefault;
|
||||
in {
|
||||
security = {
|
||||
sudo-rs.enable = mkForce false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue