summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2016-10-13 21:59:56 +0200
committerlassulus <lass@aidsballs.de>2016-10-13 21:59:56 +0200
commit52f50275651f0c762b7f9712cd6cc31077950421 (patch)
tree37df95c25251e1de010a260e73d6dd24038fdb73
parentc419b951efaac4773954e547cf7c1af70a999396 (diff)
parent9fb29a7030a168046983457f6f7cf9d943661c06 (diff)
Merge remote-tracking branch 'cd/master'
-rw-r--r--krebs/4lib/default.nix22
-rw-r--r--krebs/4lib/git.nix7
-rw-r--r--krebs/4lib/types.nix13
-rw-r--r--krebs/5pkgs/default.nix2
-rw-r--r--lib/default.nix4
-rw-r--r--tv/1systems/xu.nix5
-rw-r--r--tv/5pkgs/q/default.nix9
7 files changed, 28 insertions, 34 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index 49241cc82..c40b9a868 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -1,19 +1,12 @@
-{ config, lib, ... }:
+_:
-with builtins;
-with lib;
-
-let out = import <stockholm/lib> // rec {
-
- eq = x: y: x == y;
- ne = x: y: x != y;
+let
+ lib = import <stockholm/lib>;
+in
- mod = x: y: x - y * (x / y);
-
- addName = name: set:
- set // { inherit name; };
+with lib;
- addNames = mapAttrs addName;
+let out = lib // rec {
guard = spec@{ type, value, ... }:
assert isOptionType type;
@@ -26,12 +19,9 @@ let out = import <stockholm/lib> // rec {
]));
types = import ./types.nix {
- inherit config;
lib = lib // { inherit genid optionalTrace; };
};
- dir.has-default-nix = path: pathExists (path + "/default.nix");
-
genid = import ./genid.nix { lib = lib // out; };
genid_signed = x: ((genid x) + 16777216) / 2;
git = import ./git.nix { lib = lib // out; };
diff --git a/krebs/4lib/git.nix b/krebs/4lib/git.nix
index d50ba2018..005c017a9 100644
--- a/krebs/4lib/git.nix
+++ b/krebs/4lib/git.nix
@@ -1,7 +1,12 @@
{ lib, ... }:
+with lib;
+
let
- inherit (lib) addNames escapeShellArg makeSearchPath optionalString;
+ addName = name: set:
+ set // { inherit name; };
+
+ addNames = mapAttrs addName;
commands = addNames {
git-receive-pack = {};
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;
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index cdab64212..75d1dac82 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -17,7 +17,7 @@ with config.krebs.lib;
in {}
// import ./builders.nix args
// mapAttrs (_: flip callPackage {})
- (filterAttrs (_: dir.has-default-nix)
+ (filterAttrs (_: dir: pathExists (dir + "/default.nix"))
(subdirsOf ./.))
// {
empty = pkgs.runCommand "empty-1.0.0" {} "mkdir $out";
diff --git a/lib/default.nix b/lib/default.nix
index 6c607f13b..1f5010853 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -1,6 +1,10 @@
let
lib = import <nixpkgs/lib> // builtins // {
shell = import ./shell.nix { inherit lib; };
+
+ eq = x: y: x == y;
+ ne = x: y: x != y;
+ mod = x: y: x - y * (x / y);
};
in
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";
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
''