From 7c91a1954992db9fa06619753faa3a193a196040 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:49:04 +0200 Subject: lib: don't define defaults that require config --- krebs/3modules/makefu/default.nix | 1 + krebs/3modules/shared/default.nix | 2 ++ krebs/4lib/default.nix | 1 - krebs/4lib/types.nix | 13 +------------ 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index de5be964f..f5190b6ba 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -791,6 +791,7 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB } // { # hosts only maintained in stockholm, not owned by me muhbaasu = rec { + owner = config.krebs.users.root; cores = 1; nets = { internet = { diff --git a/krebs/3modules/shared/default.nix b/krebs/3modules/shared/default.nix index 47767d370..a9868954e 100644 --- a/krebs/3modules/shared/default.nix +++ b/krebs/3modules/shared/default.nix @@ -8,6 +8,7 @@ let "test-centos7" "test-all-krebs-modules" ] (name: { + owner = config.krebs.users.shared; inherit name; cores = 1; nets = { @@ -34,6 +35,7 @@ let in { hosts = { wolf = { + owner = config.krebs.users.shared; nets = { shack = { ip4.addr = "10.42.2.150" ; diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index 3f224edd1..c40b9a868 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -19,7 +19,6 @@ let out = lib // rec { ])); types = import ./types.nix { - inherit config; lib = lib // { inherit genid optionalTrace; }; }; diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 02ca2b8db..8d6ace2e5 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -1,14 +1,9 @@ -{ config, lib, ... }: +{ lib, ... }: with builtins; with lib; with types; -let - # Inherited attributes are used in submodules that have their own `config`. - inherit (config.krebs) build users; -in - types // rec { host = submodule ({ config, ... }: { @@ -27,7 +22,6 @@ types // rec { owner = mkOption { type = user; - default = users.krebs; }; extraZones = mkOption { @@ -49,10 +43,6 @@ types // rec { ssh.pubkey = mkOption { type = nullOr ssh-pubkey; default = null; - apply = x: - optionalTrace (x == null && config.owner.name == build.user.name) - "The option `krebs.hosts.${config.name}.ssh.pubkey' is unused." - x; }; ssh.privkey = mkOption { type = nullOr ssh-privkey; @@ -187,7 +177,6 @@ types // rec { }; owner = mkOption { type = user; - default = users.root; }; group-name = mkOption { type = str; -- cgit v1.2.3 From 6e2e2630c0517e2bb9df2aa8f4e74f0c87ce76f5 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:53:20 +0200 Subject: tv q: print TODOs first --- tv/5pkgs/q/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tv/5pkgs/q/default.nix b/tv/5pkgs/q/default.nix index b19402fa4..f923950f0 100644 --- a/tv/5pkgs/q/default.nix +++ b/tv/5pkgs/q/default.nix @@ -178,6 +178,11 @@ in pkgs.writeBashBin "q" '' set -eu export PATH=/var/empty + (${q-todo}) || : + if [ "$PWD" != "$HOME" ]; then + (HOME=$PWD; ${q-todo}) || : + fi + echo ${q-cal} echo ${q-isodate} @@ -189,8 +194,4 @@ pkgs.writeBashBin "q" '' (${q-online}) & (${q-thermal_zone}) & wait - ${q-todo} - if [ "$PWD" != "$HOME" ]; then - (HOME=$PWD; ${q-todo}) - fi '' -- cgit v1.2.3 From ce58a50de30fd49d4c000a81f9b7ce9baf0ccd66 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 13 Oct 2016 21:57:08 +0200 Subject: xu: mount /bku --- tv/1systems/xu.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix index 119399ac2..85ac23e9d 100644 --- a/tv/1systems/xu.nix +++ b/tv/1systems/xu.nix @@ -138,6 +138,11 @@ with config.krebs.lib; fsType = "btrfs"; options = ["defaults" "noatime" "ssd" "compress=lzo"]; }; + "/bku" = { + device = "/dev/mapper/xuvga-bku"; + fsType = "btrfs"; + options = ["defaults" "noatime" "ssd" "compress=lzo"]; + }; "/home" = { device = "/dev/mapper/xuvga-home"; fsType = "btrfs"; -- cgit v1.2.3