From 674c5656580e92143fce376feebec21d83e0a81f Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 23 Sep 2015 14:58:15 +0200 Subject: lass 2: configure mc globaly --- lass/2configs/base.nix | 1 + lass/2configs/mc.nix | 346 +++++++++++++++++++++++++++++++++++++++++++++ lass/2configs/programs.nix | 1 - 3 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 lass/2configs/mc.nix (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 6774845c0..563035d0c 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -6,6 +6,7 @@ with lib; ../3modules/iptables.nix ../2configs/vim.nix ../2configs/zsh.nix + ../2configs/mc.nix { users.extraUsers = mapAttrs (_: h: { hashedPassword = h; }) diff --git a/lass/2configs/mc.nix b/lass/2configs/mc.nix new file mode 100644 index 000000000..87880ed00 --- /dev/null +++ b/lass/2configs/mc.nix @@ -0,0 +1,346 @@ +{ config, pkgs, ... }: + +let + mcExt = pkgs.writeText "mc.ext" '' + # gitfs changeset + regex/^\[git\] + Open=%cd %p/changesetfs:// + View=%cd %p/patchsetfs:// + + ### Archives ### + + # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk, .gem + regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$|\.gem$ + Open=%cd %p/utar:// + + shell/.tar.bz + # Open=%cd %p/utar:// + + regex/\.t(ar\.bz2|bz2?|b2)$ + Open=%cd %p/utar:// + + # .tar.lzma, .tlz + regex/\.t(ar\.lzma|lz)$ + Open=%cd %p/utar:// + + # .tar.xz, .txz + regex/\.t(ar\.xz|xz)$ + Open=%cd %p/utar:// + + # .tar.F - used in QNX + shell/.tar.F + # Open=%cd %p/utar:// + + # .qpr/.qpk - QNX Neutrino package installer files + regex/\.qp[rk]$ + Open=%cd %p/utar:// + + # tar + shell/i/.tar + Open=%cd %p/utar:// + + # lha + type/^LHa\ .*archive + Open=%cd %p/ulha:// + + # arj + regex/i/\.a(rj|[0-9][0-9])$ + Open=%cd %p/uarj:// + + # cab + shell/i/.cab + Open=%cd %p/ucab:// + + # ha + shell/i/.ha + Open=%cd %p/uha:// + + # rar + regex/i/\.r(ar|[0-9][0-9])$ + Open=%cd %p/urar:// + + # ALZip + shell/i/.alz + Open=%cd %p/ualz:// + + # cpio + shell/.cpio.Z + Open=%cd %p/ucpio:// + + shell/.cpio.xz + Open=%cd %p/ucpio:// + + shell/.cpio.gz + Open=%cd %p/ucpio:// + + shell/i/.cpio + Open=%cd %p/ucpio:// + + # 7zip archives (they are not man pages) + shell/i/.7z + Open=%cd %p/u7z:// + + # patch + regex/\.(diff|patch)(\.bz2)$ + Open=%cd %p/patchfs:// + + regex/\.(diff|patch)(\.(gz|Z))$ + Open=%cd %p/patchfs:// + + # ls-lR + regex/(^|\.)ls-?lR(\.gz|Z|bz2)$ + Open=%cd %p/lslR:// + + # trpm + shell/.trpm + Open=%cd %p/trpm:// + + # RPM packages (SuSE uses *.spm for source packages) + regex/\.(src\.rpm|spm)$ + Open=%cd %p/rpm:// + + shell/.rpm + Open=%cd %p/rpm:// + + # deb + regex/\.u?deb$ + Open=%cd %p/deb:// + + # dpkg + shell/.debd + Open=%cd %p/debd:// + + # apt + shell/.deba + Open=%cd %p/deba:// + + # ISO9660 + shell/i/.iso + Open=%cd %p/iso9660:// + + + regex/\.(diff|patch)$ + Open=%cd %p/patchfs:// + + # ar library + regex/\.s?a$ + Open=%cd %p/uar:// + + # gplib + shell/i/.lib + Open=%cd %p/ulib:// + + + # Mailboxes + type/^ASCII\ mail\ text + Open=%cd %p/mailfs:// + + + ### Sources ### + + # C/C++ + regex/i/\.(c|cc|cpp)$ + Include=editor + + # C/C++ header + regex/i/\.(h|hh|hpp)$ + Include=editor + + # Fortran + shell/i/.f + Include=editor + + # Assembler + regex/i/\.(s|asm)$ + Include=editor + + include/editor + Open=%var{EDITOR:vim} %f + + ### Images ### + + type/^GIF + Include=image + + type/^JPEG + Include=image + + type/^PC\ bitmap + Include=image + + type/^PNG + Include=image + + type/^JNG + Include=image + + type/^MNG + Include=image + + type/^TIFF + Include=image + + type/^PBM + Include=image + + type/^PGM + Include=image + + type/^PPM + Include=image + + type/^Netpbm + Include=image + + shell/.ico + Include=image + + include/image + Open=sxiv %f + View=sxiv %f + + ### Sound files ### + + regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$ + Include=audio + + regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$ + Include=audio + + shell/i/.waw22 + Include=audio + + shell/i/.mp3 + Include=audio + + regex/i/\.og[gax]$ + Include=audio + + regex/i/\.(spx|flac)$ + Include=audio + + regex/i/\.(midi?|rmid?)$ + Include=audio + + shell/i/.wma + Include=audio + + include/audio + Open=mpv %f + View=mpv %f + + ### Video ### + + shell/i/.avi + Include=video + + regex/i/\.as[fx]$ + Include=video + + shell/i/.divx + Include=video + + shell/i/.mkv + Include=video + + regex/i/\.(mov|qt)$ + Include=video + + regex/i/\.(mp4|m4v|mpe?g)$ + Include=video + + # MPEG-2 TS container + H.264 codec + shell/i/.mts + Include=video + + shell/i/.ts + Include=video + + shell/i/.vob + Include=video + + shell/i/.wmv + Include=video + + regex/i/\.fl[icv]$ + Include=video + + shell/i/.ogv + Include=video + + # WebM + shell/i/.webm + Include=video + + type/WebM + Include=video + + include/video + Open=mpv %f + View=mpv %f + + + ### Documents ### + + # PDF + type/^PDF + Open=zathura %f + View=zathura %f + + ### Miscellaneous ### + + # Makefile + regex/[Mm]akefile$ + Open=make -f %f %{Enter parameters} + + + ### Plain compressed files ### + + # ace + shell/i/.ace + Open=%cd %p/uace:// + Extract=unace x %f + + # arc + shell/i/.arc + Open=%cd %p/uarc:// + Extract=arc x %f '*' + Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi + + # zip + shell/i/.zip + Open=%cd %p/uzip:// + + # zip + type/i/^zip\ archive + Open=%cd %p/uzip:// + + # jar(zip) + type/i/^Java\ Jar\ file\ data\ \(zip\) + Open=%cd %p/uzip:// + + # zoo + shell/i/.zoo + Open=%cd %p/uzoo:// + + ### Default ### + + # Default target for anything not described above + default/* + Open=vim %f + View=vim %f + + ''; + +in { + environment.systemPackages = [ + (pkgs.lib.overrideDerivation pkgs.mc (original : { + postInstall = '' + rm -f $out/etc/mc/mc.ext + ln -s ${mcExt} $out/etc/mc/mc.ext + cp $out/share/mc/skins/nicedark.ini $out/share/mc/skins/default.ini + ''; + })) + ]; +} + diff --git a/lass/2configs/programs.nix b/lass/2configs/programs.nix index 41d241bac..e4840383f 100644 --- a/lass/2configs/programs.nix +++ b/lass/2configs/programs.nix @@ -7,7 +7,6 @@ gnupg1compat htop i3lock - mc mosh mpv pass -- cgit v1.2.3 From 4aaef36a28f0ef0d5268be312420367db6c7008f Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 23 Sep 2015 15:00:13 +0200 Subject: lass 2 base: disable nscd --- lass/2configs/base.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 563035d0c..7c4835461 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -54,6 +54,7 @@ with lib; #why is this on in the first place? services.ntp.enable = false; + services.nscd.enable = false; boot.tmpOnTmpfs = true; # see tmpfiles.d(5) -- cgit v1.2.3 From 12da7cf58718a2382a6ce8e0fe8fe537117b5240 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 23 Sep 2015 15:11:55 +0200 Subject: lass 2 desktop-base: dont suspend on lid action --- lass/2configs/desktop-base.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/desktop-base.nix b/lass/2configs/desktop-base.nix index 52c29d7e8..8ae768ca9 100644 --- a/lass/2configs/desktop-base.nix +++ b/lass/2configs/desktop-base.nix @@ -61,4 +61,8 @@ in { xkbOptions = "caps:backspace"; }; + services.logind.extraConfig = '' + HandleLidSwitch=ignore + ''; + } -- cgit v1.2.3 From d8867aac2610ce548ecb6d0c6a9ec44158f595fe Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 23 Sep 2015 15:13:14 +0200 Subject: lass 2 zsh: add -R to vim pager --- lass/2configs/zsh.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index 646e816fd..c3402eaf4 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -57,7 +57,7 @@ #exports export EDITOR='vim' export MANPAGER='most' - export PAGER='vim -' + export PAGER='vim -R -' # 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 -- cgit v1.2.3 From cdc490e504b30062765578d66a7f5ccd6449b7b6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 23 Sep 2015 15:15:56 +0200 Subject: lass 2 zsh: fix space in prompt --- lass/2configs/zsh.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index c3402eaf4..64aa45823 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -103,23 +103,21 @@ case $UID in 0) - username='%F{red}root%f' + username='%F{red}root%f ' ;; 1337) username="" ;; *) - username='%F{blue}%n%f' + username='%F{blue}%n%f ' ;; esac if test -n "$SSH_CLIENT"; then PROMPT="$error$username@%F{magenta}%M%f %~ " else - PROMPT="$error$username %~ " + PROMPT="$error$username%~ " fi - - ''; }; users.defaultUserShell = "/run/current-system/sw/bin/zsh"; -- cgit v1.2.3 From 895971f21490222e7d4060d5ec1a6bb4395ff595 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 26 Sep 2015 12:08:22 +0200 Subject: lass 2 texlive: add dependencies for moderncv --- lass/2configs/texlive.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/texlive.nix b/lass/2configs/texlive.nix index 18d72297d..fa20ef81f 100644 --- a/lass/2configs/texlive.nix +++ b/lass/2configs/texlive.nix @@ -2,6 +2,11 @@ { environment.systemPackages = with pkgs; [ - texLive + (texLiveAggregationFun { paths = [ + texLive + texLiveExtra + texLiveCMSuper + texLiveModerncv + ];}) ]; } -- cgit v1.2.3 From 0d806f61d2709f0ff8bf03ee431839035215e689 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 26 Sep 2015 12:12:50 +0200 Subject: lass: add firefoxPatched + firefoxPlugins --- lass/2configs/firefoxPatched.nix | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lass/2configs/firefoxPatched.nix (limited to 'lass/2configs') diff --git a/lass/2configs/firefoxPatched.nix b/lass/2configs/firefoxPatched.nix new file mode 100644 index 000000000..daf8a28be --- /dev/null +++ b/lass/2configs/firefoxPatched.nix @@ -0,0 +1,58 @@ +{ config, lib, pkgs, ... }: + +let + lpkgs = import ../5pkgs { inherit pkgs; }; + + inherit (lib) + concatMapStrings + ; + + plugins = with lpkgs.firefoxPlugins; [ + noscript + ublock + vimperator + ]; + + copyXpi = plugin: + "cp ${plugin}/*.xpi $out/usr/lib/firefox-*/browser/extensions/"; + + preferences = pkgs.writeText "autoload.js" '' + pref('general.config.filename', 'firefox.cfg'); + pref('general.config.obscure_value', 0); + ''; + + config = pkgs.writeText "firefox.cfg" '' + // + lockPref("app.update.enabled", false); + lockPref("extensions.update.enabled", false); + lockPref("autoadmin.global_config_url", ""); + lockPref("extensions.checkUpdateSecurity", false); + lockPref("services.sync.enabled", false); + lockPref("browser.shell.checkDefaultBrowser", false); + lockPref("layout.spellcheckDefault", 0); + lockPref("app.update.auto", false); + lockPref("browser.newtabpage.enabled", false); + lockPref("noscript.firstRunRedirection", false); + lockPref("noscript.hoverUI", false); + lockPref("noscript.notify", false); + defaultPref("extensions.newAddons", false); + defaultPref("extensions.autoDisableScopes", 0); + defaultPref("plugin.scan.plid.all", false); + ''; + +in { + environment.systemPackages = [ + (pkgs.lib.overrideDerivation pkgs.firefox-bin (original : { + installPhase = '' + ${original.installPhase} + find $out/usr/lib + ${concatMapStrings copyXpi plugins} + cd $out/usr/lib/firefox-*/ + mkdir -p browser/defaults/preferences + cp ${preferences} browser/defaults/preferences/autoload.js + cp ${config} ./firefox.cfg + ''; + })) + ]; +} + -- cgit v1.2.3 From 5165f8e47fc6b0f18d1d0d38398362a03bae7531 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 26 Sep 2015 12:13:53 +0200 Subject: lass 2 browsers: use systemwide firefox --- lass/2configs/browsers.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix index 4fe06b729..f37dace2c 100644 --- a/lass/2configs/browsers.nix +++ b/lass/2configs/browsers.nix @@ -62,7 +62,7 @@ in { imports = [ ../3modules/per-user.nix ] ++ [ - ( createFirefoxUser "ff" [ "audio" ] [ pkgs.firefox ] ) + ( createFirefoxUser "ff" [ "audio" ] [ ] ) ( createChromiumUser "cr" [ "audio" ] [ pkgs.chromium ] ) ( createChromiumUser "fb" [ ] [ pkgs.chromium ] ) ( createChromiumUser "gm" [ ] [ pkgs.chromium ] ) -- cgit v1.2.3 From b6383dba83a2e9ec6ada40fb780c15a56c8d715e Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Sep 2015 20:04:28 +0200 Subject: lass 2 base: bump nixpkgs rev --- lass/2configs/base.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 7c4835461..6cdeab1b9 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -44,7 +44,7 @@ with lib; exim-retiolum.enable = true; build.deps.nixpkgs = { url = https://github.com/Lassulus/nixpkgs; - rev = "e74d0e7ff83c16846a81e1173543f180ad565076"; + rev = "68bd8e4a9dc247726ae89cc8739574261718e328"; }; }; -- cgit v1.2.3 From a6812b4440e095287b6f2228a78b65c7629866de Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Sep 2015 11:55:39 +0200 Subject: lass: make compatible with new krebs.build --- lass/2configs/base.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 6cdeab1b9..46435649b 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -42,9 +42,11 @@ with lib; enable = true; search-domain = "retiolum"; exim-retiolum.enable = true; - build.deps.nixpkgs = { - url = https://github.com/Lassulus/nixpkgs; - rev = "68bd8e4a9dc247726ae89cc8739574261718e328"; + build.source = { + git.nixpkgs = { + url = https://github.com/Lassulus/nixpkgs; + rev = "68bd8e4a9dc247726ae89cc8739574261718e328"; + }; }; }; -- cgit v1.2.3 From 611ff367cf3d057e78ed3112416073b1f48c6aef Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Sep 2015 11:56:01 +0200 Subject: lass 2 base: add get to pkgs --- lass/2configs/base.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 46435649b..948b54d8d 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -75,6 +75,8 @@ with lib; most rxvt_unicode.terminfo + get + #network iptables ]; -- cgit v1.2.3 From 4d8408aa5a119d9d99c94950d829ab99fab748dc Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Sep 2015 15:18:31 +0200 Subject: lass: install get only on mors --- lass/2configs/base.nix | 2 -- 1 file changed, 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 948b54d8d..46435649b 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -75,8 +75,6 @@ with lib; most rxvt_unicode.terminfo - get - #network iptables ]; -- cgit v1.2.3 From a34de6743a44760d21589d4e1a154ccc5c621420 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Sep 2015 15:20:13 +0200 Subject: lass 2 retiolum: connect to echelon --- lass/2configs/retiolum.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/retiolum.nix b/lass/2configs/retiolum.nix index 17cd1d822..d7df15027 100644 --- a/lass/2configs/retiolum.nix +++ b/lass/2configs/retiolum.nix @@ -21,6 +21,7 @@ connectTo = [ "fastpoke" "cloudkrebs" + "echelon" "pigstarter" "gum" "flap" -- cgit v1.2.3