From 9bc0c474ace8e1bcccb5301a1726ed75a6241bff Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 14 Dec 2015 17:12:51 +0100 Subject: m 2 Reaktor: add full profile --- makefu/2configs/Reaktor/full.nix | 18 ++++++++++++++++++ makefu/2configs/git/cgit-retiolum.nix | 20 -------------------- 2 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 makefu/2configs/Reaktor/full.nix (limited to 'makefu/2configs') diff --git a/makefu/2configs/Reaktor/full.nix b/makefu/2configs/Reaktor/full.nix new file mode 100644 index 000000000..50620890f --- /dev/null +++ b/makefu/2configs/Reaktor/full.nix @@ -0,0 +1,18 @@ +_: +{ + # implementation of the complete Reaktor bot + imports = [ + #./stockholmLentil.nix + ./simpleExtend.nix + ./random-emoji.nix + ./titlebot.nix + ./shack-correct.nix + ./sed-plugin.nix + ]; + krebs.Reaktor.nickname = "Reaktor|bot"; + krebs.Reaktor.enable = true; + + krebs.Reaktor.extraEnviron = { + REAKTOR_CHANNELS = "#krebs,#binaergewitter,#shackspace"; + }; +} diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix index 68fd976d6..35bb169cf 100644 --- a/makefu/2configs/git/cgit-retiolum.nix +++ b/makefu/2configs/git/cgit-retiolum.nix @@ -80,26 +80,6 @@ let }; in { - imports = [{ - krebs.users = { - makefu-omo = { - name = "makefu-omo" ; - pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_omo.ssh.pub; - }; - makefu-vbob = { - name = "makefu-vbob" ; - pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_vbob.ssh.pub; - }; - makefu-tsp = { - name = "makefu-tsp" ; - pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_tsp.ssh.pub; - }; - exco = { - name = "exco"; - pubkey= with builtins; readFile ../../../krebs/Zpubkeys/exco.ssh.pub; - }; - }; - }]; krebs.git = { enable = true; root-title = "public repositories"; -- cgit v1.2.3 From 55ad05879b8ba97e369bfd72810028dd4622e356 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 14 Dec 2015 19:36:06 +0100 Subject: s 1 wolf: initial preparation of ci packaging --- makefu/2configs/nginx/euer.test.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 makefu/2configs/nginx/euer.test.nix (limited to 'makefu/2configs') diff --git a/makefu/2configs/nginx/euer.test.nix b/makefu/2configs/nginx/euer.test.nix new file mode 100644 index 000000000..ffdc0bc60 --- /dev/null +++ b/makefu/2configs/nginx/euer.test.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + hostname = config.krebs.build.host.name; + user = config.services.nginx.user; + group = config.services.nginx.group; + external-ip = head config.krebs.build.host.nets.internet.addrs4; + internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; +in { + krebs.nginx = { + enable = mkDefault true; + servers = { + euer-share = { + listen = [ ]; + server-names = [ "share.euer.krebsco.de" ]; + locations = singleton (nameValuePair "/" '' + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://localhost:8000/; + ''); + }; + }; + }; +} -- cgit v1.2.3 From d4792eb7231acf5bf66409adb4e777433998678b Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 15 Dec 2015 15:33:34 +0100 Subject: prepare zshrc, makes ~/.zshrc obsolete --- makefu/2configs/zsh-user.nix | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix index 3089b706a..266ce256a 100644 --- a/makefu/2configs/zsh-user.nix +++ b/makefu/2configs/zsh-user.nix @@ -5,6 +5,36 @@ let mainUser = config.krebs.build.user.name; in { - programs.zsh.enable = true; users.extraUsers.${mainUser}.shell = "/run/current-system/sw/bin/zsh"; + programs.zsh= { + enable = true; + interactiveShellInit = '' + HISTSIZE=900001 + HISTFILESIZE=$HISTSIZE + SAVEHIST=$HISTSIZE + + setopt HIST_IGNORE_ALL_DUPS + setopt HIST_IGNORE_SPACE + setopt HIST_FIND_NO_DUPS + bindkey -e + # shift-tab + bindkey '^[[Z' reverse-menu-complete + + autoload -U compinit && compinit + zstyle ':completion:*' menu select + ''; + + promptInit = '' + RPROMPT="" + autoload colors && colors + case $UID in + 0) PROMPT="%{$fg[red]%}%~%{$reset_color%} " ;; + 9001) PROMPT="%{$fg[green]%}%~%{$reset_color%} " ;; + *) PROMPT="%{$fg[yellow]%}%n %{$fg[green]%}%~%{$reset_color%} " ;; + esac + if test -n "$SSH_CLIENT"; then + PROMPT="%{$fg[magenta]%}%m $PROMPT" + fi + ''; + }; } -- cgit v1.2.3 From 09f4611f38ecaf471a54c09fc3fa9350ffe3f0b9 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Dec 2015 10:42:40 +0100 Subject: m 2 default: add aliases, pythonstartup env --- makefu/2configs/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'makefu/2configs') diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 519635281..c0d7685e3 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -104,6 +104,8 @@ with lib; HISTSIZE=900001 HISTFILESIZE=$HISTSIZE + PYTHONSTARTUP="~/.pythonrc"; + shopt -s checkhash shopt -s histappend histreedit histverify shopt -s no_empty_cmd_completion @@ -123,6 +125,9 @@ with lib; environment.shellAliases = { lsl = "ls -lAtr"; + psg = "ps -ef | grep"; + nmap = "nmap -oN $HOME/loot/scan-`date +\%s`.nmap -oX $HOME/loot/scan-`date +%s`.xml"; + grep = "grep --color=auto"; }; nixpkgs.config.packageOverrides = pkgs: { -- cgit v1.2.3 From c20d38e11ecf38dda8931769a04cdcdf96f88c3f Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Dec 2015 11:40:18 +0100 Subject: m 2 base-gui: write xdefaults, obsoletes ~/.Xdefaults --- makefu/2configs/base-gui.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'makefu/2configs') diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix index 16a5386ca..1d6750284 100644 --- a/makefu/2configs/base-gui.nix +++ b/makefu/2configs/base-gui.nix @@ -73,4 +73,33 @@ in enable = true; # systemWide = true; }; + services.xserver.displayManager.sessionCommands = let + xdefaultsfile = pkgs.writeText "Xdefaults" '' + cat |derp < Date: Wed, 16 Dec 2015 11:40:48 +0100 Subject: m 2 zsh-user: load gpg-agent, obsoletes oh-my-zsh ssh plugin --- makefu/2configs/zsh-user.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'makefu/2configs') diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix index 266ce256a..1b1762418 100644 --- a/makefu/2configs/zsh-user.nix +++ b/makefu/2configs/zsh-user.nix @@ -22,6 +22,16 @@ in autoload -U compinit && compinit zstyle ':completion:*' menu select + + # load gpg-agent + envfile="$HOME/.gnupg/gpg-agent.env" + if [ -e "$envfile" ] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "$envfile")" + else + eval "$(${pkgs.gnupg}/bin/gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")" + fi + export GPG_AGENT_INFO + export SSH_AUTH_SOCK ''; promptInit = '' -- cgit v1.2.3 From 27746f9a3dffe6adde137d300e498249843174d9 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Dec 2015 11:43:56 +0100 Subject: m 2 wwan: add alias for umts when wwan is loaded --- makefu/2configs/wwan.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'makefu/2configs') diff --git a/makefu/2configs/wwan.nix b/makefu/2configs/wwan.nix index dd1c63090..29a610ac6 100644 --- a/makefu/2configs/wwan.nix +++ b/makefu/2configs/wwan.nix @@ -9,6 +9,10 @@ in { wvdial ]; + environment.shellAliases = { + umts = "sudo wvdial netzclub"; + }; + # configure for NETZCLUB environment.wvdial.dialerDefaults = '' Phone = *99***1# -- cgit v1.2.3 From 5af1d1c7b14c08ba1c0198cc9771c452218670b0 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Dec 2015 11:54:58 +0100 Subject: m 2 Reaktor: sed-plugin fix name --- makefu/2configs/Reaktor/sed-plugin.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/Reaktor/sed-plugin.nix b/makefu/2configs/Reaktor/sed-plugin.nix index 1ec977116..a451e0d3e 100644 --- a/makefu/2configs/Reaktor/sed-plugin.nix +++ b/makefu/2configs/Reaktor/sed-plugin.nix @@ -7,7 +7,7 @@ in { #TODO: this will eat up the last regex, fix Reaktor krebs.Reaktor.extraConfig = '' public_commands.append({ - 'capname' : "shack-correct", + 'capname' : "sed-plugin", # only support s///gi 'pattern' : '^(?P.*)$$', 'argv' : ["${pkgs.python3}/bin/python3","${script}"], -- cgit v1.2.3 From a4abf300d8adea5a454f8664f2de6dd8e9095216 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Dec 2015 12:29:24 +0100 Subject: m 2 main-laptop: use zsh for main-laptop --- makefu/2configs/main-laptop.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'makefu/2configs') diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix index 00a3e73ca..b725f661d 100644 --- a/makefu/2configs/main-laptop.nix +++ b/makefu/2configs/main-laptop.nix @@ -9,6 +9,7 @@ with lib; imports = [ ./base-gui.nix ./fetchWallpaper.nix + ./zsh-user.nix ]; environment.systemPackages = with pkgs;[ vlc -- cgit v1.2.3