summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile37
-rw-r--r--tv/2configs/backup.nix6
-rw-r--r--tv/2configs/default.nix1
-rw-r--r--tv/2configs/pulse.nix15
-rw-r--r--tv/2configs/vim.nix44
-rw-r--r--tv/2configs/xserver/Xresources.nix225
-rw-r--r--tv/2configs/xserver/default.nix8
-rw-r--r--tv/source.nix2
8 files changed, 68 insertions, 270 deletions
diff --git a/Makefile b/Makefile
index e35aa89b..962eae00 100644
--- a/Makefile
+++ b/Makefile
@@ -83,19 +83,14 @@ ifeq ($(MAKECMDGOALS),)
$(error No goals specified)
endif
-# usage: make deploy system=foo [target_host=bar]
-ifeq ($(debug),true)
-deploy: rebuild-command = dry-activate
+# usage: make deploy system=foo [target=bar]
+# usage: make test system=foo target=bar
+deploy test:
+ifdef target
+ nix-shell --run '$@ --system=$(system) --target=$(target)'
else
-deploy: rebuild-command = switch
+ nix-shell --run '$@ --system=$(system)'
endif
-deploy: ssh ?= ssh
-deploy:
- $(MAKE) populate debug=false
- $(ssh) $(target_user)@$(target_host) -p $(target_port) \
- env STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \
- nixos-rebuild -Q $(rebuild-command) --show-trace -I $(target_path) \
- |& $(call whatsupnix,$(target_user)@$(target_host):$(target_port))
# usage: make populate system=foo
populate: populate-target = \
@@ -129,23 +124,3 @@ install:
env NIXOS_CONFIG=$(target_path)/nixos-config \
STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \
nixos-install
-
-# usage: make test system=foo [target=bar] [method={eval,build}]
-method ?= eval
-ifeq ($(method),build)
-test: test = $(call build,$(1),$(2))
-else
-ifeq ($(method),eval)
-test: test ?= $(call evaluate,$(1),$(2)) --json --strict | jq -r .
-else
-$(error bad method: $(method))
-endif
-endif
-test: ssh ?= ssh
-ifeq ($(target_user)@$(target_host),$(LOGNAME)@$(HOSTNAME))
-test: wrapper = exec
-else
-test: wrapper = $(ssh) $(target_user)@$(target_host) -p $(target_port)
-endif
-test: populate
- $(wrapper) $(call test,config.system.build.toplevel,-I $(target_path))
diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix
index 5cc86cfd..46e3f70f 100644
--- a/tv/2configs/backup.nix
+++ b/tv/2configs/backup.nix
@@ -34,6 +34,12 @@ with import <stockholm/lib>;
dst = { host = config.krebs.hosts.zu; path = "/bku/wu-home"; };
startAt = "05:20";
};
+ xu-home-nomic = {
+ method = "push";
+ src = { host = config.krebs.hosts.xu; path = "/home"; };
+ dst = { host = config.krebs.hosts.nomic; path = "/fs/cis3hG/bku/xu-home"; };
+ startAt = "05:20";
+ };
xu-home-wu = {
method = "push";
src = { host = config.krebs.hosts.xu; path = "/home"; };
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index 07496fd1..b5931109 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -143,6 +143,7 @@ in {
environment.systemPackages = [
pkgs.get
pkgs.htop
+ pkgs.kpaste
pkgs.krebspaste
pkgs.nix-prefetch-scripts
pkgs.ovh-zone
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix
index 41855121..c051b426 100644
--- a/tv/2configs/pulse.nix
+++ b/tv/2configs/pulse.nix
@@ -1,16 +1,25 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, pkgs_i686, ... }:
with import <stockholm/lib>;
let
pkg = pkgs.pulseaudioLight;
runDir = "/run/pulse";
+ support32Bit =
+ pkgs.stdenv.isx86_64 &&
+ pkgs_i686.alsaLib != null &&
+ pkgs_i686.libpulseaudio != null;
+
alsaConf = pkgs.writeText "asound.conf" ''
ctl_type.pulse {
libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;
+ ${optionalString support32Bit
+ "libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;"}
}
pcm_type.pulse {
libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;
+ ${optionalString support32Bit
+ "libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;"}
}
ctl.!default {
type pulse
@@ -52,6 +61,10 @@ in
];
};
+ hardware.pulseaudio = {
+ inherit support32Bit;
+ };
+
# Allow PulseAudio to get realtime priority using rtkit.
security.rtkit.enable = true;
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index a3af9377..7849b6f2 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -14,7 +14,6 @@ let {
};
extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [
- pkgs.vimPlugins.ctrlp
pkgs.vimPlugins.undotree
(pkgs.vimUtils.buildVimPlugin {
name = "vim-syntax-jq";
@@ -303,13 +302,9 @@ let {
(pkgs.writeDashBin "vim" ''
set -efu
(umask 0077; exec ${pkgs.coreutils}/bin/mkdir -p ${toString mkdirs})
- if test $# = 0 && test -e "$PWD/.ctrlpignore"; then
- set -- +CtrlP
- fi
- # vim-orgmode needs Python, thus vim_configurable instead of just vim
- exec ${pkgs.vim_configurable}/bin/vim "$@"
+ exec ${pkgs.vim}/bin/vim "$@"
'')
- pkgs.vim_configurable
+ pkgs.vim
];
};
@@ -382,40 +377,5 @@ let {
noremap <esc>[c <nop> | noremap! <esc>[c <nop>
noremap <esc>[d <nop> | noremap! <esc>[d <nop>
vnoremap u <nop>
-
- "
- " CtrlP-related configuration
- "
- hi CtrlPPrtCursor ctermbg=199
- hi CtrlPMatch ctermfg=226
- set showtabline=0
- let g:ctrlp_cmd = 'CtrlPMixed'
- let g:ctrlp_map = '<esc>q'
- let g:ctrlp_working_path_mode = 'a'
- " Cannot use autoignore extension because it fails to initialize properly:
- " when started the first time, e.g. using `vim +CtrlP`, then it won't use
- " patterns from .ctrlpignore until CtrlP gets reopened and F5 pressed...
- fu s:gen_ctrlp_custom_ignore()
- let l:prefix = getcwd()
- let l:pats = readfile(l:prefix . "/.ctrlpignore")
- let l:pats = filter(l:pats, 's:ctrlpignore_filter(v:val)')
- let l:pats = map(l:pats, 's:ctrlpignore_rewrite(v:val)')
- return l:prefix . "\\(" . join(l:pats, "\\|") . "\\)"
- endfu
- fu s:ctrlpignore_filter(s)
- " filter comments and blank lines
- return match(a:s, '^\s*\(#.*\)''$') == -1
- endfu
- fu s:ctrlpignore_rewrite(s)
- if a:s[0:0] == "^"
- return "/" . a:s[1:]
- else
- return "/.*" . a:s
- endif
- endfu
- try
- let g:ctrlp_custom_ignore = s:gen_ctrlp_custom_ignore()
- catch /^Vim\%((\a\+)\)\=:E484/
- endtry
'';
}
diff --git a/tv/2configs/xserver/Xresources.nix b/tv/2configs/xserver/Xresources.nix
index 398247d2..1d404448 100644
--- a/tv/2configs/xserver/Xresources.nix
+++ b/tv/2configs/xserver/Xresources.nix
@@ -3,199 +3,36 @@
with import <stockholm/lib>;
pkgs.writeText "Xresources" /* xdefaults */ ''
- !URxvt*background: #050505
-
- ! 2013-02-25 \e was reas escape before
- ! *VT100.Translations: #override\
- ! :<Btn4Down>: string("\e[5~")\n\
- ! :<Btn5Down>: string("\e[6~")
-
- ! XTerm*VT100*Translations: #override \
- ! Shift<Key>Return: string(" &") string(0x0A) \n\
- ! Meta<Key>Return: string(" | less") string(0x0A) \n\
- ! ~Shift<Key>Prior: scroll-back(1,page) \n\
- ! ~Shift<Key>Next: scroll-forw(1,page) \n\
- ! Shift<Key>Prior: scroll-back(1) \n\
- ! Shift<Key>Next: scroll-forw(1) \n\
- ! <Key>Delete: string(0x1b) string("[2~")
- ! \n\
- ! <Key>BackSpace: string(0x7f)
-
- ! 2013-02-2013-02-25
- ! ! <M-c>: load bash-completion (if not already)
- ! URxvt*VT100*Translations: #override\
- ! Meta<KeyPress>c:\
- ! string("\eOH# \eOF\n+compl\n\eOA\eOA\eOH\e[3~\e[3~\eOF")\
- ! string(0x7)\n
-
- ! do not scroll automatically on output:
- ! XTerm*scrollTtyOutput: false
- URxvt*cutchars: "\\`\"'&()*,;<=>?@[]^{|}‘’"
- ! URxvt*secondaryScreen: false
-
- ! URxvt*loginShell: true
-
- URxvt*eightBitInput: false
- ! *eightBitOutput: 1
- ! URxvt*decTerminalID: 220
- ! URxvt*utf8: 1
- ! URxvt*locale: UTF-8
- ! XTerm*customization: -color
- URxvt*SaveLines: 4096
- URxvt*font: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1
- URxvt*boldFont: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1
-
- ! 2013-05-23 if this does not work try
- ! xset +fp /usr/share/fonts/local/
- ! xset fp rehash
- ! URxvt*font: -*-termsynu-edium-*-*-*-12-*-*-*-*-*-iso10646-1
- ! URxvt*boldFont: -*-termsynu-bold-*-*-*-12-*-*-*-*-*-iso10646-1
- !
- !-misc-termsynu-medium-r-normal--12-87-100-100-c-70-iso10646-1
-
- ! XTerm*font: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
- URxvt*scrollBar: false
-
- ! XTerm*font:-nil-profont-medium-r-normal--11-110-72-72-c-60-iso8859-1
- ! URxvt*boldFont:-nil-profont-medium-r-normal--11-110-72-72-c-60-iso8859-1
-
- URxvt*background: #050505
- ! URxvt*background: #041204
-
- !URxvt.depth: 32
- !URxvt*background: rgba:0500/0500/0500/cccc
-
- ! URxvt*background: #080810
- URxvt*foreground: #d0d7d0
- ! URxvt*background: black
- ! URxvt*foreground: white
- ! URxvt*background: rgb:00/00/40
- ! URxvt*foreground: rgb:a0/a0/d0
- ! XTerm*cursorColor: rgb:00/00/60
- URxvt*cursorColor: #f042b0
- URxvt*cursorColor2: #f0b000
- URxvt*cursorBlink: off
- ! URxvt*cursorUnderline: true
- ! URxvt*highlightColor: #232323
- ! URxvt*highlightTextColor: #b0ffb0
-
- URxvt*.pointerBlank: true
- URxvt*.pointerBlankDelay: 987654321
- URxvt*.pointerColor: #f042b0
- URxvt*.pointerColor2: #050505
-
- ! URxvt*fading: 50
- ! URxvt*fadeColor: #0f0f0f
-
- ! XTerm*colorMode: on
- ! URxvt*dynamicColors: on
- ! URxvt*boldColors: off
-
- URxvt*jumpScroll: true
-
- ! allow synthetic events for fvwm, so pass window specific keys
- ! XTerm*allowSendEvents: true
- URxvt*allowSendEvents: false
-
- ! better double/tripple clicking in xterms
- ! Format: csv, [low-]high:value
- !
- ! extend character class 48 due they are used in urls
- ! (see: man xterm; /CHARACTER CLASSES)
- ! ! % -./ @ & = ?
- URxvt*charClass: 33:48,37:48,45-47:48,64:48,38:48,61:48,63:48
- URxvt*cutNewline: False
- URxvt*cutToBeginningOfLine: False
-
- ! BLACK for indigo background
- URxvt*color0: #232342
-
- ! TODO: man xterm; /ACTIONS
-
- ! *VT100*colorULMode: on
- ! XTerm*underLine: on
- !
- ! URxvt*color0: black
- ! URxvt*color1: red3
- ! URxvt*color2: green3
- ! URxvt*color3: yellow3
- ! URxvt*color4: blue2
- ! URxvt*color5: magenta3
- ! URxvt*color6: cyan3
- ! URxvt*color7: gray90
- ! URxvt*color8: burlywood1
- ! URxvt*color9: sienna1
- ! URxvt*color10: PaleVioletRed1
- ! URxvt*color11: LightSkyBlue
- ! URxvt*color12: white
- ! URxvt*color13: white
- ! URxvt*color14: white
- ! URxvt*color33: #f0b0f0
-
-
- ! URxvt*color0: #000000
- ! URxvt*color1: #c00000
- ! URxvt*color2: #80c070
- URxvt*color3: #c07000
- ! URxvt*color4: #0000c0
- URxvt*color4: #4040c0
- ! URxvt*color5: #c000c0
- ! URxvt*color6: #008080
- URxvt*color7: #c0c0c0
-
- URxvt*color8: #707070
- URxvt*color9: #ff6060
- URxvt*color10: #70ff70
- URxvt*color11: #ffff70
- URxvt*color12: #7070ff
- URxvt*color13: #ff50ff
- URxvt*color14: #70ffff
- URxvt*color15: #ffffff
-
- ! XTerm*color91: #000070
- ! XTerm*color92: #000080
- ! XTerm*color93: #000090
- ! XTerm*color94: #0000a0
- ! XTerm*color95: #0000b0
- ! XTerm*color96: #0000c0
- ! XTerm*color97: #0000d0
- ! XTerm*color98: #0000e0
- ! XTerm*color99: #0000f0
-
- ! !! vim-create-colorscheme {{{
- ! !! Question cterm=none
- ! XTerm*color20: #f0b000
- ! !! }}}
- !
- !
- ! #include ".xrdb/look-zenburn.xrdb"
- ! #include ".xrdb/xterm.xrdb"
-
-
-
- ! URxvt.perl-ext: matcher
- ! URxvt.urlLauncher: cr
- ! URxvt.underlineColor: blue
-
- ! URxvt.matcher.button: 1
- ! URxvt.perl-ext: default,matcher
- ! URxvt.urlLauncher: cr
- ! URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-]
- ! URxvt.underlineColor: blue
-
- ! 2014-05-12 von lass
- !URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
- !URxvt.url-select.launcher: /home/tv/bin/ff -new-tab
- !URxvt.url-select.underline: true
- !URxvt.keysym.M-u: perl:url-select:select_next
- !URxvt.keysym.M-Escape: perl:keyboard-select:activate
- !URxvt.keysym.M-s: perl:keyboard-select:search
-
-
-
-
- ! 2013-02-25 I neve use this
- URxvt*iso14755: False
+ URxvt*cutchars: "\\`\"'&()*,;<=>?@[]^{|}‘’"
+ URxvt*eightBitInput: false
+ URxvt*font: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1
+ URxvt*boldFont: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1
+ URxvt*scrollBar: false
+ URxvt*background: #050505
+ URxvt*foreground: #d0d7d0
+ URxvt*cursorColor: #f042b0
+ URxvt*cursorColor2: #f0b000
+ URxvt*cursorBlink: off
+ URxvt*jumpScroll: true
+ URxvt*allowSendEvents: false
+ URxvt*charClass: 33:48,37:48,45-47:48,64:48,38:48,61:48,63:48
+ URxvt*cutNewline: False
+ URxvt*cutToBeginningOfLine: False
+
+ URxvt*color0: #232342
+ URxvt*color3: #c07000
+ URxvt*color4: #4040c0
+ URxvt*color7: #c0c0c0
+ URxvt*color8: #707070
+ URxvt*color9: #ff6060
+ URxvt*color10: #70ff70
+ URxvt*color11: #ffff70
+ URxvt*color12: #7070ff
+ URxvt*color13: #ff50ff
+ URxvt*color14: #70ffff
+ URxvt*color15: #ffffff
+
+ URxvt*iso14755: False
URxvt*urgentOnBell: True
URxvt*visualBell: True
@@ -207,7 +44,7 @@ pkgs.writeText "Xresources" /* xdefaults */ ''
URxvt*url-select.underline: true
URxvt*colorUL: #4682B4
URxvt.perl-lib: ${pkgs.urxvt_perls}/lib/urxvt/perl
- URxvt.saveLines: 4096
+ URxvt*saveLines: 10000
root-urxvt*background: #230000
root-urxvt*foreground: #e0c0c0
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index deb929c3..8f3ee596 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -9,6 +9,7 @@ in {
pkgs.gitAndTools.qgit
pkgs.mpv
pkgs.sxiv
+ pkgs.xdotool
pkgs.xsel
pkgs.zathura
];
@@ -29,6 +30,11 @@ in {
};
services.xserver = {
+
+ # Don't install feh into systemPackages
+ # refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
+ desktopManager.session = mkForce [];
+
enable = true;
display = 11;
tty = 11;
@@ -51,7 +57,7 @@ in {
XMONAD_STARTUP_HOOK = pkgs.writeDash "xmonad-startup-hook" ''
${pkgs.xorg.xhost}/bin/xhost +LOCAL: &
${pkgs.xorg.xmodmap}/bin/xmodmap ${import ./Xmodmap.nix args} &
- ${pkgs.xorg.xrdb}/bin/xrdb -merge ${import ./Xresources.nix args} &
+ ${pkgs.xorg.xrdb}/bin/xrdb ${import ./Xresources.nix args} &
${pkgs.xorg.xsetroot}/bin/xsetroot -solid '#1c1c1c' &
wait
'';
diff --git a/tv/source.nix b/tv/source.nix
index 4ede976d..dcfdb755 100644
--- a/tv/source.nix
+++ b/tv/source.nix
@@ -10,7 +10,7 @@ in
nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix";
nixpkgs.git = {
# nixos-17.03
- ref = mkDefault "1b57bf274ae5c76e91b2b264d8aa8bfcecb72102";
+ ref = mkDefault "94941cb0455bfc50b1bf63186cfad7136d629f78";
url = https://github.com/NixOS/nixpkgs;
};
secrets.file = getAttr builder {