tree-wide: remove top-level "with lib;"

This commit is contained in:
teutat3s 2024-06-13 02:14:25 +02:00
parent cdfe4d6bcb
commit 472474ffda
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
30 changed files with 65 additions and 44 deletions

View file

@ -5,7 +5,9 @@
profiles,
...
}:
with lib; let
let
inherit (lib) mkForce;
# Gets hostname of host to be bundled inside iso
# Copied from https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L3-L11
getFqdn = config: let

View file

@ -5,7 +5,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
programs.adb.enable = true;

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
users.users."${psCfg.user.name}" = {

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in {

View file

@ -4,11 +4,11 @@
lib,
...
}:
with lib; let
let
cfg = config.pub-solar.core;
in {
options.pub-solar.core.disk-encryption-active = mkOption {
type = types.bool;
options.pub-solar.core.disk-encryption-active = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether it should be assumed that there is a cryptroot device";
};
@ -17,7 +17,7 @@ in {
boot = {
# Mount / luks device in initrd
# Allow fstrim to work on it.
initrd = mkIf cfg.disk-encryption-active {
initrd = lib.mkIf cfg.disk-encryption-active {
luks.devices."cryptroot" = {
allowDiscards = true;
};

View file

@ -3,7 +3,7 @@
lib,
...
}:
with lib; let
let
cfg = config.pub-solar.core;
psCfg = config.pub-solar;
in {

View file

@ -4,8 +4,9 @@
lib,
...
}:
with lib; let
let
cfg = config.pub-solar.core.hibernation;
inherit (lib) mkOption types mkIf;
in {
options.pub-solar.core.hibernation = {
enable = mkOption {

View file

@ -4,7 +4,7 @@
lib,
...
}:
with lib; {
{
config = {
# Set your time zone.
time.timeZone = "Europe/Berlin";

View file

@ -4,7 +4,7 @@
lib,
...
}:
with lib; let
let
psCfg = config.pub-solar;
cfg = config.pub-solar.core;
in {

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
services.udev.packages = [pkgs.yubikey-personalization];

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
virtualisation.docker.enable = true;

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
users.users."${psCfg.user.name}".packages = with pkgs; [

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
programs.steam.enable = true;

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
tomlFormat = pkgs.formats.toml {};
sessionVariables = {
@ -22,8 +22,8 @@ in {
];
options.pub-solar.graphical = {
wayland.software-renderer.enable = mkOption {
type = types.bool;
wayland.software-renderer.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Feature flag enabling wlroots software renderer, useful in VMs";
};

View file

@ -5,8 +5,9 @@
flake,
...
}:
with lib; let
let
psCfg = config.pub-solar;
inherit (lib) mkIf mkOption types;
in {
options.pub-solar.graphical = {
v4l2loopback.enable = mkOption {
@ -25,8 +26,8 @@ in {
'';
};
environment.systemPackages = with pkgs; mkIf psCfg.graphical.v4l2loopback.enable [
linuxPackages.v4l2loopback
environment.systemPackages = mkIf psCfg.graphical.v4l2loopback.enable [
pkgs.linuxPackages.v4l2loopback
];
programs.sway.enable = true;

View file

@ -1,8 +1,23 @@
{ config, pkgs, lib, ... }:
with lib;
let
inherit (lib)
any
attrValues
concatMapStringsSep
concatStrings
flatten
literalExpression
mapAttrs'
mapAttrsToList
mkDefault
mkEnableOption
mkIf
mkMerge
mkOption
nameValuePair
types;
cfg = config.services.invoiceplane;
eachSite = cfg.sites;
user = "invoiceplane";

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
home-manager.users."${psCfg.user.name}" = {

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
programs.evince.enable = true;

View file

@ -5,7 +5,7 @@
lib,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
services.avahi.enable = true;

View file

@ -5,17 +5,17 @@
flake,
...
}:
with lib; let
let
psCfg = config.pub-solar;
cfg = config.pub-solar.terminal-life;
in {
options.pub-solar.terminal-life = {
full = mkOption {
full = lib.mkOption {
description = ''
Enable a full version, which includes more nvim plugins and lsps.
'';
default = false;
type = types.bool;
type = lib.types.bool;
};
};

View file

@ -5,8 +5,9 @@
...
}: let
psCfg = config.pub-solar;
inherit (lib) mkIf mkOption types;
in
with lib; {
{
imports = [
./home.nix
];

View file

@ -4,7 +4,7 @@
lib,
...
}:
with lib; let
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in {

View file

@ -4,7 +4,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
in {
boot.kernelParams = [

View file

@ -4,9 +4,10 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
cfg = config.pub-solar.wireguard-client;
inherit (lib) mkOption types;
in {
options.pub-solar.wireguard-client = {
ownIPs = mkOption {

View file

@ -15,10 +15,10 @@ with self;
install -D -m755 cockroach $out/bin/cockroach
cp -r lib $out/lib
'';
meta = with lib; {
meta = {
homepage = "https://www.cockroachlabs.com";
description = "A scalable, survivable, strongly-consistent SQL database";
platforms = ["x86_64-linux"];
maintainers = with maintainers; [mic92];
maintainers = [ lib.maintainers.mic92 ];
};
}

View file

@ -11,11 +11,11 @@ let
sha256 = "818a7641068932ed6436d0af0a3bb77bbbde29df0a7142c8bd1a249e7c2f0d38";
};
meta = with lib; {
meta = {
description = "A simple namespaced plugin facility";
homepage = https://github.com/ironfroggy/straight.plugin;
license = licenses.mit;
maintainers = [ maintainers.makefu ];
homepage = "https://github.com/ironfroggy/straight.plugin";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.makefu ];
};
};
in

View file

@ -5,7 +5,7 @@
flake,
...
}:
with lib; let
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in {

View file

@ -6,7 +6,7 @@
pkgs,
...
}:
with lib; let
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
tritonshell = flake.inputs.tritonshell;

View file

@ -5,7 +5,7 @@
flake,
...
}:
with lib; let
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in {