From 9eff022e421307723084159cb93b020cff7bc139 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 5 Sep 2015 12:14:16 +0200 Subject: move pubkey imports to krebs/Zpubkeys --- lass/2configs/base.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lass/2configs/base.nix') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index d44a19c1e..b29d028d9 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -14,7 +14,7 @@ with lib; users.extraUsers = { root = { openssh.authorizedKeys.keys = map readFile [ - ../../Zpubkeys/lass.ssh.pub + ../../krebs/Zpubkeys/lass.ssh.pub ]; }; mainUser = { @@ -29,7 +29,7 @@ with lib; "wheel" ]; openssh.authorizedKeys.keys = map readFile [ - ../../Zpubkeys/lass.ssh.pub + ../../krebs/Zpubkeys/lass.ssh.pub ]; }; }; -- cgit v1.3.1 From d3af0f72cd2b5fd391bdd70a2a8001d5f9557984 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 13 Sep 2015 16:37:00 +0200 Subject: lass 2 base: bump nixpkgs rev --- lass/2configs/base.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs/base.nix') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index b29d028d9..bd829c641 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -42,7 +42,7 @@ with lib; exim-retiolum.enable = true; build.deps.nixpkgs = { url = https://github.com/Lassulus/nixpkgs; - rev = "58a82ff50b8605b88a8f66481d8c85bf8ab53be3"; + rev = "e74d0e7ff83c16846a81e1173543f180ad565076"; }; }; -- cgit v1.3.1 From e863eae0eadf2b57076121264d7798177640a194 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 13 Sep 2015 16:37:11 +0200 Subject: lass 2 base: dont get a ipv4ll address --- lass/2configs/base.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lass/2configs/base.nix') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index bd829c641..18acd15ab 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -147,4 +147,8 @@ with lib; }; }; + networking.dhcpcd.extraConfig = '' + noipv4ll + ''; + } -- cgit v1.3.1 From db75ef768b705fc6c4cbbd5ed29f817470c9952d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 19 Sep 2015 23:40:51 +0200 Subject: lass 2: use zsh as defaultShell --- lass/2configs/base.nix | 1 + lass/2configs/zsh.nix | 126 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 lass/2configs/zsh.nix (limited to 'lass/2configs/base.nix') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 18acd15ab..6774845c0 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -5,6 +5,7 @@ with lib; imports = [ ../3modules/iptables.nix ../2configs/vim.nix + ../2configs/zsh.nix { users.extraUsers = mapAttrs (_: h: { hashedPassword = h; }) diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix new file mode 100644 index 000000000..646e816fd --- /dev/null +++ b/lass/2configs/zsh.nix @@ -0,0 +1,126 @@ +{ config, lib, pkgs, ... }: +{ + programs.zsh = { + enable = true; + shellInit = '' + #disable config wizard + zsh-newuser-install() { :; } + ''; + interactiveShellInit = '' + HISTFILE=~/.histfile + HISTSIZE=1000000 + SAVEHIST=100000 + #unsetopt nomatch + setopt autocd extendedglob + bindkey -e + zstyle :compinstall filename '/home/lass/.zshrc' + + #history magic + bindkey "" up-line-or-local-history + bindkey "" down-line-or-local-history + + up-line-or-local-history() { + zle set-local-history 1 + zle up-line-or-history + zle set-local-history 0 + } + zle -N up-line-or-local-history + down-line-or-local-history() { + zle set-local-history 1 + zle down-line-or-history + zle set-local-history 0 + } + zle -N down-line-or-local-history + + setopt share_history + setopt hist_ignore_dups + # setopt inc_append_history + bindkey '^R' history-incremental-search-backward + + #C-x C-e open line in editor + autoload -z edit-command-line + zle -N edit-command-line + bindkey "^X^E" edit-command-line + + #completion magic + fpath=(~/.zsh/completions $fpath) + autoload -Uz compinit + compinit + zstyle ':completion:*' menu select + + #enable automatic rehashing of $PATH + zstyle ':completion:*' rehash true + + + #eval $( dircolors -b ~/.LS_COLORS ) + + #exports + export EDITOR='vim' + export MANPAGER='most' + export PAGER='vim -' + # export MANPAGER='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | vim -R -c "set ft=man nonu nomod nolist" -' + + #beautiful colors + alias ls='ls --color' + zstyle ':completion:*:default' list-colors ''${(s.:.)LS_COLORS} + + #emacs bindings + bindkey "[7~" beginning-of-line + bindkey "[8~" end-of-line + bindkey "Oc" emacs-forward-word + bindkey "Od" emacs-backward-word + + #aliases + alias ll='ls -l' + alias la='ls -la' + alias pinginet='ping 8.8.8.8' + alias du='du -hd1' + alias qiv="qiv -f -m" + alias zshres="source ~/.zshrc" + + #fancy window title magic + case $TERM in + (*xterm* | *rxvt*) + + # Write some info to terminal title. + # This is seen when the shell prompts for input. + function precmd { + print -Pn "\e]0;%(1j,%j job%(2j|s|); ,)%~\a" + } + # Write command and args to terminal title. + # This is seen while the shell waits for a command to complete. + function preexec { + printf "\033]0;%s\a" "$1" + } + ;; + esac + ''; + promptInit = '' + autoload -U promptinit + promptinit + + error='%(?..%F{red}%?%f )' + + case $UID in + 0) + username='%F{red}root%f' + ;; + 1337) + username="" + ;; + *) + username='%F{blue}%n%f' + ;; + esac + + if test -n "$SSH_CLIENT"; then + PROMPT="$error$username@%F{magenta}%M%f %~ " + else + PROMPT="$error$username %~ " + fi + + + ''; + }; + users.defaultUserShell = "/run/current-system/sw/bin/zsh"; +} -- cgit v1.3.1