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, ... }: {
imports = [
<stockholm/tv>
<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
lib = import ../../../lib;
in {
with import ./lib;
{ config, pkgs, ... }: {
imports = [
./disks.nix
<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, ... }: {
imports = [
<stockholm/tv>
<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, ... }: {
krebs.build.host = config.krebs.hosts.nomic;
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, ... }: {
imports = [
<stockholm/tv>
<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, ... }: {
krebs.build.host = config.krebs.hosts.wu;
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, ... }: {
krebs.build.host = config.krebs.hosts.xu;
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, ... }: {
krebs.build.host = config.krebs.hosts.zu;
imports = [

View File

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

View File

@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
{
with import ./lib;
{ config, pkgs, ... }: {
programs.bash = {
interactiveShellInit = /* sh */ ''
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 =
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, ... }: {
imports = [

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

View File

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

View File

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

View File

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

1
tv/2configs/lib Symbolic link
View File

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

View File

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

View File

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

View File

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
let
with import ./lib;
{ config, pkgs, ... }: let
pkg = pkgs.pulseaudio;
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
lib = import <stockholm/lib>;
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";

View File

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

View File

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
with import <stockholm/lib>;
{
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"}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,5 @@
{ config, pkgs, ... }@args:
with import <stockholm/lib>;
let
with import ./lib;
{ config, pkgs, ... }@args: let
cfg = {
cacheDir = cfg.dataDir;
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
cfg.user = config.krebs.build.user;
in {

View File

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

View File

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

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>;
with import ./lib;
{ config, pkgs, ... }: let
cfg = {
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;
in toFile "charybdis.conf" ''
/* 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;
in {
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
cfg = config.tv.dnsmasq;
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;
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";
}

View File

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

View File

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

View File

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

View File

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
let {
with import ./lib;
{ config, pkgs, ... }: let {
cfg = config.tv.iptables;
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 {
default = {};
type =

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
with import <stockholm/lib>;
with import ./lib;
let
overrides = self: super:
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:
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
lib = import <stockholm/lib>;
in
with import ./lib;
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
, edit-key ? "ctrl-e"

View File

@ -1,4 +1,4 @@
with import ../../../lib;
with import ./lib;
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:
let
lib = import <stockholm/lib>;
# 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.

View File

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

View File

@ -1,5 +1,5 @@
{ pkgs, ... }:
with import <stockholm/lib>;
with import ./lib;
{ pkgs }:
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: {
tv = super.tv // {

View File

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

View File

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

1
tv/lib Symbolic link
View File

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