diff options
author | jeschli <jeschli@gmail.com> | 2018-01-21 10:40:42 +0000 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-01-21 10:40:42 +0000 |
commit | b9dc505fd6c5cbff7f8c07850a2d6789b99ff174 (patch) | |
tree | ee47595ed9db2821b8fcf858a4e0cead14cd94f0 /jeschli | |
parent | 1dadc45ab5d78f71886cac1860ee77c7e60e26ea (diff) | |
parent | e5459f79b628cd3783e5efe96793c7a09bec0be1 (diff) |
Merge branch 'master' of prism.i:stockholm
Diffstat (limited to 'jeschli')
-rw-r--r-- | jeschli/1systems/bln/config.nix | 1 | ||||
-rw-r--r-- | jeschli/1systems/enklave/config.nix | 1 | ||||
-rw-r--r-- | jeschli/2configs/IM.nix | 56 | ||||
-rw-r--r-- | jeschli/2configs/default.nix | 3 | ||||
-rw-r--r-- | jeschli/2configs/virtualbox.nix | 23 |
5 files changed, 84 insertions, 0 deletions
diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 9e5f8c5..9c491c8 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. <stockholm/jeschli> + <stockholm/jeschli/2configs/virtualbox.nix> ./hardware-configuration.nix # ./dcso-vpn.nix ]; diff --git a/jeschli/1systems/enklave/config.nix b/jeschli/1systems/enklave/config.nix index 0100890..76e7186 100644 --- a/jeschli/1systems/enklave/config.nix +++ b/jeschli/1systems/enklave/config.nix @@ -4,6 +4,7 @@ imports = [ <stockholm/jeschli> <stockholm/jeschli/2configs/retiolum.nix> + <stockholm/jeschli/2configs/IM.nix> <stockholm/jeschli/2configs/os-templates/CentOS-7-64bit.nix> { networking.dhcpcd.allowInterfaces = [ diff --git a/jeschli/2configs/IM.nix b/jeschli/2configs/IM.nix new file mode 100644 index 0000000..171b782 --- /dev/null +++ b/jeschli/2configs/IM.nix @@ -0,0 +1,56 @@ +with (import <stockholm/lib>); +{ config, lib, pkgs, ... }: +let + tmux = pkgs.writeDashBin "tmux" '' + export TERM=xterm-256color + exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' + set-option -g default-terminal screen-256color + ''} "$@" + ''; +in { + + services.bitlbee = { + enable = true; + portNumber = 6666; + plugins = [ + pkgs.bitlbee-facebook + pkgs.bitlbee-steam + pkgs.bitlbee-discord + ]; + libpurple_plugins = [ pkgs.telegram-purple ]; + }; + + users.extraUsers.chat = { + home = "/home/chat"; + uid = genid "chat"; + useDefaultShell = true; + createHome = true; + openssh.authorizedKeys.keys = with config.krebs.users; [ + jeschli.pubkey + jeschli-bln.pubkey + jeschli-brauerei.pubkey + ]; + packages = [ tmux ]; + }; + + + systemd.services.chat = { + description = "chat environment setup"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + restartIfChanged = false; + + path = [ + pkgs.rxvt_unicode.terminfo + ]; + + serviceConfig = { + User = "chat"; + RemainAfterExit = true; + Type = "oneshot"; + ExecStart = "${tmux}/bin/tmux -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat"; + ExecStop = "${tmux}/bin/tmux kill-session -t IM"; + }; + }; +} diff --git a/jeschli/2configs/default.nix b/jeschli/2configs/default.nix index 6d788d2..0ac3708 100644 --- a/jeschli/2configs/default.nix +++ b/jeschli/2configs/default.nix @@ -23,6 +23,9 @@ with import <stockholm/lib>; proot populate + # aliases + (writeDashBin "irc" "ssh chat@enklave -t tmux a") + #style most rxvt_unicode.terminfo diff --git a/jeschli/2configs/virtualbox.nix b/jeschli/2configs/virtualbox.nix new file mode 100644 index 0000000..b2cb851 --- /dev/null +++ b/jeschli/2configs/virtualbox.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +let + mainUser = config.users.extraUsers.markus; + +in { + #services.virtualboxHost.enable = true; + virtualisation.virtualbox.host.enable = true; + + users.extraUsers = { + virtual = { + name = "virtual"; + description = "user for running VirtualBox"; + home = "/home/virtual"; + useDefaultShell = true; + extraGroups = [ "vboxusers" "audio" ]; + createHome = true; + }; + }; + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(virtual) NOPASSWD: ALL + ''; +} |