From b091ebbab79d6780839ced56e3eef28241e6ea4c Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 24 Oct 2017 22:30:23 +0200 Subject: tv umts: import from lass --- tv/3modules/default.nix | 1 + tv/3modules/umts.nix | 112 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 tv/3modules/umts.nix diff --git a/tv/3modules/default.nix b/tv/3modules/default.nix index 493cc8b72..0fcf8cc9d 100644 --- a/tv/3modules/default.nix +++ b/tv/3modules/default.nix @@ -5,6 +5,7 @@ ./hosts.nix ./iptables.nix ./nixpkgs-overlays.nix + ./umts.nix ./x0vncserver.nix ]; } diff --git a/tv/3modules/umts.nix b/tv/3modules/umts.nix new file mode 100644 index 000000000..ebf4f780f --- /dev/null +++ b/tv/3modules/umts.nix @@ -0,0 +1,112 @@ +{ config, lib, pkgs, ... }: + +with import ; + +let + cfg = config.tv.umts; + + out = { + options.tv.umts = api; + config = lib.mkIf cfg.enable imp; + }; + + api = { + enable = mkEnableOption "umts"; + modem = mkOption { + type = types.str; + default = "/dev/ttyUSB0"; + }; + initstrings = mkOption { + type = types.str; + default = '' + Init1 = ATZ + Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 + ''; + }; + username = mkOption { + type = types.str; + default = "default"; + }; + password = mkOption { + type = types.str; + default = "default"; + }; + pppDefaults = mkOption { + type = types.str; + default = '' + noipdefault + usepeerdns + defaultroute + persist + noauth + ''; + }; + }; + + nixpkgs-1509 = import (pkgs.fetchFromGitHub { + owner = "NixOS"; repo = "nixpkgs-channels"; + rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; + sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; + }) {}; + + wvdial = nixpkgs-1509.wvdial; # https://github.com/NixOS/nixpkgs/issues/16113 + + umts-bin = pkgs.writeScriptBin "umts" '' + #!/bin/sh + set -euf + systemctl start umts + trap "systemctl stop umts;trap - INT TERM EXIT;exit" INT TERM EXIT + echo nameserver 8.8.8.8 | tee -a /etc/resolv.conf + journalctl -xfu umts + ''; + + wvdial-defaults = '' + [Dialer Defaults] + Modem = ${cfg.modem} + ${cfg.initstrings} + Modem Type = Analog Modem + Baud = 460800 + phone= *99# + Username = ${cfg.username} + Password = ${cfg.password} + Stupid Mode = 1 + Idle Seconds = 0 + PPPD Path = ${pkgs.ppp}/bin/pppd + ''; + + imp = { + environment.shellAliases = { + umts = "sudo ${umts-bin}/bin/umts"; + }; + + environment.systemPackages = [ + pkgs.ppp + ]; + + security.sudo.extraConfig = '' + tv ALL= (root) NOPASSWD: ${umts-bin}/bin/umts + ''; + + environment.etc = [ + { + source = pkgs.writeText "wvdial.conf" wvdial-defaults; + target = "wvdial.conf"; + } + { + source = pkgs.writeText "wvdial" cfg.pppDefaults; + target = "ppp/peers/wvdial"; + } + ]; + + systemd.services.umts = { + description = "UMTS wvdial Service"; + serviceConfig = { + Type = "simple"; + Restart = "always"; + RestartSec = "10s"; + ExecStart = "${wvdial}/bin/wvdial -n"; + }; + }; + }; + +in out -- cgit v1.2.3 From 8c23c4d17ff89dbba18ce5ab2b6c8124a87c2c11 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 24 Oct 2017 22:48:57 +0200 Subject: tv umts: cleanup --- tv/3modules/umts.nix | 105 ++++++++++++++++++++++----------------------------- 1 file changed, 46 insertions(+), 59 deletions(-) diff --git a/tv/3modules/umts.nix b/tv/3modules/umts.nix index ebf4f780f..a60627025 100644 --- a/tv/3modules/umts.nix +++ b/tv/3modules/umts.nix @@ -1,17 +1,32 @@ -{ config, lib, pkgs, ... }: - with import ; +{ config, lib, pkgs, ... }: let -let cfg = config.tv.umts; - out = { - options.tv.umts = api; - config = lib.mkIf cfg.enable imp; - }; + umts-dial = pkgs.writeDash "umts-dial" '' + set -euf + ${pkgs.systemd}/bin/systemctl start umts + trap 'cleanup; trap - EXIT INT TERM' EXIT INT TERM + cleanup() { + ${pkgs.systemd}/bin/systemctl stop umts + } + echo nameserver 8.8.8.8 >> /etc/resolv.conf + ${pkgs.systemd}/bin/journalctl -xfu umts + ''; - api = { - enable = mkEnableOption "umts"; + # https://github.com/NixOS/nixpkgs/issues/16113 + wvdial = let + nixpkgs-1509 = import (pkgs.fetchFromGitHub { + owner = "NixOS"; repo = "nixpkgs-channels"; + rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; + sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; + }) {}; + in + nixpkgs-1509.wvdial; + +in { + options.tv.umts = { + enable = mkEnableOption "tv.umts"; modem = mkOption { type = types.str; default = "/dev/ttyUSB0"; @@ -43,61 +58,34 @@ let }; }; - nixpkgs-1509 = import (pkgs.fetchFromGitHub { - owner = "NixOS"; repo = "nixpkgs-channels"; - rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; - sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; - }) {}; - - wvdial = nixpkgs-1509.wvdial; # https://github.com/NixOS/nixpkgs/issues/16113 - - umts-bin = pkgs.writeScriptBin "umts" '' - #!/bin/sh - set -euf - systemctl start umts - trap "systemctl stop umts;trap - INT TERM EXIT;exit" INT TERM EXIT - echo nameserver 8.8.8.8 | tee -a /etc/resolv.conf - journalctl -xfu umts - ''; - - wvdial-defaults = '' - [Dialer Defaults] - Modem = ${cfg.modem} - ${cfg.initstrings} - Modem Type = Analog Modem - Baud = 460800 - phone= *99# - Username = ${cfg.username} - Password = ${cfg.password} - Stupid Mode = 1 - Idle Seconds = 0 - PPPD Path = ${pkgs.ppp}/bin/pppd - ''; - - imp = { - environment.shellAliases = { - umts = "sudo ${umts-bin}/bin/umts"; + config = lib.mkIf cfg.enable { + environment.etc = { + "ppp/peers/wvdial".text = cfg.pppDefaults; + "wvdial.conf".text = '' + [Dialer Defaults] + Modem = ${cfg.modem} + ${cfg.initstrings} + Modem Type = Analog Modem + Baud = 460800 + phone= *99# + Username = ${cfg.username} + Password = ${cfg.password} + Stupid Mode = 1 + Idle Seconds = 0 + PPPD Path = ${pkgs.ppp}/bin/pppd + ''; }; - environment.systemPackages = [ - pkgs.ppp + krebs.per-user.tv.packages = [ + (pkgs.writeDashBin "umts" '' + exec sudo ${umts-dial} + '') ]; security.sudo.extraConfig = '' - tv ALL= (root) NOPASSWD: ${umts-bin}/bin/umts + tv ALL= (root) NOPASSWD: ${umts-dial} ''; - environment.etc = [ - { - source = pkgs.writeText "wvdial.conf" wvdial-defaults; - target = "wvdial.conf"; - } - { - source = pkgs.writeText "wvdial" cfg.pppDefaults; - target = "ppp/peers/wvdial"; - } - ]; - systemd.services.umts = { description = "UMTS wvdial Service"; serviceConfig = { @@ -108,5 +96,4 @@ let }; }; }; - -in out +} -- cgit v1.2.3 From 48e34b59ad446256f429528e4e8946299ed3c1a0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 24 Oct 2017 22:49:19 +0200 Subject: tv xu: enable umts --- tv/1systems/xu/config.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 0363c983d..08bdfa52b 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -161,5 +161,14 @@ with import ; tv = "/home/tv/stockholm/tv/5pkgs"; }; + tv.umts = { + enable = true; + modem = "/dev/serial/by-id/usb-Lenovo_F5521gw_097EAD658B094860-if09"; + initstrings = '' + Init1 = AT+CFUN=1 + Init2 = AT+CGDCONT=1,"IP","pinternet.interkom.de","",0,0 + ''; + }; + virtualisation.virtualbox.host.enable = true; } -- cgit v1.2.3 From 1993cbc42114c759a47fed8de1e73980d3df57d9 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 08:09:05 +0200 Subject: brscan4: init at 0.4.4-4 --- krebs/5pkgs/default.nix | 9 +++++++++ tv/5pkgs/default.nix | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index af4cbb3ba..84c00e82d 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -13,6 +13,15 @@ foldl' mergeAttrs {} // { + # https://github.com/NixOS/nixpkgs/pull/30065 + brscan4 = overrideDerivation super.brscan4 (original: rec { + name = "brscan4-0.4.4-4"; + src = super.fetchurl { + url = "http://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; + sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd"; + }; + }); + ReaktorPlugins = self.callPackage ./simple/Reaktor/plugins.nix {}; # https://github.com/proot-me/PRoot/issues/106 diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 9dc7ae7b1..261871e62 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -13,14 +13,6 @@ foldl' mergeAttrs {} // { - brscan4 = overrideDerivation super.brscan4 (original: rec { - name = "brscan4-0.4.4-4"; - src = super.fetchurl { - url = "http://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; - sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd"; - }; - }); - # TODO use XDG_RUNTIME_DIR? cr = self.writeDashBin "cr" '' set -efu -- cgit v1.2.3 From 27c919fbf35fbfab90bb9b1f79171c853f716442 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 26 Oct 2017 19:13:02 +0200 Subject: l screenlock: fix enableOption --- lass/3modules/screenlock.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/3modules/screenlock.nix b/lass/3modules/screenlock.nix index cf38f8357..06ca1f27d 100644 --- a/lass/3modules/screenlock.nix +++ b/lass/3modules/screenlock.nix @@ -11,7 +11,7 @@ let }; api = { - enable = mkEnableOption "news"; + enable = mkEnableOption "screenlock"; command = mkOption { type = types.str; default = "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper -f"; -- cgit v1.2.3 From e2512c4634b83a172d6f927b21ce0791b39a0ba9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 26 Oct 2017 19:13:30 +0200 Subject: l: add tomtop@lassul.us --- lass/2configs/exim-smarthost.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix index 0b56f6f47..f9c8f8ebc 100644 --- a/lass/2configs/exim-smarthost.nix +++ b/lass/2configs/exim-smarthost.nix @@ -45,6 +45,7 @@ with import ; { from = "raf@lassul.us"; to = lass.mail; } { from = "apple@lassul.us"; to = lass.mail; } { from = "coinbase@lassul.us"; to = lass.mail; } + { from = "tomtop@lassul.us"; to = lass.mail; } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; } -- cgit v1.2.3 From bdbddc4c281c2d108568901319ac0cdc2866578f Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 26 Oct 2017 19:16:24 +0200 Subject: l domsen: add habsys mails --- lass/2configs/websites/domsen.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 10ff142f9..6fbd4d0df 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -126,6 +126,8 @@ in { { from = "dominik@apanowicz.de"; to = "dominik_a@gmx.de"; } { from = "dma@ubikmedia.de"; to = "domsen"; } { from = "dma@ubikmedia.eu"; to = "domsen"; } + { from = "mail@habsys.de"; to = "domsen"; } + { from = "mail@habsys.eu"; to = "domsen"; } { from = "bruno@apanowicz.de"; to = "bruno"; } { from = "mail@jla-trading.com"; to = "jla-trading"; } { from = "jms@ubikmedia.eu"; to = "jms"; } -- cgit v1.2.3 From 45f205e1c5b7d5d1d45eab1fb293c86f7c93bd49 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 26 Oct 2017 19:18:53 +0200 Subject: l: allow dns requests from retiolum --- lass/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index 10d14e151..180647a6d 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -210,6 +210,7 @@ with import ; { predicate = "-p tcp -i retiolum"; target = "REJECT --reject-with tcp-reset"; precedence = -10000; } { predicate = "-p udp -i retiolum"; target = "REJECT --reject-with icmp-port-unreachable"; v6 = false; precedence = -10000; } { predicate = "-i retiolum"; target = "REJECT --reject-with icmp-proto-unreachable"; v6 = false; precedence = -10000; } + { predicate = "-i retiolum -p udp -m udp --dport 53"; target = "ACCEPT"; } ]; }; }; -- cgit v1.2.3 From 8083880f49973eff49673da30b442f75b729594c Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 26 Oct 2017 20:01:37 +0200 Subject: l: steal br from tv --- lass/1systems/mors/config.nix | 1 + lass/2configs/br.nix | 48 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 lass/2configs/br.nix diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 610bfef8e..6a61ce1fa 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -29,6 +29,7 @@ with import ; + { #risk of rain port krebs.iptables.tables.filter.INPUT.rules = [ diff --git a/lass/2configs/br.nix b/lass/2configs/br.nix new file mode 100644 index 000000000..35bac8fee --- /dev/null +++ b/lass/2configs/br.nix @@ -0,0 +1,48 @@ +with import ; +{ config, pkgs, ... }: { + + imports = [ + + ]; + + krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ + "brother-udev-rule-type1-" + "brscan4-" + "mfcl2700dnlpr-" + ]; + + hardware.sane = { + enable = true; + brscan4 = { + enable = true; + netDevices = { + bra = { + model = "MFCL2700DN"; + ip = "10.23.42.221"; + }; + }; + }; + }; + + services.saned.enable = true; + + # usage: scanimage -d "$(find-scanner bra)" --batch --format=tiff --resolution 150 -x 211 -y 298 + environment.systemPackages = [ + (pkgs.writeDashBin "find-scanner" '' + set -efu + name=$1 + ${pkgs.sane-backends}/bin/scanimage -f '%m %d + ' \ + | ${pkgs.gawk}/bin/awk -v dev="*$name" '$1 == dev { print $2; exit }' \ + | ${pkgs.gnugrep}/bin/grep . + '') + ]; + + services.printing = { + enable = true; + drivers = [ + pkgs.mfcl2700dncupswrapper + ]; + }; + +} -- cgit v1.2.3 From 7e269eaba530afd455f1438b18f68b1304244500 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 20:41:07 +0200 Subject: tv umts: RIP --- tv/1systems/xu/config.nix | 9 ----- tv/3modules/umts.nix | 99 ----------------------------------------------- 2 files changed, 108 deletions(-) delete mode 100644 tv/3modules/umts.nix diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 08bdfa52b..0363c983d 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -161,14 +161,5 @@ with import ; tv = "/home/tv/stockholm/tv/5pkgs"; }; - tv.umts = { - enable = true; - modem = "/dev/serial/by-id/usb-Lenovo_F5521gw_097EAD658B094860-if09"; - initstrings = '' - Init1 = AT+CFUN=1 - Init2 = AT+CGDCONT=1,"IP","pinternet.interkom.de","",0,0 - ''; - }; - virtualisation.virtualbox.host.enable = true; } diff --git a/tv/3modules/umts.nix b/tv/3modules/umts.nix deleted file mode 100644 index a60627025..000000000 --- a/tv/3modules/umts.nix +++ /dev/null @@ -1,99 +0,0 @@ -with import ; -{ config, lib, pkgs, ... }: let - - cfg = config.tv.umts; - - umts-dial = pkgs.writeDash "umts-dial" '' - set -euf - ${pkgs.systemd}/bin/systemctl start umts - trap 'cleanup; trap - EXIT INT TERM' EXIT INT TERM - cleanup() { - ${pkgs.systemd}/bin/systemctl stop umts - } - echo nameserver 8.8.8.8 >> /etc/resolv.conf - ${pkgs.systemd}/bin/journalctl -xfu umts - ''; - - # https://github.com/NixOS/nixpkgs/issues/16113 - wvdial = let - nixpkgs-1509 = import (pkgs.fetchFromGitHub { - owner = "NixOS"; repo = "nixpkgs-channels"; - rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; - sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; - }) {}; - in - nixpkgs-1509.wvdial; - -in { - options.tv.umts = { - enable = mkEnableOption "tv.umts"; - modem = mkOption { - type = types.str; - default = "/dev/ttyUSB0"; - }; - initstrings = mkOption { - type = types.str; - default = '' - Init1 = ATZ - Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 - ''; - }; - username = mkOption { - type = types.str; - default = "default"; - }; - password = mkOption { - type = types.str; - default = "default"; - }; - pppDefaults = mkOption { - type = types.str; - default = '' - noipdefault - usepeerdns - defaultroute - persist - noauth - ''; - }; - }; - - config = lib.mkIf cfg.enable { - environment.etc = { - "ppp/peers/wvdial".text = cfg.pppDefaults; - "wvdial.conf".text = '' - [Dialer Defaults] - Modem = ${cfg.modem} - ${cfg.initstrings} - Modem Type = Analog Modem - Baud = 460800 - phone= *99# - Username = ${cfg.username} - Password = ${cfg.password} - Stupid Mode = 1 - Idle Seconds = 0 - PPPD Path = ${pkgs.ppp}/bin/pppd - ''; - }; - - krebs.per-user.tv.packages = [ - (pkgs.writeDashBin "umts" '' - exec sudo ${umts-dial} - '') - ]; - - security.sudo.extraConfig = '' - tv ALL= (root) NOPASSWD: ${umts-dial} - ''; - - systemd.services.umts = { - description = "UMTS wvdial Service"; - serviceConfig = { - Type = "simple"; - Restart = "always"; - RestartSec = "10s"; - ExecStart = "${wvdial}/bin/wvdial -n"; - }; - }; - }; -} -- cgit v1.2.3 From d5c6e52dd5793a7cb0fad3835a5d1ab014c5bcc1 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 20:41:47 +0200 Subject: tv netzclub: init --- tv/1systems/xu/config.nix | 1 + tv/2configs/netzclub.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 tv/2configs/netzclub.nix diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 0363c983d..3e008a1bb 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -11,6 +11,7 @@ with import ; + diff --git a/tv/2configs/netzclub.nix b/tv/2configs/netzclub.nix new file mode 100644 index 000000000..659e0d4e4 --- /dev/null +++ b/tv/2configs/netzclub.nix @@ -0,0 +1,45 @@ +{ pkgs, ... }: { + + # usage: ppp dial netzclub + + environment.etc."ppp/peers/netzclub".text = '' + /dev/ttyACM2 + 921600 + crtscts + defaultroute + holdoff 10 + lock + maxfail 0 + noauth + nodetach + noipdefault + passive + persist + usepeerdns + connect "${pkgs.ppp}/bin/chat -f ${pkgs.writeText "netzclub.script" '' + ABORT 'BUSY' + ABORT 'NO CARRIER' + ABORT 'VOICE' + ABORT 'NO DIALTONE' + ABORT 'NO DIAL TONE' + ABORT 'NO ANSWER' + ABORT 'DELAYED' + REPORT CONNECT + TIMEOUT 6 + ''' 'ATQ0' + 'OK-AT-OK' 'ATZ' + TIMEOUT 3 + 'OK\d-AT-OK' 'ATI' + 'OK' 'ATZ' + 'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' + 'OK' 'ATDT*99***1#' + TIMEOUT 30 + CONNECT ''' + ''} + ''; + + environment.systemPackages = [ + ppp + ]; + +} -- cgit v1.2.3 From a00d516b5897bae3583aeae16103d7b6657f7cc4 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 20:45:30 +0200 Subject: tv xu: lol wvdial --- tv/1systems/xu/config.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 3e008a1bb..6c99f6bd2 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -100,7 +100,6 @@ with import ; #tlsdate #unetbootin #utillinuxCurses - #wvdial #xdotool #xkill #xl2tpd -- cgit v1.2.3 From 01409f4dbfb353855f95c38210d2cb5b3fc90ba8 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 20:58:32 +0200 Subject: tv modules: rm umts --- tv/3modules/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/tv/3modules/default.nix b/tv/3modules/default.nix index 0fcf8cc9d..493cc8b72 100644 --- a/tv/3modules/default.nix +++ b/tv/3modules/default.nix @@ -5,7 +5,6 @@ ./hosts.nix ./iptables.nix ./nixpkgs-overlays.nix - ./umts.nix ./x0vncserver.nix ]; } -- cgit v1.2.3 From 42f3a5661b4e53b76eb7315df1782b9942f47865 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 21:10:36 +0200 Subject: tv netzclub: { -> pkgs.}ppp --- tv/2configs/netzclub.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/2configs/netzclub.nix b/tv/2configs/netzclub.nix index 659e0d4e4..dc2de7147 100644 --- a/tv/2configs/netzclub.nix +++ b/tv/2configs/netzclub.nix @@ -39,7 +39,7 @@ ''; environment.systemPackages = [ - ppp + pkgs.ppp ]; } -- cgit v1.2.3 From d19f415bb00368970f8e0a1548b89a472a24d634 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 21:29:35 +0200 Subject: tv netzclub: fix example --- tv/2configs/netzclub.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/2configs/netzclub.nix b/tv/2configs/netzclub.nix index dc2de7147..6e06005e3 100644 --- a/tv/2configs/netzclub.nix +++ b/tv/2configs/netzclub.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - # usage: ppp dial netzclub + # usage: pppd call netzclub environment.etc."ppp/peers/netzclub".text = '' /dev/ttyACM2 -- cgit v1.2.3 From f645e07f719e4529373674b8e47e18cb454f125f Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Oct 2017 22:57:51 +0200 Subject: tv netzclub: add missing " --- tv/2configs/netzclub.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/2configs/netzclub.nix b/tv/2configs/netzclub.nix index 6e06005e3..c49498ed4 100644 --- a/tv/2configs/netzclub.nix +++ b/tv/2configs/netzclub.nix @@ -35,7 +35,7 @@ 'OK' 'ATDT*99***1#' TIMEOUT 30 CONNECT ''' - ''} + ''}" ''; environment.systemPackages = [ -- cgit v1.2.3 From 6c8acbdf9ab464f09d2c08751528d31a81612351 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 27 Oct 2017 00:09:03 +0200 Subject: tv netzclub: simplify AT code --- tv/2configs/netzclub.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tv/2configs/netzclub.nix b/tv/2configs/netzclub.nix index c49498ed4..7286bc84d 100644 --- a/tv/2configs/netzclub.nix +++ b/tv/2configs/netzclub.nix @@ -25,16 +25,8 @@ ABORT 'NO ANSWER' ABORT 'DELAYED' REPORT CONNECT - TIMEOUT 6 - ''' 'ATQ0' - 'OK-AT-OK' 'ATZ' - TIMEOUT 3 - 'OK\d-AT-OK' 'ATI' - 'OK' 'ATZ' - 'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' - 'OK' 'ATDT*99***1#' - TIMEOUT 30 - CONNECT ''' + "" "ATDT*99#" + CONNECT "" ''}" ''; -- cgit v1.2.3 From 36c01359dcffd3c7424366b9c43eb0b8baae666a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 27 Oct 2017 01:35:04 +0200 Subject: tv: netzclub -> ppp --- tv/1systems/xu/config.nix | 2 +- tv/2configs/netzclub.nix | 37 ------------------------------------- tv/2configs/ppp.nix | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 38 deletions(-) delete mode 100644 tv/2configs/netzclub.nix create mode 100644 tv/2configs/ppp.nix diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 6c99f6bd2..14926fe3b 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -11,9 +11,9 @@ with import ; - + diff --git a/tv/2configs/netzclub.nix b/tv/2configs/netzclub.nix deleted file mode 100644 index 7286bc84d..000000000 --- a/tv/2configs/netzclub.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ pkgs, ... }: { - - # usage: pppd call netzclub - - environment.etc."ppp/peers/netzclub".text = '' - /dev/ttyACM2 - 921600 - crtscts - defaultroute - holdoff 10 - lock - maxfail 0 - noauth - nodetach - noipdefault - passive - persist - usepeerdns - connect "${pkgs.ppp}/bin/chat -f ${pkgs.writeText "netzclub.script" '' - ABORT 'BUSY' - ABORT 'NO CARRIER' - ABORT 'VOICE' - ABORT 'NO DIALTONE' - ABORT 'NO DIAL TONE' - ABORT 'NO ANSWER' - ABORT 'DELAYED' - REPORT CONNECT - "" "ATDT*99#" - CONNECT "" - ''}" - ''; - - environment.systemPackages = [ - pkgs.ppp - ]; - -} diff --git a/tv/2configs/ppp.nix b/tv/2configs/ppp.nix new file mode 100644 index 000000000..9cc7568a5 --- /dev/null +++ b/tv/2configs/ppp.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: { + + # usage: pppd call default + + environment.etc."ppp/peers/default".text = '' + /dev/ttyACM2 + 921600 + crtscts + defaultroute + holdoff 10 + lock + maxfail 0 + noauth + nodetach + noipdefault + passive + persist + usepeerdns + connect "${pkgs.ppp}/bin/chat -f ${pkgs.writeText "default.chat" '' + ABORT "BUSY" + ABORT "NO CARRIER" + REPORT CONNECT + "" "ATDT*99#" + CONNECT + ''}" + ''; + + environment.systemPackages = [ + pkgs.ppp + ]; + +} -- cgit v1.2.3 From b6be4c6f40a699e7fd6032e5d33395aaa9c8c497 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 27 Oct 2017 17:13:38 +0200 Subject: l nixpkgs: c99239b -> ac2bb56 --- lass/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/source.nix b/lass/source.nix index 910d70334..36210423b 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -10,7 +10,7 @@ in nixos-config.symlink = "stockholm/lass/1systems/${name}/config.nix"; nixpkgs.git = { url = https://github.com/nixos/nixpkgs; - ref = "c99239b"; + ref = "ac2bb56"; }; secrets.file = getAttr builder { buildbot = toString ; -- cgit v1.2.3 From 6934b5d83f245b723cf7d685d7ab0a758947bdc8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 1 Nov 2017 18:34:06 +0100 Subject: l nixpkgs: ac2bb56 -> 6a0a00d --- lass/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/source.nix b/lass/source.nix index 36210423b..4849cadcc 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -10,7 +10,7 @@ in nixos-config.symlink = "stockholm/lass/1systems/${name}/config.nix"; nixpkgs.git = { url = https://github.com/nixos/nixpkgs; - ref = "ac2bb56"; + ref = "6a0a00d"; }; secrets.file = getAttr builder { buildbot = toString ; -- cgit v1.2.3 From 59753e735d76eeb26d7ba7f5c6584da43d72b6ff Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 2 Nov 2017 23:26:19 +0100 Subject: l helios.r: add office related stuff --- lass/1systems/helios/config.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index 70aa3832d..c64789d8d 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -105,6 +105,8 @@ with import ; { output = "DP-2"; primary = true; } ]; + networking.hostName = lib.mkForce "BLN02NB0162"; + security.pki.certificateFiles = [ (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC1G1.pem"; sha256 = "14vz9c0fk6li0a26vx0s5ha6y3yivnshx9pjlh9vmnpkbph5a7rh"; }) (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC2G1.pem"; sha256 = "0r1dd48a850cv7whk4g2maik550rd0vsrsl73r6x0ivzz7ap1xz5"; }) @@ -117,4 +119,12 @@ with import ; ]; lass.screenlock.command = "${pkgs.i3lock}/bin/i3lock -i /home/lass/lock.png -t -f"; + + programs.adb.enable = true; + users.users.mainUser.extraGroups = [ "adbusers" ]; + + services.printing = { + enable = true; + drivers = [ pkgs.postscript-lexmark ]; + }; } -- cgit v1.2.3 From 111c94fe61e5c47f3af04e38b6d804ee43ca8e98 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 7 Nov 2017 11:48:37 +0100 Subject: l nixpkgs: 6a0a00d -> e53e9a2 --- lass/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/source.nix b/lass/source.nix index 4849cadcc..738504228 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -10,7 +10,7 @@ in nixos-config.symlink = "stockholm/lass/1systems/${name}/config.nix"; nixpkgs.git = { url = https://github.com/nixos/nixpkgs; - ref = "6a0a00d"; + ref = "e53e9a2"; }; secrets.file = getAttr builder { buildbot = toString ; -- cgit v1.2.3