From d33d1f51986610da0a38421c754a4a42f344e7ef Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 25 Mar 2017 21:33:30 +0100 Subject: l 2 monitoring: disable ELK --- lass/2configs/monitoring/client.nix | 9 --------- lass/2configs/monitoring/server.nix | 12 ------------ 2 files changed, 21 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/monitoring/client.nix b/lass/2configs/monitoring/client.nix index e2b7dcae6..b8c245215 100644 --- a/lass/2configs/monitoring/client.nix +++ b/lass/2configs/monitoring/client.nix @@ -23,13 +23,4 @@ with import ; }; }; }; - - services.journalbeat = { - enable = true; - extraConfig = '' - output.elasticsearch: - hosts: ["prism:9200"] - template.enabled: false - ''; - }; } diff --git a/lass/2configs/monitoring/server.nix b/lass/2configs/monitoring/server.nix index b6ccf9cc1..d1ff234ee 100644 --- a/lass/2configs/monitoring/server.nix +++ b/lass/2configs/monitoring/server.nix @@ -79,21 +79,9 @@ with import ; security = import ; # { AdminUser = ""; adminPassword = ""} }; - services.elasticsearch = { - enable = true; - listenAddress = "0.0.0.0"; - }; - - services.kibana = { - enable = true; - listenAddress = "0.0.0.0"; - }; - krebs.iptables.tables.filter.INPUT.rules = [ { predicate = "-p tcp -i retiolum --dport 8086"; target = "ACCEPT"; } { predicate = "-p tcp -i retiolum --dport 3000"; target = "ACCEPT"; } { predicate = "-p udp -i retiolum --dport 25826"; target = "ACCEPT"; } - { predicate = "-p tcp -i retiolum --dport 9200"; target = "ACCEPT"; } - { predicate = "-p tcp -i retiolum --dport 5601"; target = "ACCEPT"; } ]; } -- cgit v1.2.3 From 6e10766e9cf1eb070cee139e2cdec61bed186058 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 25 Mar 2017 22:49:26 +0100 Subject: l 2 mpv: make scripts compatible with 0.24 --- lass/2configs/mpv.nix | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/mpv.nix b/lass/2configs/mpv.nix index 9988e788f..d9c6274db 100644 --- a/lass/2configs/mpv.nix +++ b/lass/2configs/mpv.nix @@ -2,15 +2,17 @@ let - mpv-config = pkgs.writeText "mpv-config" '' - script=${lib.concatStringsSep "," [ - good - delete - ]} - ''; - mpv = pkgs.writeDashBin "mpv" '' - exec ${pkgs.mpv}/bin/mpv --no-config --include=${mpv-config} "$@" - ''; + scripts = lib.concatStringsSep "," [ + good + delete + ]; + + mpv = pkgs.concat "mpv" [ + pkgs.mpv + (pkgs.writeDashBin "mpv" '' + exec ${pkgs.mpv}/bin/mpv --no-config --script=${scripts} "$@" + '') + ]; moveToDir = key: dir: pkgs.writeText "move-with-${key}.lua" '' tmp_dir = "${dir}" @@ -31,20 +33,6 @@ let up = moveToDir "U" "./up"; down = moveToDir "Y" "./down"; - deleteCurrentTrack = pkgs.writeText "delete.lua" '' - deleted_tmp = "./.graveyard" - - -- Delete the current track by moving it to the `deleted_tmp` location. - function delete_current_track() - track = mp.get_property("path") - os.execute("mkdir -p '" .. deleted_tmp .. "'") - os.execute("mv '" .. track .. "' '" .. deleted_tmp .. "'") - print("'" .. track .. "' deleted.") - end - - mp.add_key_binding("D", "delete_current_track", delete_current_track) - ''; - in { krebs.per-user.lass.packages = [ mpv -- cgit v1.2.3 From 2ed6a854ed0b69b743bacf50950d0e01cef1f80b Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 25 Mar 2017 22:49:50 +0100 Subject: l 2 websites domsen: add phpfpm restarter --- lass/2configs/websites/domsen.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index fde3f7c2b..684742512 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -21,6 +21,22 @@ let exec ${pkgs.msmtp}/bin/msmtp --read-envelope-from -C ${msmtprc} "$@" ''; + restartPhpfpm_o.ubikmedia = pkgs.writeDash "restartPhpfpm_o.ubikmedia.org" '' + ${pkgs.systemd}/bin/systemctl restart phpfpm-o.ubikmedia.de.service + ''; + + restartPhpfpm_o.ubikmedia_wrapper = pkgs.writeDashBin "restartPhpfpm_o.ubikmedia" '' + /run/wrappers/bin/sudo ${restartPhpfpm_o.ubikmedia} + ''; + + restartPhpfpm_ubikmedia = pkgs.writeDash "restartPhpfpm_ubikmedia.org" '' + ${pkgs.systemd}/bin/systemctl restart phpfpm-ubikmedia.de.service + ''; + + restartPhpfpm_ubikmedia_wrapper = pkgs.writeDashBin "restartPhpfpm_ubikmedia" '' + /run/wrappers/bin/sudo ${restartPhpfpm_ubikmedia} + ''; + in { imports = [ ./sqlBackup.nix @@ -162,5 +178,17 @@ in { useDefaultShell = true; createHome = true; }; + + #sudo restart wrappers + security.sudo.extraConfig = '' + domsen ALL= (root) NOPASSWD: ${restartPhpfpm_o.ubikmedia} + domsen ALL= (root) NOPASSWD: ${restartPhpfpm_ubikmedia} + ''; + + krebs.per-user.domsen.packages = [ + restartPhpfpm_ubikmedia_wrapper + restartPhpfpm_o.ubikmedia_wrapper + ]; + } -- cgit v1.2.3 From e34d584feec9d123cc2fd8d3db417ede2b1bc437 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 25 Mar 2017 22:57:13 +0100 Subject: l 2 mail: use pkgs.concat --- lass/2configs/mail.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index a08dc88da..41c7bceb2 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -113,9 +113,12 @@ let macro index ~ ,@( 'Toggle sidebar' # toggle the sidebar ''; - mutt = pkgs.writeDashBin "mutt" '' - exec ${pkgs.neomutt}/bin/mutt -F ${muttrc} $@ - ''; + mutt = pkgs.concat "mutt" [ + pkgs.neomutt + (pkgs.writeDashBin "mutt" '' + exec ${pkgs.neomutt}/bin/mutt -F ${muttrc} $@ + '') + ]; in { environment.systemPackages = [ -- cgit v1.2.3 From 61c40b84946038c3939da968291510a9049483b9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 2 Apr 2017 11:34:41 +0200 Subject: l 2 hw tp-x220: set touchpad speed to very slow --- lass/2configs/hw/tp-x220.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/hw/tp-x220.nix b/lass/2configs/hw/tp-x220.nix index 1e75271ca..cbe5b3410 100644 --- a/lass/2configs/hw/tp-x220.nix +++ b/lass/2configs/hw/tp-x220.nix @@ -51,6 +51,10 @@ with import ; services.xserver.synaptics = { enable = true; - additionalOptions = ''Option "TouchpadOff" "1"''; + horizEdgeScroll = false; + horizontalScroll = false; + maxSpeed = "0.1"; + minSpeed = "0.01"; + tapButtons = false; }; } -- cgit v1.2.3 From 4642786cef32c94a2aad30c2297817d8a157834b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 19:41:39 +0200 Subject: l 2 nixpkgs: ade5837 -> a563923 --- lass/2configs/nixpkgs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/nixpkgs.nix b/lass/2configs/nixpkgs.nix index 7f6512552..24437d040 100644 --- a/lass/2configs/nixpkgs.nix +++ b/lass/2configs/nixpkgs.nix @@ -3,6 +3,6 @@ { krebs.build.source.nixpkgs.git = { url = https://cgit.lassul.us/nixpkgs; - ref = "ade5837"; + ref = "a563923"; }; } -- cgit v1.2.3 From 3c68b2f149d407bce57998482431dece73b9a43b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 20:00:25 +0200 Subject: Revert "l 2: use alternate dnscrypt resolver" This reverts commit 95233bbf0ae9314d39d2642006d0e8d70f0e4a21. --- lass/2configs/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index f4e4cd2cc..96f70d312 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -64,10 +64,7 @@ with import ; ]; } { - services.dnscrypt-proxy = { - enable = true; - resolverName = "d0wn-nl-ns3"; - }; + services.dnscrypt-proxy.enable = true; networking.extraResolvconfConf = '' name_servers='127.0.0.1' ''; -- cgit v1.2.3 From 8165cd4d6d35e85f5d61e807e1d180d210074e24 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 20:00:38 +0200 Subject: l 2 hw tp-x220: disable vertEdgeScroll --- lass/2configs/hw/tp-x220.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/hw/tp-x220.nix b/lass/2configs/hw/tp-x220.nix index cbe5b3410..9be0b6bd2 100644 --- a/lass/2configs/hw/tp-x220.nix +++ b/lass/2configs/hw/tp-x220.nix @@ -53,6 +53,7 @@ with import ; enable = true; horizEdgeScroll = false; horizontalScroll = false; + vertEdgeScroll = false; maxSpeed = "0.1"; minSpeed = "0.01"; tapButtons = false; -- cgit v1.2.3 From c898a59d533499f7c4404bd31eb3ad6cf554819b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 20:01:03 +0200 Subject: l 2 websites domsen: add testuser@ubikmedia.eu --- lass/2configs/websites/domsen.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 684742512..a5c51735a 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -132,6 +132,7 @@ in { { from = "ubik@ubikmedia.eu"; to = "domsen, jms, ms"; } { from = "testuser@lassul.us"; to = "testuser"; } + { from = "testuser@ubikmedia.eu"; to = "testuser"; } ]; sender_domains = [ "jla-trading.com" -- cgit v1.2.3 From 2260ebedf7fcc699ba9ca3288e355a8f8c65d930 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 21:39:57 +0200 Subject: l 2: add paste.nix --- lass/2configs/paste.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lass/2configs/paste.nix (limited to 'lass/2configs') diff --git a/lass/2configs/paste.nix b/lass/2configs/paste.nix new file mode 100644 index 000000000..5fe3083f7 --- /dev/null +++ b/lass/2configs/paste.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: +with import ; + +{ + services.nginx.virtualHosts.paste = { + serverAliases = [ "p.r" ]; + locations."/".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:9081; + ''; + }; + krebs.htgen.paste = { + port = 9081; + script = toString [ + "PATH=${makeBinPath [ + pkgs.nix + ]}:$PATH" + "STATEDIR=$HOME" + ". ${pkgs.htgen}/examples/paste" + ]; + }; + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-i retiolum -p tcp --dport 80"; target = "ACCEPT";} + { predicate = "-i retiolum -p tcp --dport 9081"; target = "ACCEPT";} + ]; +} -- cgit v1.2.3 From 3cff452374cba6eb9d7113b2ac7467ab01dc82db Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 21:41:20 +0200 Subject: l 2: add kpaste to pkgs --- lass/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index 96f70d312..b747ccb39 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -135,6 +135,7 @@ with import ; aria2 #neat utils + kpaste krebspaste mosh pciutils -- cgit v1.2.3 From 7bc85a08bce87af858a874b10d78e46e0cdff179 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 21:41:30 +0200 Subject: l 2 repo-sync: sync Reaktor --- lass/2configs/repo-sync.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix index 74e508549..775bd7665 100644 --- a/lass/2configs/repo-sync.nix +++ b/lass/2configs/repo-sync.nix @@ -105,6 +105,7 @@ in { (sync-remote "realwallpaper" "https://github.com/lassulus/realwallpaper") (sync-remote "lassulus-blog" "https://github.com/lassulus/lassulus-blog") (sync-remote "painload" "https://github.com/krebscode/painload") + (sync-remote "Reaktor" "https://github.com/krebscode/Reaktor") (sync-remote-silent "nixpkgs" "https://github.com/nixos/nixpkgs") (sync-retiolum "go") (sync-retiolum "much") -- cgit v1.2.3 From 575a37f00e0ee6866c72a99327921068222fc1b0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 21:50:01 +0200 Subject: l 2 paste: set client_max_body_size to 4G --- lass/2configs/paste.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/paste.nix b/lass/2configs/paste.nix index 5fe3083f7..293691c0f 100644 --- a/lass/2configs/paste.nix +++ b/lass/2configs/paste.nix @@ -5,6 +5,7 @@ with import ; services.nginx.virtualHosts.paste = { serverAliases = [ "p.r" ]; locations."/".extraConfig = '' + client_max_body_size 4G; proxy_set_header Host $host; proxy_pass http://localhost:9081; ''; -- cgit v1.2.3 From 9b44941911bccc46dafd82a2c427af3febbcbff8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 12 Apr 2017 11:00:36 +0200 Subject: lass: .retiolum -> .r --- lass/2configs/go.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/go.nix b/lass/2configs/go.nix index 8e31f050f..b75233871 100644 --- a/lass/2configs/go.nix +++ b/lass/2configs/go.nix @@ -17,7 +17,7 @@ with import ; ''; serverAliases = [ "go" - "go.retiolum" + "go.r" ]; }; }; -- cgit v1.2.3