From 62865ae6ae46e006cea7ee80b931fc5be27d3449 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:48:29 +0200 Subject: tv configs test: init --- tv/1systems/wu.nix | 1 + tv/2configs/test.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tv/2configs/test.nix (limited to 'tv') diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 6131897a..34ba5651 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -33,6 +33,7 @@ in ../2configs/mail-client.nix ../2configs/xserver.nix ../2configs/synaptics.nix # TODO w110er if xserver is enabled + ../2configs/test.nix ../2configs/urlwatch.nix { environment.systemPackages = with pkgs; [ diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix new file mode 100644 index 00000000..f96b9e98 --- /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 -- cgit v1.2.3