tv: drop test.nix
This commit is contained in:
parent
e281271239
commit
8afb910e2a
@ -30,7 +30,6 @@ with lib;
|
||||
../2configs/git.nix
|
||||
../2configs/mail-client.nix
|
||||
../2configs/xserver
|
||||
../2configs/test.nix
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
out = {
|
||||
environment.systemPackages = [
|
||||
su-test
|
||||
];
|
||||
security.sudo.extraConfig = ''
|
||||
tv ALL=(test) NOPASSWD: ALL
|
||||
'';
|
||||
users.extraUsers.test = {
|
||||
shell = "${test-shell}";
|
||||
};
|
||||
};
|
||||
|
||||
su-test = pkgs.execveBin "su-test" rec {
|
||||
filename = "/var/setuid-wrappers/sudo";
|
||||
argv = ["sudo" "-u" "test" "-i"];
|
||||
};
|
||||
|
||||
test-shell = pkgs.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
|
Loading…
Reference in New Issue
Block a user