summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2015-08-28 21:48:29 +0200
committertv <tv@krebsco.de>2015-08-28 21:48:29 +0200
commit41ab71cb129c170608778d8acd3de1478d252800 (patch)
tree73bd2865ee1138e3bd5171f987b07c31d16a681a /tv/2configs
parent60cc5637365af3fcfb4fdb0eed36d26beea7a697 (diff)
tv configs test: init
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/test.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix
new file mode 100644
index 0000000..f96b9e9
--- /dev/null
+++ b/tv/2configs/test.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+
+with import ../4lib { inherit lib pkgs; };
+
+let
+ tvpkgs = import ../5pkgs { inherit lib pkgs; };
+
+ out = {
+ security.sudo.extraConfig = ''
+ tv ALL=(test) NOPASSWD: ALL
+ '';
+ users.extraUsers.test = {
+ shell = "${test-shell}";
+ };
+ };
+
+ test-shell = tvpkgs.execve "test-shell" rec {
+ filename = "${pkgs.bash}/bin/bash";
+ argv = ["sh" "--noprofile" "-l"];
+ envp.ENV = pkgs.writeText "test-env" ''
+ ${shell.cat "Hello, `$(j0w\nd0g!)`!\\o/\n"} >&2
+ '';
+ };
+
+in out