From c82942bb7b872765d109d5cc5fccec5f945f1200 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 01:31:56 +0100 Subject: tv: normalize lib imports --- tv/1systems/alnus/config.nix | 3 +-- tv/1systems/alnus/lib | 1 + tv/1systems/au/lib | 1 + tv/1systems/bu/config.nix | 6 ++---- tv/1systems/bu/lib | 1 + tv/1systems/lib | 1 + tv/1systems/mu/config.nix | 3 +-- tv/1systems/mu/lib | 1 + tv/1systems/nomic/config.nix | 3 +-- tv/1systems/nomic/lib | 1 + tv/1systems/querel/config.nix | 3 +-- tv/1systems/querel/lib | 1 + tv/1systems/wu/config.nix | 3 +-- tv/1systems/wu/lib | 1 + tv/1systems/xu/config.nix | 3 +-- tv/1systems/xu/lib | 1 + tv/1systems/zu/config.nix | 3 +-- tv/2configs/backup.nix | 5 ++--- tv/2configs/bash/default.nix | 7 ++----- tv/2configs/bash/lib | 1 + tv/2configs/binary-cache/default.nix | 2 +- tv/2configs/binary-cache/lib | 1 + tv/2configs/br.nix | 2 +- tv/2configs/default.nix | 3 +-- tv/2configs/exim-retiolum.nix | 7 ++----- tv/2configs/exim-smarthost.nix | 7 ++----- tv/2configs/gitconfig.nix | 7 ++----- tv/2configs/gitrepos.nix | 7 ++----- tv/2configs/htop.nix | 7 ++----- tv/2configs/hw/AO753.nix | 7 ++----- tv/2configs/hw/lib | 1 + tv/2configs/hw/w110er.nix | 5 ++--- tv/2configs/hw/x220.nix | 6 ++---- tv/2configs/imgur.nix | 3 +-- tv/2configs/lib | 1 + tv/2configs/nginx/default.nix | 7 ++----- tv/2configs/nginx/lib | 1 + tv/2configs/nginx/public_html.nix | 7 ++----- tv/2configs/pki/default.nix | 2 +- tv/2configs/pki/lib | 1 + tv/2configs/ppp.nix | 2 +- tv/2configs/pulse.nix | 6 ++---- tv/2configs/repo-sync/lib | 1 + tv/2configs/repo-sync/wiki.nix | 5 ++--- tv/2configs/retiolum.nix | 7 ++----- tv/2configs/ssh.nix | 7 ++----- tv/2configs/sshd.nix | 2 +- tv/2configs/urlwatch.nix | 2 +- tv/2configs/vim.nix | 6 ++---- tv/2configs/xdg.nix | 7 ++----- tv/2configs/xp-332.nix | 2 +- tv/2configs/xserver/Xmodmap.nix | 2 +- tv/2configs/xserver/default.nix | 5 ++--- tv/2configs/xserver/lib | 1 + tv/2configs/xserver/sxiv.nix | 2 +- tv/2configs/xserver/urxvt.nix | 2 +- tv/2configs/xserver/xserver.conf.nix | 5 ++--- tv/3modules/Xresources.nix | 2 +- tv/3modules/charybdis/config.nix | 2 +- tv/3modules/charybdis/default.nix | 3 ++- tv/3modules/charybdis/lib | 1 + tv/3modules/dnsmasq.nix | 2 +- tv/3modules/ejabberd/default.nix | 4 ++-- tv/3modules/ejabberd/lib | 1 + tv/3modules/focus.nix | 2 +- tv/3modules/hosts.nix | 7 ++----- tv/3modules/hw.nix | 2 +- tv/3modules/im.nix | 2 +- tv/3modules/iptables.nix | 6 ++---- tv/3modules/lib | 1 + tv/3modules/org.freedesktop.machine1.host-shell.nix | 3 ++- tv/3modules/slock.nix | 2 +- tv/3modules/x0vncserver.nix | 4 +--- tv/5pkgs/default.nix | 2 +- tv/5pkgs/haskell/default.nix | 2 +- tv/5pkgs/haskell/lib | 1 + tv/5pkgs/lib | 1 + tv/5pkgs/override/default.nix | 2 +- tv/5pkgs/override/lib | 1 + tv/5pkgs/rpi/default.nix | 4 +--- tv/5pkgs/rpi/lib | 1 + tv/5pkgs/simple/bash-fzf-history.nix | 2 +- tv/5pkgs/simple/default.nix | 2 +- tv/5pkgs/simple/lib | 1 + tv/5pkgs/simple/pinentry-urxvt/default.nix | 3 +-- tv/5pkgs/simple/pinentry-urxvt/lib | 1 + tv/5pkgs/simple/q/default.nix | 4 ++-- tv/5pkgs/simple/q/lib | 1 + tv/5pkgs/vim/default.nix | 2 +- tv/5pkgs/vim/hack.nix | 2 +- tv/5pkgs/vim/lib | 1 + tv/5pkgs/vim/nix.nix | 2 +- tv/5pkgs/vim/vim.nix | 2 +- tv/lib | 1 + 94 files changed, 121 insertions(+), 158 deletions(-) create mode 120000 tv/1systems/alnus/lib create mode 120000 tv/1systems/au/lib create mode 120000 tv/1systems/bu/lib create mode 120000 tv/1systems/lib create mode 120000 tv/1systems/mu/lib create mode 120000 tv/1systems/nomic/lib create mode 120000 tv/1systems/querel/lib create mode 120000 tv/1systems/wu/lib create mode 120000 tv/1systems/xu/lib create mode 120000 tv/2configs/bash/lib create mode 120000 tv/2configs/binary-cache/lib create mode 120000 tv/2configs/hw/lib create mode 120000 tv/2configs/lib create mode 120000 tv/2configs/nginx/lib create mode 120000 tv/2configs/pki/lib create mode 120000 tv/2configs/repo-sync/lib create mode 120000 tv/2configs/xserver/lib create mode 120000 tv/3modules/charybdis/lib create mode 120000 tv/3modules/ejabberd/lib create mode 120000 tv/3modules/lib create mode 120000 tv/5pkgs/haskell/lib create mode 120000 tv/5pkgs/lib create mode 120000 tv/5pkgs/override/lib create mode 120000 tv/5pkgs/rpi/lib create mode 120000 tv/5pkgs/simple/lib create mode 120000 tv/5pkgs/simple/pinentry-urxvt/lib create mode 120000 tv/5pkgs/simple/q/lib create mode 120000 tv/5pkgs/vim/lib create mode 120000 tv/lib (limited to 'tv') diff --git a/tv/1systems/alnus/config.nix b/tv/1systems/alnus/config.nix index c36fbc4..90501d5 100644 --- a/tv/1systems/alnus/config.nix +++ b/tv/1systems/alnus/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/alnus/lib b/tv/1systems/alnus/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/alnus/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/au/lib b/tv/1systems/au/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/au/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/bu/config.nix b/tv/1systems/bu/config.nix index 11cdac3..22e5f14 100644 --- a/tv/1systems/bu/config.nix +++ b/tv/1systems/bu/config.nix @@ -1,7 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ../../../lib; -in { - +with import ./lib; +{ config, pkgs, ... }: { imports = [ ./disks.nix diff --git a/tv/1systems/bu/lib b/tv/1systems/bu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/bu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/lib b/tv/1systems/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/mu/config.nix b/tv/1systems/mu/config.nix index 00bd5da..00cdf84 100644 --- a/tv/1systems/mu/config.nix +++ b/tv/1systems/mu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/mu/lib b/tv/1systems/mu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/mu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/nomic/config.nix b/tv/1systems/nomic/config.nix index 4dc0b4e..fb67814 100644 --- a/tv/1systems/nomic/config.nix +++ b/tv/1systems/nomic/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.nomic; imports = [ diff --git a/tv/1systems/nomic/lib b/tv/1systems/nomic/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/nomic/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/querel/config.nix b/tv/1systems/querel/config.nix index 44c7685..8df29f7 100644 --- a/tv/1systems/querel/config.nix +++ b/tv/1systems/querel/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - imports = [ diff --git a/tv/1systems/querel/lib b/tv/1systems/querel/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/querel/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix index bf250ce..4d45f6d 100644 --- a/tv/1systems/wu/config.nix +++ b/tv/1systems/wu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ../lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.wu; imports = [ diff --git a/tv/1systems/wu/lib b/tv/1systems/wu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/wu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 8a86e20..1d143ce 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.xu; imports = [ diff --git a/tv/1systems/xu/lib b/tv/1systems/xu/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/1systems/xu/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/1systems/zu/config.nix b/tv/1systems/zu/config.nix index 8a3040a..169fa6b 100644 --- a/tv/1systems/zu/config.nix +++ b/tv/1systems/zu/config.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - krebs.build.host = config.krebs.hosts.zu; imports = [ diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index a5e0cf4..c8ab73b 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -1,6 +1,5 @@ -{ config, lib, ... }: -with import ; -{ +with import ./lib; +{ config, pkgs, ... }: { krebs.backup.plans = { } // mapAttrs (_: recursiveUpdate { snapshots = { diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index 92e2499..c0855bb 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { programs.bash = { interactiveShellInit = /* sh */ '' HISTCONTROL='erasedups:ignorespace' diff --git a/tv/2configs/bash/lib b/tv/2configs/bash/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/bash/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix index 58791f4..66d7407 100644 --- a/tv/2configs/binary-cache/default.nix +++ b/tv/2configs/binary-cache/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: with import ; +{ config, lib, pkgs, ... }: with import ./lib; { environment.etc."binary-cache.pubkey".text = config.krebs.build.host.binary-cache.pubkey; diff --git a/tv/2configs/binary-cache/lib b/tv/2configs/binary-cache/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/binary-cache/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix index e6a46e9..4a8db2e 100644 --- a/tv/2configs/br.nix +++ b/tv/2configs/br.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { imports = [ diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index c904702..5710f28 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - boot.tmpOnTmpfs = true; krebs.enable = true; diff --git a/tv/2configs/exim-retiolum.nix b/tv/2configs/exim-retiolum.nix index 3d4ada4..fefc6dd 100644 --- a/tv/2configs/exim-retiolum.nix +++ b/tv/2configs/exim-retiolum.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.systemPackages = [ pkgs.eximlog ]; diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix index 4a0dcf6..e905536 100644 --- a/tv/2configs/exim-smarthost.nix +++ b/tv/2configs/exim-smarthost.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.systemPackages = [ pkgs.eximlog ]; diff --git a/tv/2configs/gitconfig.nix b/tv/2configs/gitconfig.nix index 771a4b2..fb9b78e 100644 --- a/tv/2configs/gitconfig.nix +++ b/tv/2configs/gitconfig.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.etc.gitconfig.text = '' [alias] patch = !${pkgs.git}/bin/git --no-pager diff --no-color diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 4fba5fe..d8e7755 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -let { +with import ./lib; +{ config, pkgs, ... }: let { body = { diff --git a/tv/2configs/htop.nix b/tv/2configs/htop.nix index e78caeb..0937298 100644 --- a/tv/2configs/htop.nix +++ b/tv/2configs/htop.nix @@ -1,8 +1,5 @@ -{ pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ pkgs, ... }: { nixpkgs.config.packageOverrides = super: { htop = pkgs.symlinkJoin { name = "htop"; diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index dd6fcfe..b998fcf 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { imports = [ ../smartd.nix diff --git a/tv/2configs/hw/lib b/tv/2configs/hw/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/hw/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 09dd9a4..bf749a9 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: let - lib = import ; -in { +with import ./lib; +{ pkgs, ... }: { imports = [ ../smartd.nix { diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix index c3ec7b4..ee3c7dc 100644 --- a/tv/2configs/hw/x220.nix +++ b/tv/2configs/hw/x220.nix @@ -1,7 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ; -in -{ +with import ./lib; +{ config, pkgs, ... }: { imports = [ ../smartd.nix { diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix index 1df67f9..e221227 100644 --- a/tv/2configs/imgur.nix +++ b/tv/2configs/imgur.nix @@ -1,6 +1,5 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { - services.nginx.virtualHosts."ni.r" = { locations."/image" = { extraConfig = /* nginx */ '' diff --git a/tv/2configs/lib b/tv/2configs/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix index efea3a8..6844df9 100644 --- a/tv/2configs/nginx/default.nix +++ b/tv/2configs/nginx/default.nix @@ -1,8 +1,5 @@ -{ config, lib, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { services.nginx = { enableReload = true; diff --git a/tv/2configs/nginx/lib b/tv/2configs/nginx/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/nginx/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix index 43d7189..c2403cd 100644 --- a/tv/2configs/nginx/public_html.nix +++ b/tv/2configs/nginx/public_html.nix @@ -1,8 +1,5 @@ -{ config, lib, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { services.nginx = { enable = true; virtualHosts.default = { diff --git a/tv/2configs/pki/default.nix b/tv/2configs/pki/default.nix index 51a5c71..415755b 100644 --- a/tv/2configs/pki/default.nix +++ b/tv/2configs/pki/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let certFile = config.environment.etc."ssl/certs/ca-certificates.crt".source; diff --git a/tv/2configs/pki/lib b/tv/2configs/pki/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/pki/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/ppp.nix b/tv/2configs/ppp.nix index c801401..24d2831 100644 --- a/tv/2configs/ppp.nix +++ b/tv/2configs/ppp.nix @@ -1,5 +1,5 @@ +with import ./lib; { config, pkgs, ... }: let - lib = import ; cfg = { pin = "@${toString }"; ttys.ppp = "/dev/ttyACM0"; diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index 513a0eb..7a07e81 100644 --- a/tv/2configs/pulse.nix +++ b/tv/2configs/pulse.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let +with import ./lib; +{ config, pkgs, ... }: let pkg = pkgs.pulseaudio; runDir = "/run/pulse"; diff --git a/tv/2configs/repo-sync/lib b/tv/2configs/repo-sync/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/repo-sync/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/repo-sync/wiki.nix b/tv/2configs/repo-sync/wiki.nix index 9134399..515e731 100644 --- a/tv/2configs/repo-sync/wiki.nix +++ b/tv/2configs/repo-sync/wiki.nix @@ -1,6 +1,5 @@ -{ config, pkgs, ... }: let - lib = import ; -in { +with import ./lib; +{ config, pkgs, ... }: { krebs.repo-sync.enable = true; krebs.repo-sync.repos.wiki.branches.hotdog = { origin.url = "http://cgit.hotdog.r/wiki"; diff --git a/tv/2configs/retiolum.nix b/tv/2configs/retiolum.nix index 3c3b2ad..de77de3 100644 --- a/tv/2configs/retiolum.nix +++ b/tv/2configs/retiolum.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { krebs.tinc.retiolum = { enable = true; connectTo = filter (ne config.krebs.build.host.name) [ diff --git a/tv/2configs/ssh.nix b/tv/2configs/ssh.nix index 84d2473..ad82881 100644 --- a/tv/2configs/ssh.nix +++ b/tv/2configs/ssh.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { # Override NixOS's "Allow DSA keys for now." environment.etc."ssh/ssh_config".text = mkForce '' AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"} diff --git a/tv/2configs/sshd.nix b/tv/2configs/sshd.nix index 79af5b0..4da8c82 100644 --- a/tv/2configs/sshd.nix +++ b/tv/2configs/sshd.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, ... }: let cfg.host = config.krebs.build.host; in { diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 619b044..7ba364f 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let exec = filename: args: url: { inherit url; diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index e296a0c..909213d 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let { +with import ./lib; +{ config, pkgs, ... }: let { body = { environment.systemPackages = [ vim-wrapper diff --git a/tv/2configs/xdg.nix b/tv/2configs/xdg.nix index 18bac9b..b7c14af 100644 --- a/tv/2configs/xdg.nix +++ b/tv/2configs/xdg.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; - -{ +with import ./lib; +{ config, pkgs, ... }: { environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME"; systemd.tmpfiles.rules = let diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index a97fb36..51fd1ae 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: { environment.etc."utsushi.conf".text = '' diff --git a/tv/2configs/xserver/Xmodmap.nix b/tv/2configs/xserver/Xmodmap.nix index 8e8e3df..8e555e9 100644 --- a/tv/2configs/xserver/Xmodmap.nix +++ b/tv/2configs/xserver/Xmodmap.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with import ; +with import ./lib; pkgs.writeText "Xmodmap" '' !keycode 66 = Caps_Lock diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 8bedb0e..f534b55 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -1,6 +1,5 @@ -{ config, pkgs, ... }@args: -with import ; -let +with import ./lib; +{ config, pkgs, ... }@args: let cfg = { cacheDir = cfg.dataDir; configDir = "/var/empty"; diff --git a/tv/2configs/xserver/lib b/tv/2configs/xserver/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/2configs/xserver/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/2configs/xserver/sxiv.nix b/tv/2configs/xserver/sxiv.nix index 10e450d..eb862f8 100644 --- a/tv/2configs/xserver/sxiv.nix +++ b/tv/2configs/xserver/sxiv.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg.user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/urxvt.nix b/tv/2configs/xserver/urxvt.nix index 2d504e1..3502c63 100644 --- a/tv/2configs/xserver/urxvt.nix +++ b/tv/2configs/xserver/urxvt.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg.user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/xserver.conf.nix b/tv/2configs/xserver/xserver.conf.nix index 99038e5..3fdfebf 100644 --- a/tv/2configs/xserver/xserver.conf.nix +++ b/tv/2configs/xserver/xserver.conf.nix @@ -1,6 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; +with import ./lib; +{ config, pkgs, ... }: let cfg = config.services.xserver; diff --git a/tv/3modules/Xresources.nix b/tv/3modules/Xresources.nix index ab233dd..266531d 100644 --- a/tv/3modules/Xresources.nix +++ b/tv/3modules/Xresources.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg = { enable = config.services.xserver.enable && config.tv.Xresources != {}; diff --git a/tv/3modules/charybdis/config.nix b/tv/3modules/charybdis/config.nix index dccbfde..4669345 100644 --- a/tv/3modules/charybdis/config.nix +++ b/tv/3modules/charybdis/config.nix @@ -1,4 +1,4 @@ -{ config, ... }: with import ; let +{ config, ... }: with import ./lib; let cfg = config.tv.charybdis; in toFile "charybdis.conf" '' /* doc/example.conf - brief example configuration file diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 96aae70..4a0f995 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -1,4 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let +with import ./lib; +{ config, pkgs, ... }@args: let cfg = config.tv.charybdis; in { options.tv.charybdis = { diff --git a/tv/3modules/charybdis/lib b/tv/3modules/charybdis/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/3modules/charybdis/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/dnsmasq.nix b/tv/3modules/dnsmasq.nix index ab24ac0..e1dfdea 100644 --- a/tv/3modules/dnsmasq.nix +++ b/tv/3modules/dnsmasq.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, ... }: let cfg = config.tv.dnsmasq; in { diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix index edc5296..e3a41a5 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }@args: with import ; let - +with import ./lib; +{ config, pkgs, ... }: let cfg = config.tv.ejabberd; gen-dhparam = pkgs.writeDash "gen-dhparam" '' diff --git a/tv/3modules/ejabberd/lib b/tv/3modules/ejabberd/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/3modules/ejabberd/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/focus.nix b/tv/3modules/focus.nix index b1a7b2e..c16d442 100644 --- a/tv/3modules/focus.nix +++ b/tv/3modules/focus.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { options.tv.focus.enable = mkEnableOption "tv.focus"; } diff --git a/tv/3modules/hosts.nix b/tv/3modules/hosts.nix index 1187405..2d382e2 100644 --- a/tv/3modules/hosts.nix +++ b/tv/3modules/hosts.nix @@ -1,8 +1,5 @@ -{ config, ... }: - -with import ; - -{ +with import ./lib; +{ config, ... }: { options.tv.hosts = mkOption { type = types.attrsOf types.host; default = diff --git a/tv/3modules/hw.nix b/tv/3modules/hw.nix index 6eb722d..db1a77c 100644 --- a/tv/3modules/hw.nix +++ b/tv/3modules/hw.nix @@ -1,5 +1,5 @@ +with import ./lib; let - lib = import ; local.types.screen = lib.types.submodule { options.width = lib.mkOption { type = lib.types.uint; diff --git a/tv/3modules/im.nix b/tv/3modules/im.nix index e98a573..76a61b1 100644 --- a/tv/3modules/im.nix +++ b/tv/3modules/im.nix @@ -1,6 +1,6 @@ +with import ./lib; { config, pkgs, ... }: let im = config.tv.im; - lib = import ; in { options = { tv.im.client.enable = lib.mkEnableOption "tv.im.client" // { diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix index 9cf0bd5..c4bf464 100644 --- a/tv/3modules/iptables.nix +++ b/tv/3modules/iptables.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import ; -let { +with import ./lib; +{ config, pkgs, ... }: let { cfg = config.tv.iptables; body = { diff --git a/tv/3modules/lib b/tv/3modules/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/3modules/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/3modules/org.freedesktop.machine1.host-shell.nix b/tv/3modules/org.freedesktop.machine1.host-shell.nix index e1a5323..7d31edf 100644 --- a/tv/3modules/org.freedesktop.machine1.host-shell.nix +++ b/tv/3modules/org.freedesktop.machine1.host-shell.nix @@ -1,4 +1,5 @@ -{ config, ... }: let lib = import ../../lib; in { +with import ./lib; +{ config, ... }: { options.org.freedesktop.machine1.host-shell.access = lib.mkOption { default = {}; type = diff --git a/tv/3modules/slock.nix b/tv/3modules/slock.nix index 926adc8..a083032 100644 --- a/tv/3modules/slock.nix +++ b/tv/3modules/slock.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let cfg = config.tv.slock; in { diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix index 4dbb34d..f19bfeb 100644 --- a/tv/3modules/x0vncserver.nix +++ b/tv/3modules/x0vncserver.nix @@ -1,8 +1,6 @@ -with import ; +with import ./lib; { config, pkgs, ... }: let - cfg = config.tv.x0vncserver; - in { options.tv.x0vncserver = { display = mkOption { diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 494cb9e..245d054 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,4 +1,4 @@ -with import ../../lib; +with import ./lib; let pushBack = x: xs: if elem x xs then diff --git a/tv/5pkgs/haskell/default.nix b/tv/5pkgs/haskell/default.nix index 33fd250..f05223d 100644 --- a/tv/5pkgs/haskell/default.nix +++ b/tv/5pkgs/haskell/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; let overrides = self: super: mapNixDir (path: self.callPackage path {}) [ diff --git a/tv/5pkgs/haskell/lib b/tv/5pkgs/haskell/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/haskell/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/lib b/tv/5pkgs/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/override/default.nix b/tv/5pkgs/override/default.nix index f719a9f..87b7ce9 100644 --- a/tv/5pkgs/override/default.nix +++ b/tv/5pkgs/override/default.nix @@ -1,4 +1,4 @@ -with import ../../../lib; +with import ./lib; self: super: mapNixDir (path: import path self super) ./. diff --git a/tv/5pkgs/override/lib b/tv/5pkgs/override/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/override/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/rpi/default.nix b/tv/5pkgs/rpi/default.nix index f0ac47f..e41d637 100644 --- a/tv/5pkgs/rpi/default.nix +++ b/tv/5pkgs/rpi/default.nix @@ -1,6 +1,4 @@ -let - lib = import ; -in +with import ./lib; self: super: diff --git a/tv/5pkgs/rpi/lib b/tv/5pkgs/rpi/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/rpi/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/bash-fzf-history.nix b/tv/5pkgs/simple/bash-fzf-history.nix index 88a8e9e..1166ec7 100644 --- a/tv/5pkgs/simple/bash-fzf-history.nix +++ b/tv/5pkgs/simple/bash-fzf-history.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs , edit-key ? "ctrl-e" diff --git a/tv/5pkgs/simple/default.nix b/tv/5pkgs/simple/default.nix index 9fb45dd..82a19a9 100644 --- a/tv/5pkgs/simple/default.nix +++ b/tv/5pkgs/simple/default.nix @@ -1,4 +1,4 @@ -with import ../../../lib; +with import ./lib; self: super: diff --git a/tv/5pkgs/simple/lib b/tv/5pkgs/simple/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/simple/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/pinentry-urxvt/default.nix b/tv/5pkgs/simple/pinentry-urxvt/default.nix index 6e4f6b0..c768a9f 100644 --- a/tv/5pkgs/simple/pinentry-urxvt/default.nix +++ b/tv/5pkgs/simple/pinentry-urxvt/default.nix @@ -1,8 +1,7 @@ +with import ./lib; { pkgs, ... }@args: let - lib = import ; - # config cannot be declared in the input attribute set because that would # cause callPackage to inject the wrong config. Instead, get it from ... # via args. diff --git a/tv/5pkgs/simple/pinentry-urxvt/lib b/tv/5pkgs/simple/pinentry-urxvt/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/simple/pinentry-urxvt/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/simple/q/default.nix b/tv/5pkgs/simple/q/default.nix index e17282e..2ae71db 100644 --- a/tv/5pkgs/simple/q/default.nix +++ b/tv/5pkgs/simple/q/default.nix @@ -1,5 +1,5 @@ -{ pkgs, ... }: -with import ; +with import ./lib; +{ pkgs }: let q-cal = let diff --git a/tv/5pkgs/simple/q/lib b/tv/5pkgs/simple/q/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/simple/q/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/vim/default.nix b/tv/5pkgs/vim/default.nix index e0e2761..c143592 100644 --- a/tv/5pkgs/vim/default.nix +++ b/tv/5pkgs/vim/default.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; self: super: { tv = super.tv // { diff --git a/tv/5pkgs/vim/hack.nix b/tv/5pkgs/vim/hack.nix index 0e94968..922d85b 100644 --- a/tv/5pkgs/vim/hack.nix +++ b/tv/5pkgs/vim/hack.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs }: pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let diff --git a/tv/5pkgs/vim/lib b/tv/5pkgs/vim/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/5pkgs/vim/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file diff --git a/tv/5pkgs/vim/nix.nix b/tv/5pkgs/vim/nix.nix index 01f769f..43caf46 100644 --- a/tv/5pkgs/vim/nix.nix +++ b/tv/5pkgs/vim/nix.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs }: pkgs.tv.vim.makePlugin (pkgs.write "vim-syntax-nix-nested" { diff --git a/tv/5pkgs/vim/vim.nix b/tv/5pkgs/vim/vim.nix index 6034dbd..c5693a2 100644 --- a/tv/5pkgs/vim/vim.nix +++ b/tv/5pkgs/vim/vim.nix @@ -1,4 +1,4 @@ -with import ; +with import ./lib; { pkgs }: pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let diff --git a/tv/lib b/tv/lib new file mode 120000 index 0000000..dc598c5 --- /dev/null +++ b/tv/lib @@ -0,0 +1 @@ +../lib \ No newline at end of file -- cgit v1.2.3