summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-10-17 21:35:17 +0200
committerlassulus <lassulus@lassul.us>2017-10-17 21:35:17 +0200
commitda609f3ad0da51c1bf5562fb1619f8a57a940237 (patch)
treea974d1a4a2908eaa6a20c511a0b59a6e99cc96d6
parent99f5c3bbe1d601be84f40d777885dcc6887382ff (diff)
parentd3cc590ec63c8a376985fdfeec44b720b0708508 (diff)
Merge remote-tracking branch 'ni/master'
-rw-r--r--shell.nix24
-rw-r--r--tv/5pkgs/simple/xmonad-tv/default.nix6
2 files changed, 8 insertions, 22 deletions
diff --git a/shell.nix b/shell.nix
index c9b197a..53b0f96 100644
--- a/shell.nix
+++ b/shell.nix
@@ -20,7 +20,7 @@ let
set -efu
. ${init.env}
- . ${init.proxy opts}
+ . ${init.proxy "deploy" opts}
# Use system's nixos-rebuild, which is not self-contained
export PATH=/run/current-system/sw/bin
@@ -55,7 +55,7 @@ let
# TODO inline prepare.sh?
fi
- . ${init.proxy opts}
+ . ${init.proxy "install" opts}
# Reset PATH because we need access to nixos-install.
# TODO provide nixos-install instead of relying on prepare.sh
@@ -93,7 +93,7 @@ let
export dummy_secrets=true
. ${init.env}
- . ${init.proxy opts}
+ . ${init.proxy "test" opts}
exec ${utils.build} config.system.build.toplevel
'');
@@ -143,18 +143,6 @@ let
''}
'');
- # usage: quote [ARGS...]
- cmds.quote = pkgs.writeDash "cmds.quote" ''
- set -efu
- prefix=
- for x; do
- y=$(${pkgs.jq}/bin/jq -nr --arg x "$x" '$x | @sh "\(.)"')
- echo -n "$prefix$y"
- prefix=' '
- done
- echo
- '';
-
init.env = pkgs.writeText "init.env" /* sh */ ''
export quiet
export system
@@ -171,7 +159,7 @@ let
export target_local="$(echo $target_object | ${pkgs.jq}/bin/jq -r .local)"
'';
- init.proxy = opts: pkgs.writeText "init.proxy" /* sh */ ''
+ init.proxy = command: opts: pkgs.writeText "init.proxy" /* sh */ ''
if \test "''${using_proxy-}" != true; then
source=$(get-source "$source_file")
@@ -194,7 +182,8 @@ let
opts
)} \
using_proxy=true \
- $(quote "$0" "$@")
+ ${lib.shell.escape command} \
+ $WITHGETOPT_ORIG_ARGS \
")"
fi
fi
@@ -243,6 +232,7 @@ in pkgs.stdenv.mkDerivation {
fi
export PATH=${lib.makeBinPath [
pkgs.populate
+ pkgs.quote
shell.cmdspkg
]}
diff --git a/tv/5pkgs/simple/xmonad-tv/default.nix b/tv/5pkgs/simple/xmonad-tv/default.nix
index 5ac8f83..f73175b 100644
--- a/tv/5pkgs/simple/xmonad-tv/default.nix
+++ b/tv/5pkgs/simple/xmonad-tv/default.nix
@@ -80,7 +80,7 @@ mainNoArgs = do
, modMask = mod4Mask
, keys = myKeys
, workspaces = workspaces0
- , layoutHook = smartBorders $ myLayout
+ , layoutHook = smartBorders $ FixedColumn 1 20 80 10 ||| Full
-- , handleEventHook = myHandleEventHooks <+> handleTimerEvent
--, handleEventHook = handleTimerEvent
, manageHook = placeHook (smart (1,0)) <+> floatNextHook
@@ -91,10 +91,6 @@ mainNoArgs = do
, focusedBorderColor = "#f000b0"
, handleEventHook = handleShutdownEvent
}
- where
- myLayout =
- (onWorkspace "im" $ reflectVert $ Mirror $ Tall 1 (3/100) (12/13))
- (FixedColumn 1 20 80 10 ||| Full)
xmonad' :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()