diff options
author | tv <tv@shackspace.de> | 2015-08-28 21:48:29 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-08-28 21:48:29 +0200 |
commit | 62865ae6ae46e006cea7ee80b931fc5be27d3449 (patch) | |
tree | bb0c2befa13bbac5648278e348c0a49a0f3fbbf7 /tv/2configs | |
parent | 8827469a35852a0623d8353c22b481a15328254a (diff) |
tv configs test: init
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/test.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix new file mode 100644 index 000000000..f96b9e98e --- /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 |