Merge remote-tracking branch 'prism/staging/jeschli'
This commit is contained in:
commit
231971c59a
@ -3,16 +3,17 @@
|
|||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
# bln config file
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
<stockholm/jeschli>
|
<stockholm/jeschli>
|
||||||
<stockholm/jeschli/2configs/virtualbox.nix>
|
<stockholm/jeschli/2configs/virtualbox.nix>
|
||||||
|
<stockholm/jeschli/2configs/urxvt.nix>
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# ./dcso-vpn.nix
|
# ./dcso-vpn.nix
|
||||||
];
|
];
|
||||||
|
jeschliFontSize = 20;
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
@ -36,7 +37,15 @@
|
|||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
environment.shellAliases = {
|
||||||
|
n = "nix-shell";
|
||||||
|
gd = "cd /home/markus/go/src/gitlab.dcso.lolcat";
|
||||||
|
gh = "cd /home/markus/go/src/github.com";
|
||||||
|
stocki = pkgs.writeDash "deploy" ''
|
||||||
|
cd ~/stockholm
|
||||||
|
LOGNAME=jeschli exec nix-shell -I stockholm="$PWD" --run 'deploy --system="bln"'
|
||||||
|
'';
|
||||||
|
};
|
||||||
networking.hostName = lib.mkForce "BLN02NB0154"; # Define your hostname.
|
networking.hostName = lib.mkForce "BLN02NB0154"; # Define your hostname.
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
@ -55,13 +64,9 @@
|
|||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
# $ nix-env -qaP | grep wget
|
# $ nix-env -qaP | grep wget
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
environment.shellAliases = {
|
|
||||||
n = "nix-shell";
|
|
||||||
gd = "cd /home/markus/go/src/gitlab.dcso.lolcat";
|
|
||||||
gh = "cd /home/markus/go/src/github.com";
|
|
||||||
};
|
|
||||||
environment.variables = { GOROOT= [ "${pkgs.go.out}/share/go" ]; };
|
environment.variables = { GOROOT= [ "${pkgs.go.out}/share/go" ]; };
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
termite
|
||||||
# system helper
|
# system helper
|
||||||
ag
|
ag
|
||||||
copyq
|
copyq
|
||||||
@ -86,6 +91,7 @@
|
|||||||
chromium
|
chromium
|
||||||
google-chrome
|
google-chrome
|
||||||
# programming languages
|
# programming languages
|
||||||
|
elmPackages.elm
|
||||||
go
|
go
|
||||||
gcc
|
gcc
|
||||||
ghc
|
ghc
|
||||||
|
@ -40,6 +40,16 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
services.taskserver = {
|
||||||
|
enable = true;
|
||||||
|
fqdn = "enklave.r";
|
||||||
|
listenHost = "::";
|
||||||
|
listenPort = 53589;
|
||||||
|
organisations.lass.users = [ "jeschli" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 53589 ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
krebs.build.host = config.krebs.hosts.enklave;
|
krebs.build.host = config.krebs.hosts.enklave;
|
||||||
|
10
jeschli/1systems/enklave/taskserver.nix
Normal file
10
jeschli/1systems/enklave/taskserver.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
services.taskserver = {
|
||||||
|
enable = true;
|
||||||
|
fqdn = "enklave.r";
|
||||||
|
listenHost = "::";
|
||||||
|
listenPort = 53589;
|
||||||
|
organisations.lass.users = [ "jeschli" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 53589 ];
|
||||||
|
}
|
@ -4,6 +4,7 @@ with import <stockholm/lib>;
|
|||||||
imports = [
|
imports = [
|
||||||
./vim.nix
|
./vim.nix
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
|
./zsh.nix
|
||||||
<stockholm/lass/2configs/security-workarounds.nix>
|
<stockholm/lass/2configs/security-workarounds.nix>
|
||||||
{
|
{
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
|
@ -1,34 +1,39 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
with import <stockholm/lib>;
|
with import <stockholm/lib>;
|
||||||
|
|
||||||
{
|
{
|
||||||
services.urxvtd.enable = true;
|
options.jeschliFontSize = mkOption {
|
||||||
krebs.xresources.enable = true;
|
type = types.int;
|
||||||
krebs.xresources.resources.urxvt = ''
|
default = 12;
|
||||||
*foreground: rgb:a8/a8/a8
|
};
|
||||||
*background: rgb:00/00/00
|
config = {
|
||||||
*faceName: DejaVu Sans Mono
|
services.urxvtd.enable = true;
|
||||||
*faceSize: 12
|
krebs.xresources.enable = true;
|
||||||
*color0: rgb:00/00/00
|
krebs.xresources.resources.urxvt = ''
|
||||||
*color1: rgb:a8/00/00
|
*foreground: rgb:a8/a8/a8
|
||||||
*color2: rgb:00/a8/00
|
*background: rgb:00/00/00
|
||||||
*color3: rgb:a8/54/00
|
*faceName: DejaVu Sans Mono
|
||||||
*color4: rgb:00/00/a8
|
*faceSize: ${toString config.jeschliFontSize}
|
||||||
*color5: rgb:a8/00/a8
|
*color0: rgb:00/00/00
|
||||||
*color6: rgb:00/a8/a8
|
*color1: rgb:a8/00/00
|
||||||
*color7: rgb:a8/a8/a8
|
*color2: rgb:00/a8/00
|
||||||
*color8: rgb:54/54/54
|
*color3: rgb:a8/54/00
|
||||||
*color9: rgb:fc/54/54
|
*color4: rgb:26/8b/d2
|
||||||
*color10: rgb:54/fc/54
|
*color5: rgb:a8/00/a8
|
||||||
*color11: rgb:fc/fc/54
|
*color6: rgb:00/a8/a8
|
||||||
*color12: rgb:54/54/fc
|
*color7: rgb:a8/a8/a8
|
||||||
*color13: rgb:fc/54/fc
|
*color8: rgb:54/54/54
|
||||||
*color14: rgb:54/fc/fc
|
*color9: rgb:fc/54/54
|
||||||
*color15: rgb:fc/fc/fc
|
*color10: rgb:54/fc/54
|
||||||
|
*color11: rgb:fc/fc/54
|
||||||
URxvt*scrollBar: false
|
*color12: rgb:54/54/fc
|
||||||
URxvt*urgentOnBell: true
|
*color13: rgb:fc/54/fc
|
||||||
URxvt*font: xft:DejaVu Sans Mono:pixelsize=12
|
*color14: rgb:54/fc/fc
|
||||||
URXvt*faceSize: 12
|
*color15: rgb:fc/fc/fc
|
||||||
'';
|
|
||||||
|
URxvt*scrollBar: false
|
||||||
|
URxvt*urgentOnBell: true
|
||||||
|
URxvt*font: xft:DejaVu Sans Mono:pixelsize=${toString config.jeschliFontSize}
|
||||||
|
URXvt*faceSize: ${toString config.jeschliFontSize}
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,9 @@ in {
|
|||||||
name = "vim";
|
name = "vim";
|
||||||
vimrcConfig.customRC = let
|
vimrcConfig.customRC = let
|
||||||
colorscheme = ''colorscheme molokai'';
|
colorscheme = ''colorscheme molokai'';
|
||||||
|
highlightTrailingWhiteSpaces = ''
|
||||||
|
au Syntax * syn match Garbage containedin=ALL /\s\+$/
|
||||||
|
'';
|
||||||
setStatements = ''
|
setStatements = ''
|
||||||
set autowrite
|
set autowrite
|
||||||
set clipboard=unnamedplus
|
set clipboard=unnamedplus
|
||||||
@ -42,6 +45,7 @@ in {
|
|||||||
remapStatements = ''
|
remapStatements = ''
|
||||||
imap jk <Esc>
|
imap jk <Esc>
|
||||||
map gr :GoRun<Enter> " Map gr to execute go run
|
map gr :GoRun<Enter> " Map gr to execute go run
|
||||||
|
map tt :GoTest<Enter> " Map tt to execute go test
|
||||||
map nf :NERDTreeToggle<CR>
|
map nf :NERDTreeToggle<CR>
|
||||||
nnoremap <C-TAB> <c-w><c-w>
|
nnoremap <C-TAB> <c-w><c-w>
|
||||||
nnoremap <S-TAB> :bnext<CR>
|
nnoremap <S-TAB> :bnext<CR>
|
||||||
@ -74,11 +78,12 @@ in {
|
|||||||
'';
|
'';
|
||||||
in ''
|
in ''
|
||||||
${colorscheme}
|
${colorscheme}
|
||||||
|
${highlightTrailingWhiteSpaces}
|
||||||
${remapStatements}
|
${remapStatements}
|
||||||
${setStatements}
|
${setStatements}
|
||||||
${settingsForElm}
|
${settingsForElm}
|
||||||
${settingsForGo}
|
${settingsForGo}
|
||||||
" I dont know what this line is about
|
" dont expand tabs in go files and show it with four whitespaces.
|
||||||
autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
|
autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
|
||||||
'';
|
'';
|
||||||
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins;
|
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins;
|
||||||
|
138
jeschli/2configs/zsh.nix
Normal file
138
jeschli/2configs/zsh.nix
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ pkgs.fzf ];
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
shellInit = ''
|
||||||
|
#disable config wizard
|
||||||
|
zsh-newuser-install() { :; }
|
||||||
|
'';
|
||||||
|
interactiveShellInit = ''
|
||||||
|
setopt autocd extendedglob
|
||||||
|
bindkey -e
|
||||||
|
|
||||||
|
#history magic
|
||||||
|
bindkey "[A" up-line-or-local-history
|
||||||
|
bindkey "[B" 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
|
||||||
|
|
||||||
|
#fzf inclusion
|
||||||
|
source ${pkgs.fzf}/share/fzf/completion.zsh
|
||||||
|
source ${pkgs.fzf}/share/fzf/key-bindings.zsh
|
||||||
|
|
||||||
|
#completion magic
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
|
||||||
|
#enable automatic rehashing of $PATH
|
||||||
|
zstyle ':completion:*' rehash true
|
||||||
|
|
||||||
|
eval $(dircolors -b ${pkgs.fetchFromGitHub {
|
||||||
|
owner = "trapd00r";
|
||||||
|
repo = "LS_COLORS";
|
||||||
|
rev = "master";
|
||||||
|
sha256="05lh5w3bgj9h8d8lrbbwbzw8788709cnzzkl8yh7m1dawkpf6nlp";
|
||||||
|
}}/LS_COLORS)
|
||||||
|
|
||||||
|
#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'
|
||||||
|
|
||||||
|
#fancy window title magic
|
||||||
|
'';
|
||||||
|
promptInit = ''
|
||||||
|
# TODO: figure out why we need to set this here
|
||||||
|
HISTSIZE=900001
|
||||||
|
HISTFILESIZE=$HISTSIZE
|
||||||
|
SAVEHIST=$HISTSIZE
|
||||||
|
|
||||||
|
autoload -U promptinit
|
||||||
|
promptinit
|
||||||
|
|
||||||
|
p_error='%(?..%F{red}%?%f )'
|
||||||
|
t_error='%(?..%? )'
|
||||||
|
|
||||||
|
case $UID in
|
||||||
|
0)
|
||||||
|
p_username='%F{red}root%f'
|
||||||
|
t_username='root'
|
||||||
|
;;
|
||||||
|
1337)
|
||||||
|
p_username=""
|
||||||
|
t_username=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
p_username='%F{blue}%n%f'
|
||||||
|
t_username='%n'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$SSH_CLIENT"; then
|
||||||
|
p_hostname='@%F{magenta}%M%f '
|
||||||
|
t_hostname='@%M '
|
||||||
|
else
|
||||||
|
p_hostname=""
|
||||||
|
t_hostname=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check if in nix shell
|
||||||
|
if test -n "$buildInputs"; then
|
||||||
|
p_nixshell='%F{green}[s]%f '
|
||||||
|
t_nixshell='[s] '
|
||||||
|
else
|
||||||
|
p_nixshell=""
|
||||||
|
t_nixshell=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
PROMPT="$p_error$p_username$p_hostname$p_nixshell%~ "
|
||||||
|
TITLE="$t_error$t_username$t_hostname$t_nixshell%~"
|
||||||
|
case $TERM in
|
||||||
|
(*xterm* | *rxvt*)
|
||||||
|
function precmd {
|
||||||
|
PROMPT_EVALED="$(print -P $TITLE)"
|
||||||
|
echo -ne "\033]0;$$ $PROMPT_EVALED\007"
|
||||||
|
}
|
||||||
|
# This is seen while the shell waits for a command to complete.
|
||||||
|
function preexec {
|
||||||
|
PROMPT_EVALED="$(print -P $TITLE)"
|
||||||
|
echo -ne "\033]0;$$ $PROMPT_EVALED $1\007"
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
users.defaultUserShell = "/run/current-system/sw/bin/zsh";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user