From f53dac60601ee2d10731e859f09f541342979b82 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:40:30 +0100 Subject: l bitlbee: add more plugins --- lass/2configs/bitlbee.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/bitlbee.nix b/lass/2configs/bitlbee.nix index b23628dc5..e7be0a61c 100644 --- a/lass/2configs/bitlbee.nix +++ b/lass/2configs/bitlbee.nix @@ -7,6 +7,8 @@ plugins = [ pkgs.bitlbee-facebook pkgs.bitlbee-steam + pkgs.bitlbee-discord ]; + libpurple_plugins = [ pkgs.telegram-purple ]; }; } -- cgit v1.2.3 From 91e13324ec4d16f15ab2f4113802752f0cb4d7e6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:42:01 +0100 Subject: l weechat: add service --- lass/2configs/weechat.nix | 52 ++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 21 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/weechat.nix b/lass/2configs/weechat.nix index d5496ac09..b94cb0634 100644 --- a/lass/2configs/weechat.nix +++ b/lass/2configs/weechat.nix @@ -1,12 +1,24 @@ +with (import ); { config, lib, pkgs, ... }: let - inherit (import ) genid; + tmux = pkgs.writeDash "tmux" '' + exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' + set-option -g prefix ` + unbind-key C-b + bind ` send-prefix + + set-option -g status off + set-option -g default-terminal screen-256color + + #use session instead of windows + bind-key c new-session + bind-key p switch-client -p + bind-key n switch-client -n + bind-key C-s switch-client -l + ''} "$@" + ''; in { - krebs.per-user.chat.packages = with pkgs; [ - mosh - weechat - ]; users.extraUsers.chat = { home = "/home/chat"; @@ -24,24 +36,22 @@ in { # mosh krebs.iptables.tables.filter.INPUT.rules = [ { predicate = "-p udp --dport 60000:61000"; target = "ACCEPT";} + { predicate = "-p tcp --dport 9999"; target = "ACCEPT";} ]; - #systemd.services.chat = { - # description = "chat environment setup"; - # after = [ "network.target" ]; - # wantedBy = [ "multi-user.target" ]; + systemd.services.chat = { + description = "chat environment setup"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; - # path = with pkgs; [ - # weechat - # tmux - # ]; + restartIfChanged = false; - # restartIfChanged = true; - - # serviceConfig = { - # User = "chat"; - # Restart = "always"; - # ExecStart = "${pkgs.tmux}/bin/tmux new -s IM weechat"; - # }; - #}; + serviceConfig = { + User = "chat"; + RemainAfterExit = true; + Type = "oneshot"; + ExecStart = "${tmux} -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat"; + ExecStop = "${tmux} kill-session -t IM"; + }; + }; } -- cgit v1.2.3 From 448746ebbc7c8c0258fe88185f32b94c7fcc728d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:44:20 +0100 Subject: l: force timesyncd off --- lass/2configs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index 0e00dc2fd..c68aee330 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -1,5 +1,5 @@ -{ config, pkgs, ... }: with import ; +{ config, pkgs, ... }: { imports = [ ../2configs/binary-cache/client.nix @@ -78,7 +78,7 @@ with import ; users.mutableUsers = false; - services.timesyncd.enable = true; + services.timesyncd.enable = mkForce true; #why is this on in the first place? services.nscd.enable = false; -- cgit v1.2.3 From ae028952a605666e2e7f1c7c063381c775a42df3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:45:43 +0100 Subject: l: enable ssh-agent --- lass/2configs/baseX.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 6f5533b0d..59ea0ecb7 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -53,7 +53,7 @@ in { time.timeZone = "Europe/Berlin"; - programs.ssh.startAgent = false; + programs.ssh.startAgent = true; services.openssh.forwardX11 = true; services.printing = { -- cgit v1.2.3 From e66f702fc62331a1c06169179929bf2510d41604 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:47:21 +0100 Subject: l mails: add more aliases --- lass/2configs/exim-smarthost.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix index 2d848773f..94191fcb7 100644 --- a/lass/2configs/exim-smarthost.nix +++ b/lass/2configs/exim-smarthost.nix @@ -49,6 +49,11 @@ with import ; { from = "aliexpress@lassul.us"; to = lass.mail; } { from = "business@lassul.us"; to = lass.mail; } { from = "payeer@lassul.us"; to = lass.mail; } + { from = "github@lassul.us"; to = lass.mail; } + { from = "bitwala@lassul.us"; to = lass.mail; } + { from = "bitstamp@lassul.us"; to = lass.mail; } + { from = "bitcoin.de@lassul.us"; to = lass.mail; } + { from = "ableton@lassul.us"; to = lass.mail; } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; } -- cgit v1.2.3 From efb159a059e9bf1652ccfc86a81f5bbe5785814a Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:49:09 +0100 Subject: l vim: save x-ed text in clipboard again --- lass/2configs/vim.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix index f6c736fbc..5fe9e1450 100644 --- a/lass/2configs/vim.nix +++ b/lass/2configs/vim.nix @@ -103,7 +103,6 @@ let cnoreabbrev Ack Ack! " copy/paste from/to xclipboard - noremap x "_x set clipboard=unnamedplus ''; -- cgit v1.2.3 From 8bee3a7b1a463665bc69f25d3d119ef2b5c587d3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:49:38 +0100 Subject: l reaktor-coders: add sed-plugin --- lass/2configs/reaktor-coders.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/reaktor-coders.nix b/lass/2configs/reaktor-coders.nix index 61cc7cfe0..f9cf0d96a 100644 --- a/lass/2configs/reaktor-coders.nix +++ b/lass/2configs/reaktor-coders.nix @@ -21,6 +21,7 @@ with import ; -XFlexibleInstances -XMultiParamTypeClasses \ -XOverloadedStrings -XFunctionalDependencies \''; in [ + sed-plugin url-title (buildSimpleReaktorPlugin "lambdabot-pl" { pattern = "^@pl (?P.*)$$"; -- cgit v1.2.3 From d5a69ce257d44c804d1edb679e5667eae6a71853 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 31 Dec 2017 02:52:18 +0100 Subject: l: merge bitlbee and weechat into IM.nix --- lass/2configs/IM.nix | 57 +++++++++++++++++++++++++++++++++++++++++++++++ lass/2configs/bitlbee.nix | 14 ------------ lass/2configs/weechat.nix | 57 ----------------------------------------------- 3 files changed, 57 insertions(+), 71 deletions(-) create mode 100644 lass/2configs/IM.nix delete mode 100644 lass/2configs/bitlbee.nix delete mode 100644 lass/2configs/weechat.nix (limited to 'lass/2configs') diff --git a/lass/2configs/IM.nix b/lass/2configs/IM.nix new file mode 100644 index 000000000..b94cb0634 --- /dev/null +++ b/lass/2configs/IM.nix @@ -0,0 +1,57 @@ +with (import ); +{ config, lib, pkgs, ... }: + +let + tmux = pkgs.writeDash "tmux" '' + exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' + set-option -g prefix ` + unbind-key C-b + bind ` send-prefix + + set-option -g status off + set-option -g default-terminal screen-256color + + #use session instead of windows + bind-key c new-session + bind-key p switch-client -p + bind-key n switch-client -n + bind-key C-s switch-client -l + ''} "$@" + ''; +in { + + users.extraUsers.chat = { + home = "/home/chat"; + uid = genid "chat"; + useDefaultShell = true; + createHome = true; + openssh.authorizedKeys.keys = with config.krebs.users; [ + lass.pubkey + lass-shodan.pubkey + lass-icarus.pubkey + lass-android.pubkey + ]; + }; + + # mosh + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-p udp --dport 60000:61000"; target = "ACCEPT";} + { predicate = "-p tcp --dport 9999"; target = "ACCEPT";} + ]; + + systemd.services.chat = { + description = "chat environment setup"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + restartIfChanged = false; + + serviceConfig = { + User = "chat"; + RemainAfterExit = true; + Type = "oneshot"; + ExecStart = "${tmux} -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat"; + ExecStop = "${tmux} kill-session -t IM"; + }; + }; +} diff --git a/lass/2configs/bitlbee.nix b/lass/2configs/bitlbee.nix deleted file mode 100644 index e7be0a61c..000000000 --- a/lass/2configs/bitlbee.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, pkgs, ... }: - -{ - services.bitlbee = { - enable = true; - portNumber = 6666; - plugins = [ - pkgs.bitlbee-facebook - pkgs.bitlbee-steam - pkgs.bitlbee-discord - ]; - libpurple_plugins = [ pkgs.telegram-purple ]; - }; -} diff --git a/lass/2configs/weechat.nix b/lass/2configs/weechat.nix deleted file mode 100644 index b94cb0634..000000000 --- a/lass/2configs/weechat.nix +++ /dev/null @@ -1,57 +0,0 @@ -with (import ); -{ config, lib, pkgs, ... }: - -let - tmux = pkgs.writeDash "tmux" '' - exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" '' - set-option -g prefix ` - unbind-key C-b - bind ` send-prefix - - set-option -g status off - set-option -g default-terminal screen-256color - - #use session instead of windows - bind-key c new-session - bind-key p switch-client -p - bind-key n switch-client -n - bind-key C-s switch-client -l - ''} "$@" - ''; -in { - - users.extraUsers.chat = { - home = "/home/chat"; - uid = genid "chat"; - useDefaultShell = true; - createHome = true; - openssh.authorizedKeys.keys = with config.krebs.users; [ - lass.pubkey - lass-shodan.pubkey - lass-icarus.pubkey - lass-android.pubkey - ]; - }; - - # mosh - krebs.iptables.tables.filter.INPUT.rules = [ - { predicate = "-p udp --dport 60000:61000"; target = "ACCEPT";} - { predicate = "-p tcp --dport 9999"; target = "ACCEPT";} - ]; - - systemd.services.chat = { - description = "chat environment setup"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - restartIfChanged = false; - - serviceConfig = { - User = "chat"; - RemainAfterExit = true; - Type = "oneshot"; - ExecStart = "${tmux} -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat"; - ExecStop = "${tmux} kill-session -t IM"; - }; - }; -} -- cgit v1.2.3 From 115b4c0afebe1f7a7a53c4d82842a7072a3bf2dd Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 2 Jan 2018 13:12:16 +0100 Subject: l reaktor-coders: use new writePython2 --- lass/2configs/reaktor-coders.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/reaktor-coders.nix b/lass/2configs/reaktor-coders.nix index f9cf0d96a..2541df3a6 100644 --- a/lass/2configs/reaktor-coders.nix +++ b/lass/2configs/reaktor-coders.nix @@ -65,8 +65,7 @@ with import ; }) (buildSimpleReaktorPlugin "random-unicorn-porn" { pattern = "^!rup$$"; - script = pkgs.writePython2 "rup" '' - #!${pkgs.python2}/bin/python + script = pkgs.writePython2 [] "rup" '' t1 = """ _. ;=',_ () -- cgit v1.2.3 From 788cc63754e7dc4f559087ae37b74017e6b77d39 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 3 Jan 2018 18:23:22 +0100 Subject: l: add ableton stuff --- lass/2configs/ableton.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lass/2configs/ableton.nix (limited to 'lass/2configs') diff --git a/lass/2configs/ableton.nix b/lass/2configs/ableton.nix new file mode 100644 index 000000000..9d6f481b0 --- /dev/null +++ b/lass/2configs/ableton.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: let + mainUser = config.users.extraUsers.mainUser; +in { + users.users= { + ableton = { + isNormalUser = true; + extraGroups = [ + "audio" + "video" + ]; + packages = [ + pkgs.wine + pkgs.winetricks + ]; + }; + }; + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(ableton) NOPASSWD: ALL + ''; +} -- cgit v1.2.3