diff options
author | tv <tv@krebsco.de> | 2022-12-09 01:31:56 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2022-12-09 01:34:31 +0100 |
commit | 6d64096cd99db27357bf2d038bdfdfc2d3a3aeae (patch) | |
tree | e1361555d8e32ec72ea2170852be432d347b381e /tv/3modules | |
parent | e56f5d7e61e46852ebe1b4904d6f4085091bd469 (diff) |
tv: normalize lib imports
Diffstat (limited to 'tv/3modules')
-rw-r--r-- | tv/3modules/Xresources.nix | 2 | ||||
-rw-r--r-- | tv/3modules/charybdis/config.nix | 2 | ||||
-rw-r--r-- | tv/3modules/charybdis/default.nix | 3 | ||||
l--------- | tv/3modules/charybdis/lib | 1 | ||||
-rw-r--r-- | tv/3modules/dnsmasq.nix | 2 | ||||
-rw-r--r-- | tv/3modules/ejabberd/default.nix | 4 | ||||
l--------- | tv/3modules/ejabberd/lib | 1 | ||||
-rw-r--r-- | tv/3modules/focus.nix | 2 | ||||
-rw-r--r-- | tv/3modules/hosts.nix | 7 | ||||
-rw-r--r-- | tv/3modules/hw.nix | 2 | ||||
-rw-r--r-- | tv/3modules/im.nix | 2 | ||||
-rw-r--r-- | tv/3modules/iptables.nix | 6 | ||||
l--------- | tv/3modules/lib | 1 | ||||
-rw-r--r-- | tv/3modules/org.freedesktop.machine1.host-shell.nix | 3 | ||||
-rw-r--r-- | tv/3modules/slock.nix | 2 | ||||
-rw-r--r-- | tv/3modules/x0vncserver.nix | 4 |
16 files changed, 21 insertions, 23 deletions
diff --git a/tv/3modules/Xresources.nix b/tv/3modules/Xresources.nix index ab233dd65..266531de9 100644 --- a/tv/3modules/Xresources.nix +++ b/tv/3modules/Xresources.nix @@ -1,4 +1,4 @@ -with import <stockholm/lib>; +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 dccbfde67..4669345eb 100644 --- a/tv/3modules/charybdis/config.nix +++ b/tv/3modules/charybdis/config.nix @@ -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 diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 96aae702a..4a0f99503 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -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 = { diff --git a/tv/3modules/charybdis/lib b/tv/3modules/charybdis/lib new file mode 120000 index 000000000..dc598c56d --- /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 ab24ac089..e1dfdea34 100644 --- a/tv/3modules/dnsmasq.nix +++ b/tv/3modules/dnsmasq.nix @@ -1,4 +1,4 @@ -with import <stockholm/lib>; +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 edc5296b0..e3a41a57b 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -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" '' diff --git a/tv/3modules/ejabberd/lib b/tv/3modules/ejabberd/lib new file mode 120000 index 000000000..dc598c56d --- /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 b1a7b2e52..c16d44243 100644 --- a/tv/3modules/focus.nix +++ b/tv/3modules/focus.nix @@ -1,4 +1,4 @@ -with import <stockholm/lib>; +with import ./lib; { options.tv.focus.enable = mkEnableOption "tv.focus"; } diff --git a/tv/3modules/hosts.nix b/tv/3modules/hosts.nix index 118740510..2d382e266 100644 --- a/tv/3modules/hosts.nix +++ b/tv/3modules/hosts.nix @@ -1,8 +1,5 @@ -{ config, ... }: - -with import <stockholm/lib>; - -{ +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 6eb722d2f..db1a77c85 100644 --- a/tv/3modules/hw.nix +++ b/tv/3modules/hw.nix @@ -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; diff --git a/tv/3modules/im.nix b/tv/3modules/im.nix index e98a57327..76a61b191 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 <stockholm/lib>; in { options = { tv.im.client.enable = lib.mkEnableOption "tv.im.client" // { diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix index 9cf0bd5a2..c4bf4644d 100644 --- a/tv/3modules/iptables.nix +++ b/tv/3modules/iptables.nix @@ -1,7 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import <stockholm/lib>; -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 000000000..dc598c56d --- /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 e1a5323d6..7d31edf9d 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 926adc8e0..a08303215 100644 --- a/tv/3modules/slock.nix +++ b/tv/3modules/slock.nix @@ -1,4 +1,4 @@ -with import <stockholm/lib>; +with import ./lib; { config, pkgs, ... }: let cfg = config.tv.slock; in { diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix index 4dbb34df0..f19bfebcc 100644 --- a/tv/3modules/x0vncserver.nix +++ b/tv/3modules/x0vncserver.nix @@ -1,8 +1,6 @@ -with import <stockholm/lib>; +with import ./lib; { config, pkgs, ... }: let - cfg = config.tv.x0vncserver; - in { options.tv.x0vncserver = { display = mkOption { |