diff options
95 files changed, 202 insertions, 168 deletions
diff --git a/lib/default.nix b/lib/default.nix index 7c3b0370e..149b97a72 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -95,9 +95,12 @@ let path = dirPath + "/${relPath}"; in nameValuePair (toPackageName name) (f path)) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (attrNames (readDir dirPath)))); + (attrNames + (filterAttrs isNixDirEntry (readDir dirPath)))); + + isNixDirEntry = name: type: + (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || + (type == "directory" && !hasPrefix "." name); # https://tools.ietf.org/html/rfc5952 normalize-ip6-addr = @@ -191,3 +194,4 @@ let in lib +// { inherit lib; } diff --git a/tv/1systems/alnus/config.nix b/tv/1systems/alnus/config.nix index c36fbc4bf..90501d56d 100644 --- a/tv/1systems/alnus/config.nix +++ b/tv/1systems/alnus/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +with import ./lib; { config, pkgs, ... }: { - imports = [ <stockholm/tv> <stockholm/tv/2configs/hw/x220.nix> diff --git a/tv/1systems/alnus/lib b/tv/1systems/alnus/lib new file mode 120000 index 000000000..dc598c56d --- /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 000000000..dc598c56d --- /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 11cdac398..22e5f1484 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 <stockholm/tv> diff --git a/tv/1systems/bu/lib b/tv/1systems/bu/lib new file mode 120000 index 000000000..dc598c56d --- /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 000000000..dc598c56d --- /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 00bd5da15..00cdf84c1 100644 --- a/tv/1systems/mu/config.nix +++ b/tv/1systems/mu/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +with import ./lib; { config, pkgs, ... }: { - imports = [ <stockholm/tv> <stockholm/tv/2configs/br.nix> diff --git a/tv/1systems/mu/lib b/tv/1systems/mu/lib new file mode 120000 index 000000000..dc598c56d --- /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 4dc0b4e82..fb67814db 100644 --- a/tv/1systems/nomic/config.nix +++ b/tv/1systems/nomic/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +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 000000000..dc598c56d --- /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 44c7685e8..8df29f75e 100644 --- a/tv/1systems/querel/config.nix +++ b/tv/1systems/querel/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +with import ./lib; { config, pkgs, ... }: { - imports = [ <stockholm/tv> <stockholm/tv/2configs/retiolum.nix> diff --git a/tv/1systems/querel/lib b/tv/1systems/querel/lib new file mode 120000 index 000000000..dc598c56d --- /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 bf250cefa..4d45f6d40 100644 --- a/tv/1systems/wu/config.nix +++ b/tv/1systems/wu/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +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 000000000..dc598c56d --- /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 8a86e209b..1d143ce3a 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +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 000000000..dc598c56d --- /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 8a3040a36..169fa6bd6 100644 --- a/tv/1systems/zu/config.nix +++ b/tv/1systems/zu/config.nix @@ -1,6 +1,5 @@ -with import <stockholm/lib>; +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 a5e0cf4c7..c8ab73b50 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -1,6 +1,5 @@ -{ config, lib, ... }: -with import <stockholm/lib>; -{ +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 92e2499a9..c0855bb26 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: - -with import <stockholm/lib>; - -{ +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 000000000..dc598c56d --- /dev/null +++ b/tv/2configs/bash/lib @@ -0,0 +1 @@ +../lib
\ No newline at end of file |