tv: normalize lib imports

This commit is contained in:
tv 2022-12-09 01:31:56 +01:00
parent e56f5d7e61
commit 6d64096cd9
94 changed files with 121 additions and 158 deletions

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [
<stockholm/tv> <stockholm/tv>
<stockholm/tv/2configs/hw/x220.nix> <stockholm/tv/2configs/hw/x220.nix>

1
tv/1systems/alnus/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

1
tv/1systems/au/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,7 +1,5 @@
{ config, pkgs, ... }: let with import ./lib;
lib = import ../../../lib; { config, pkgs, ... }: {
in {
imports = [ imports = [
./disks.nix ./disks.nix
<stockholm/tv> <stockholm/tv>

1
tv/1systems/bu/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

1
tv/1systems/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [
<stockholm/tv> <stockholm/tv>
<stockholm/tv/2configs/br.nix> <stockholm/tv/2configs/br.nix>

1
tv/1systems/mu/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
krebs.build.host = config.krebs.hosts.nomic; krebs.build.host = config.krebs.hosts.nomic;
imports = [ imports = [

1
tv/1systems/nomic/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [
<stockholm/tv> <stockholm/tv>
<stockholm/tv/2configs/retiolum.nix> <stockholm/tv/2configs/retiolum.nix>

1
tv/1systems/querel/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ../lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
krebs.build.host = config.krebs.hosts.wu; krebs.build.host = config.krebs.hosts.wu;
imports = [ imports = [

1
tv/1systems/wu/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
krebs.build.host = config.krebs.hosts.xu; krebs.build.host = config.krebs.hosts.xu;
imports = [ imports = [

1
tv/1systems/xu/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
krebs.build.host = config.krebs.hosts.zu; krebs.build.host = config.krebs.hosts.zu;
imports = [ imports = [

View File

@ -1,6 +1,5 @@
{ config, lib, ... }: with import ./lib;
with import <stockholm/lib>; { config, pkgs, ... }: {
{
krebs.backup.plans = { krebs.backup.plans = {
} // mapAttrs (_: recursiveUpdate { } // mapAttrs (_: recursiveUpdate {
snapshots = { snapshots = {

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
programs.bash = { programs.bash = {
interactiveShellInit = /* sh */ '' interactiveShellInit = /* sh */ ''
HISTCONTROL='erasedups:ignorespace' HISTCONTROL='erasedups:ignorespace'

1
tv/2configs/bash/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: with import <stockholm/lib>; { config, lib, pkgs, ... }: with import ./lib;
{ {
environment.etc."binary-cache.pubkey".text = environment.etc."binary-cache.pubkey".text =
config.krebs.build.host.binary-cache.pubkey; config.krebs.build.host.binary-cache.pubkey;

View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
boot.tmpOnTmpfs = true; boot.tmpOnTmpfs = true;
krebs.enable = true; krebs.enable = true;

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
environment.systemPackages = [ environment.systemPackages = [
pkgs.eximlog pkgs.eximlog
]; ];

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
environment.systemPackages = [ environment.systemPackages = [
pkgs.eximlog pkgs.eximlog
]; ];

View File

@ -1,8 +1,5 @@
{ config, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
environment.etc.gitconfig.text = '' environment.etc.gitconfig.text = ''
[alias] [alias]
patch = !${pkgs.git}/bin/git --no-pager diff --no-color patch = !${pkgs.git}/bin/git --no-pager diff --no-color

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: let {
with import <stockholm/lib>;
let {
body = { body = {

View File

@ -1,8 +1,5 @@
{ pkgs, ... }: with import ./lib;
{ pkgs, ... }: {
with import <stockholm/lib>;
{
nixpkgs.config.packageOverrides = super: { nixpkgs.config.packageOverrides = super: {
htop = pkgs.symlinkJoin { htop = pkgs.symlinkJoin {
name = "htop"; name = "htop";

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
imports = [ imports = [
../smartd.nix ../smartd.nix

1
tv/2configs/hw/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
{ pkgs, ... }: let with import ./lib;
lib = import <stockholm/lib>; { pkgs, ... }: {
in {
imports = [ imports = [
../smartd.nix ../smartd.nix
{ {

View File

@ -1,7 +1,5 @@
{ config, pkgs, ... }: let with import ./lib;
lib = import <stockholm/lib>; { config, pkgs, ... }: {
in
{
imports = [ imports = [
../smartd.nix ../smartd.nix
{ {

View File

@ -1,6 +1,5 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
services.nginx.virtualHosts."ni.r" = { services.nginx.virtualHosts."ni.r" = {
locations."/image" = { locations."/image" = {
extraConfig = /* nginx */ '' extraConfig = /* nginx */ ''

1
tv/2configs/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,8 +1,5 @@
{ config, lib, ... }: with import ./lib;
{ config, ... }: {
with import <stockholm/lib>;
{
services.nginx = { services.nginx = {
enableReload = true; enableReload = true;

1
tv/2configs/nginx/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,8 +1,5 @@
{ config, lib, ... }: with import ./lib;
{ config, ... }: {
with import <stockholm/lib>;
{
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.default = { virtualHosts.default = {

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
certFile = config.environment.etc."ssl/certs/ca-certificates.crt".source; certFile = config.environment.etc."ssl/certs/ca-certificates.crt".source;

1
tv/2configs/pki/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,5 +1,5 @@
with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
lib = import <stockholm/lib>;
cfg = { cfg = {
pin = "@${toString <secrets/o2.pin>}"; pin = "@${toString <secrets/o2.pin>}";
ttys.ppp = "/dev/ttyACM0"; ttys.ppp = "/dev/ttyACM0";

View File

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: let
with import <stockholm/lib>;
let
pkg = pkgs.pulseaudio; pkg = pkgs.pulseaudio;
runDir = "/run/pulse"; runDir = "/run/pulse";

1
tv/2configs/repo-sync/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,5 @@
{ config, pkgs, ... }: let with import ./lib;
lib = import <stockholm/lib>; { config, pkgs, ... }: {
in {
krebs.repo-sync.enable = true; krebs.repo-sync.enable = true;
krebs.repo-sync.repos.wiki.branches.hotdog = { krebs.repo-sync.repos.wiki.branches.hotdog = {
origin.url = "http://cgit.hotdog.r/wiki"; origin.url = "http://cgit.hotdog.r/wiki";

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
krebs.tinc.retiolum = { krebs.tinc.retiolum = {
enable = true; enable = true;
connectTo = filter (ne config.krebs.build.host.name) [ connectTo = filter (ne config.krebs.build.host.name) [

View File

@ -1,8 +1,5 @@
{ config, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
# Override NixOS's "Allow DSA keys for now." # Override NixOS's "Allow DSA keys for now."
environment.etc."ssh/ssh_config".text = mkForce '' environment.etc."ssh/ssh_config".text = mkForce ''
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"} AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, ... }: let { config, ... }: let
cfg.host = config.krebs.build.host; cfg.host = config.krebs.build.host;
in { in {

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
exec = filename: args: url: { exec = filename: args: url: {
inherit url; inherit url;

View File

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: let {
with import <stockholm/lib>;
let {
body = { body = {
environment.systemPackages = [ environment.systemPackages = [
vim-wrapper vim-wrapper

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: {
with import <stockholm/lib>;
{
environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME"; environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME";
systemd.tmpfiles.rules = let systemd.tmpfiles.rules = let

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: { { config, pkgs, ... }: {
environment.etc."utsushi.conf".text = '' environment.etc."utsushi.conf".text = ''

View File

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
with import <stockholm/lib>; with import ./lib;
pkgs.writeText "Xmodmap" '' pkgs.writeText "Xmodmap" ''
!keycode 66 = Caps_Lock !keycode 66 = Caps_Lock

View File

@ -1,6 +1,5 @@
{ config, pkgs, ... }@args: with import ./lib;
with import <stockholm/lib>; { config, pkgs, ... }@args: let
let
cfg = { cfg = {
cacheDir = cfg.dataDir; cacheDir = cfg.dataDir;
configDir = "/var/empty"; configDir = "/var/empty";

1
tv/2configs/xserver/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
cfg.user = config.krebs.build.user; cfg.user = config.krebs.build.user;
in { in {

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
cfg.user = config.krebs.build.user; cfg.user = config.krebs.build.user;
in { in {

View File

@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }:
with import <stockholm/lib>;
let let
cfg = config.services.xserver; cfg = config.services.xserver;

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
cfg = { cfg = {
enable = config.services.xserver.enable && config.tv.Xresources != {}; enable = config.services.xserver.enable && config.tv.Xresources != {};

View File

@ -1,4 +1,4 @@
{ config, ... }: with import <stockholm/lib>; let { config, ... }: with import ./lib; let
cfg = config.tv.charybdis; cfg = config.tv.charybdis;
in toFile "charybdis.conf" '' in toFile "charybdis.conf" ''
/* doc/example.conf - brief example configuration file /* doc/example.conf - brief example configuration file

View File

@ -1,4 +1,5 @@
{ config, lib, pkgs, ... }@args: with import <stockholm/lib>; let with import ./lib;
{ config, pkgs, ... }@args: let
cfg = config.tv.charybdis; cfg = config.tv.charybdis;
in { in {
options.tv.charybdis = { options.tv.charybdis = {

1
tv/3modules/charybdis/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, ... }: let { config, ... }: let
cfg = config.tv.dnsmasq; cfg = config.tv.dnsmasq;
in { in {

View File

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }@args: with import <stockholm/lib>; let with import ./lib;
{ config, pkgs, ... }: let
cfg = config.tv.ejabberd; cfg = config.tv.ejabberd;
gen-dhparam = pkgs.writeDash "gen-dhparam" '' gen-dhparam = pkgs.writeDash "gen-dhparam" ''

1
tv/3modules/ejabberd/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ {
options.tv.focus.enable = mkEnableOption "tv.focus"; options.tv.focus.enable = mkEnableOption "tv.focus";
} }

View File

@ -1,8 +1,5 @@
{ config, ... }: with import ./lib;
{ config, ... }: {
with import <stockholm/lib>;
{
options.tv.hosts = mkOption { options.tv.hosts = mkOption {
type = types.attrsOf types.host; type = types.attrsOf types.host;
default = default =

View File

@ -1,5 +1,5 @@
with import ./lib;
let let
lib = import <stockholm/lib>;
local.types.screen = lib.types.submodule { local.types.screen = lib.types.submodule {
options.width = lib.mkOption { options.width = lib.mkOption {
type = lib.types.uint; type = lib.types.uint;

View File

@ -1,6 +1,6 @@
with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
im = config.tv.im; im = config.tv.im;
lib = import <stockholm/lib>;
in { in {
options = { options = {
tv.im.client.enable = lib.mkEnableOption "tv.im.client" // { tv.im.client.enable = lib.mkEnableOption "tv.im.client" // {

View File

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }: with import ./lib;
{ config, pkgs, ... }: let {
with import <stockholm/lib>;
let {
cfg = config.tv.iptables; cfg = config.tv.iptables;
body = { body = {

1
tv/3modules/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,5 @@
{ config, ... }: let lib = import ../../lib; in { with import ./lib;
{ config, ... }: {
options.org.freedesktop.machine1.host-shell.access = lib.mkOption { options.org.freedesktop.machine1.host-shell.access = lib.mkOption {
default = {}; default = {};
type = type =

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
cfg = config.tv.slock; cfg = config.tv.slock;
in { in {

View File

@ -1,8 +1,6 @@
with import <stockholm/lib>; with import ./lib;
{ config, pkgs, ... }: let { config, pkgs, ... }: let
cfg = config.tv.x0vncserver; cfg = config.tv.x0vncserver;
in { in {
options.tv.x0vncserver = { options.tv.x0vncserver = {
display = mkOption { display = mkOption {

View File

@ -1,4 +1,4 @@
with import ../../lib; with import ./lib;
let let
pushBack = x: xs: pushBack = x: xs:
if elem x xs then if elem x xs then

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
let let
overrides = self: super: overrides = self: super:
mapNixDir (path: self.callPackage path {}) [ mapNixDir (path: self.callPackage path {}) [

1
tv/5pkgs/haskell/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

1
tv/5pkgs/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import ../../../lib; with import ./lib;
self: super: self: super:
mapNixDir (path: import path self super) ./. mapNixDir (path: import path self super) ./.

1
tv/5pkgs/override/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,6 +1,4 @@
let with import ./lib;
lib = import <stockholm/lib>;
in
self: super: self: super:

1
tv/5pkgs/rpi/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ pkgs { pkgs
, edit-key ? "ctrl-e" , edit-key ? "ctrl-e"

View File

@ -1,4 +1,4 @@
with import ../../../lib; with import ./lib;
self: super: self: super:

1
tv/5pkgs/simple/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,8 +1,7 @@
with import ./lib;
{ pkgs, ... }@args: { pkgs, ... }@args:
let let
lib = import <stockholm/lib>;
# config cannot be declared in the input attribute set because that would # config cannot be declared in the input attribute set because that would
# cause callPackage to inject the wrong config. Instead, get it from ... # cause callPackage to inject the wrong config. Instead, get it from ...
# via args. # via args.

View File

@ -0,0 +1 @@
../lib

View File

@ -1,5 +1,5 @@
{ pkgs, ... }: with import ./lib;
with import <stockholm/lib>; { pkgs }:
let let
q-cal = let q-cal = let

1
tv/5pkgs/simple/q/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
self: super: { self: super: {
tv = super.tv // { tv = super.tv // {

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ pkgs }: { pkgs }:
pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let

1
tv/5pkgs/vim/lib Symbolic link
View File

@ -0,0 +1 @@
../lib

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ pkgs }: { pkgs }:
pkgs.tv.vim.makePlugin (pkgs.write "vim-syntax-nix-nested" { pkgs.tv.vim.makePlugin (pkgs.write "vim-syntax-nix-nested" {

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>; with import ./lib;
{ pkgs }: { pkgs }:
pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let

1
tv/lib Symbolic link
View File

@ -0,0 +1 @@
../lib