From 291a3347e9baedd35baf855e58dc98caef066d69 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:02:38 +0100 Subject: l: add minecraft.nix --- lass/2configs/minecraft.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lass/2configs/minecraft.nix (limited to 'lass/2configs') diff --git a/lass/2configs/minecraft.nix b/lass/2configs/minecraft.nix new file mode 100644 index 000000000..aa33dcccc --- /dev/null +++ b/lass/2configs/minecraft.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + users.users = { + mc = { + name = "mc"; + description = "user playing mc"; + home = "/home/mc"; + createHome = true; + useDefaultShell = true; + packages = with pkgs; [ + tmux + ]; + }; + }; + krebs.per-user.mc.packages = [ pkgs.jdk ]; + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-p tcp --dport 25565"; target = "ACCEPT"; } + { predicate = "-p udp --dport 25565"; target = "ACCEPT"; } + ]; +} -- cgit v1.2.3 From 07ba3cde29849f10d1a78db65d56632aeee1790c Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:06:04 +0100 Subject: l: add taskwarrior to pkgs --- lass/2configs/baseX.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 59ea0ecb7..65e8f15a4 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -85,6 +85,8 @@ in { screengrab slock sxiv + timewarrior + taskwarrior termite xclip xorg.xbacklight -- cgit v1.2.3 From 0b4ce5878640d222ab28d269acc36429ae20b7d0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:06:52 +0100 Subject: l browsers: use precedence --- lass/2configs/browsers.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix index 9459cfd6f..8d57f1148 100644 --- a/lass/2configs/browsers.nix +++ b/lass/2configs/browsers.nix @@ -35,7 +35,10 @@ let useDefaultShell = true; createHome = true; }; - lass.browser.paths.${name}.path = bin; + lass.browser.paths.${name} = { + path = bin; + inherit precedence; + }; security.sudo.extraConfig = '' ${mainUser.name} ALL=(${name}) NOPASSWD: ALL ''; -- cgit v1.2.3 From c23738db3730c61ee2487a0dc1a1f48be6dd1db2 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:07:08 +0100 Subject: l browsers: preconfigure chromium --- lass/2configs/browsers.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix index 8d57f1148..d04c56365 100644 --- a/lass/2configs/browsers.nix +++ b/lass/2configs/browsers.nix @@ -83,6 +83,14 @@ in { browser-select ]; + programs.chromium = { + enable = true; + extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin + "dbepggeogbaibhgnhhndojpepiihcmeb" # vimium + ]; + }; + imports = [ { options.lass.browser.select = mkOption { -- cgit v1.2.3 From 59f3f4257d58e8ff28a37a0167bd69acd83397e9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:07:29 +0100 Subject: l browsers: add fin --- lass/2configs/browsers.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix index d04c56365..cbbd54b6b 100644 --- a/lass/2configs/browsers.nix +++ b/lass/2configs/browsers.nix @@ -113,8 +113,9 @@ in { ( createFirefoxUser "ff" [ "audio" ] 10 ) ( createChromiumUser "cr" [ "video" "audio" ] 9 ) ( createChromiumUser "gm" [ "video" "audio" ] 8 ) - ( createChromiumUser "wk" [ "video" "audio" ] ) - ( createChromiumUser "fb" [ "video" "audio" ] ) - ( createChromiumUser "com" [ "video" "audio" ] ) + ( createChromiumUser "wk" [ "video" "audio" ] 0 ) + ( createChromiumUser "fb" [ "video" "audio" ] 0 ) + ( createChromiumUser "com" [ "video" "audio" ] 0 ) + ( createChromiumUser "fin" [] (-1) ) ]; } -- cgit v1.2.3 From dd03ce2e9e4a5a66c9259537e976bed5f6305c7a Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:08:01 +0100 Subject: l: add zsh --- lass/2configs/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index c68aee330..5a5f1b347 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -2,11 +2,12 @@ with import ; { config, pkgs, ... }: { imports = [ - ../2configs/binary-cache/client.nix - ../2configs/gc.nix - ../2configs/mc.nix - ../2configs/vim.nix - ../2configs/monitoring/client.nix + ./binary-cache/client.nix + ./gc.nix + ./mc.nix + ./vim.nix + ./monitoring/client.nix + ./zsh.nix ./htop.nix ./backups.nix ./security-workarounds.nix -- cgit v1.2.3 From b49137cac3597800a4ccd108f8b65aa77de64e0c Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:08:55 +0100 Subject: l: add more emails --- lass/2configs/exim-smarthost.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix index 94191fcb7..0219f5216 100644 --- a/lass/2configs/exim-smarthost.nix +++ b/lass/2configs/exim-smarthost.nix @@ -54,6 +54,11 @@ with import ; { from = "bitstamp@lassul.us"; to = lass.mail; } { from = "bitcoin.de@lassul.us"; to = lass.mail; } { from = "ableton@lassul.us"; to = lass.mail; } + { from = "dhl@lassul.us"; to = lass.mail; } + { from = "sipgate@lassul.us"; to = lass.mail; } + { from = "coinexchange@lassul.us"; to = lass.mail; } + { from = "verwaltung@lassul.us"; to = lass.mail; } + { from = "gearbest@lassul.us"; to = lass.mail; } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; } -- cgit v1.2.3 From a3751cdb4731ff238d02e1e0e84bbe8aaa9217ac Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:09:46 +0100 Subject: l zsh: cleanup --- lass/2configs/zsh.nix | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index 4d33aa79d..728c0cc0d 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -7,10 +7,8 @@ zsh-newuser-install() { :; } ''; interactiveShellInit = '' - #unsetopt nomatch setopt autocd extendedglob bindkey -e - zstyle :compinstall filename '/home/lass/.zshrc' #history magic bindkey "" up-line-or-local-history @@ -40,7 +38,6 @@ bindkey "^X^E" edit-command-line #completion magic - fpath=(~/.zsh/completions $fpath) autoload -Uz compinit compinit zstyle ':completion:*' menu select @@ -48,14 +45,18 @@ #enable automatic rehashing of $PATH zstyle ':completion:*' rehash true - - #eval $( dircolors -b ~/.LS_COLORS ) + eval $(dircolors -b ${pkgs.fetchFromGitHub { + owner = "trapd00r"; + repo = "LS_COLORS"; + rev = "master"; + sha256="05lh5w3bgj9h8d8lrbbwbzw8788709cnzzkl8yh7m1dawkpf6nlp"; + }}/LS_COLORS) # 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} + # zstyle ':completion:*:default' list-colors ''${(s.:.)LS_COLORS} #emacs bindings bindkey "[7~" beginning-of-line @@ -66,24 +67,24 @@ #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" + if test -n "$SSH_CLIENT"; then + echo -ne "\033]0;$$ $USER@$HOST $PWD\007" + else + echo -ne "\033]0;$$ $USER@$PWD\007" + fi } - # 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" + if test -n "$SSH_CLIENT"; then + echo -ne "\033]0;$$ $USER@$HOST $PWD $1\007" + else + echo -ne "\033]0;$$ $USER@$PWD $1\007" + fi } ;; esac @@ -119,4 +120,5 @@ ''; }; users.users.mainUser.shell = "/run/current-system/sw/bin/zsh"; + users.users.root.shell = "/run/current-system/sw/bin/zsh"; } -- cgit v1.2.3 From 7c613786d106d6254d16cc4312128ebc5a040567 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 20:58:10 +0100 Subject: l git: don't show verbose git log --- lass/2configs/git.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 4a2199b39..59c0f5220 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -79,7 +79,7 @@ let nick = config.krebs.build.host.name; channel = "#xxx"; server = "irc.r"; - verbose = config.krebs.build.host.name == "prism"; + verbose = false; # TODO define branches in some kind of option per repo branches = [ "master" "staging*" ]; }; @@ -100,7 +100,7 @@ let nick = config.krebs.build.host.name; channel = "#xxx"; server = "irc.r"; - verbose = true; + verbose = false; # TODO define branches in some kind of option per repo branches = [ "master" "staging*" ]; }; -- cgit v1.2.3 From 44cdb9227eea5c0d80d78fa8140884ae61f989c5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Jan 2018 19:38:56 +0100 Subject: l baseX: run xmonad as user service --- lass/2configs/baseX.nix | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 65e8f15a4..5cb7eb03f 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -106,15 +106,40 @@ in { xlibs.fontschumachermisc ]; - lass.xserver.enable = true; + #lass.xserver.enable = true; services.xserver = { + enable = true; layout = "us"; + display = mkForce 0; xkbModel = "evdev"; xkbVariant = "altgr-intl"; xkbOptions = "caps:backspace"; + displayManager.lightdm.enable = true; + windowManager.default = "xmonad"; + windowManager.session = [{ + name = "xmonad"; + start = '' + ${pkgs.xorg.xhost}/bin/xhost +LOCAL: + ${pkgs.coreutils}/bin/sleep infinity + ''; + }]; + }; + + systemd.user.services.xmonad = { + wantedBy = [ "graphical-session.target" ]; + environment = { + DISPLAY = ":${toString config.services.xserver.display}"; + RXVT_SOCKET = "%t/urxvtd-socket"; + XMONAD_DATA_DIR = "/tmp"; + }; + serviceConfig = { + SyslogIdentifier = "xmonad"; + ExecStart = "${pkgs.xmonad-lass}/bin/xmonad"; + ExecStop = "${pkgs.xmonad-lass}/bin/xmonad --shutdown"; + }; + restartIfChanged = false; }; - services.urxvtd.enable = true; krebs.xresources.enable = true; lass.screenlock.enable = true; } -- cgit v1.2.3 From 4e9870e45a9e11f5008ee6c6abf260a96cfb21c0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Jan 2018 19:39:50 +0100 Subject: l copyq: run as user service --- lass/2configs/copyq.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/copyq.nix b/lass/2configs/copyq.nix index cd10313fc..56c091a6e 100644 --- a/lass/2configs/copyq.nix +++ b/lass/2configs/copyq.nix @@ -19,9 +19,9 @@ let ${pkgs.copyq}/bin/copyq config text_wrap true ''; in { - systemd.services.copyq = { - wantedBy = [ "multi-user.target" ]; - requires = [ "xserver.service" ]; + systemd.user.services.copyq = { + wantedBy = [ "graphical-session.target" ]; + requires = [ "xmonad.service" ]; environment = { DISPLAY = ":${toString config.services.xserver.display}"; }; @@ -35,7 +35,6 @@ in { Restart = "always"; RestartSec = "15s"; StartLimitBurst = 0; - User = "lass"; }; }; } -- cgit v1.2.3 From 26db462bb278d01d42f052e8c3207cd515dee98e Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Jan 2018 23:53:33 +0100 Subject: l zsh: add fzf --- lass/2configs/zsh.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index 728c0cc0d..7b0ef79f3 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -1,5 +1,6 @@ { config, lib, pkgs, ... }: { + environment.systemPackages = [ pkgs.fzf ]; programs.zsh = { enable = true; shellInit = '' @@ -37,6 +38,10 @@ 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 @@ -52,8 +57,6 @@ sha256="05lh5w3bgj9h8d8lrbbwbzw8788709cnzzkl8yh7m1dawkpf6nlp"; }}/LS_COLORS) - # 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} -- cgit v1.2.3 From 2398bc71ee5cf5fc8a28eae825792bc5c14ab4ca Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 20 Jan 2018 12:49:37 +0100 Subject: l radio: force play regularly --- lass/2configs/radio.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 7f531bf3a..a83d51f1d 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -118,6 +118,7 @@ in { if test $(timeLeft) -le $LIMIT; then ${add_random}/bin/add_random fi + ${pkgs.mpc_cli}/bin/mpc play > /dev/null ''; in { description = "radio playlist autoadder"; -- cgit v1.2.3 From 3bd62207d4b60db4ca5f89bb84dc842b62bdfbaf Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 20 Jan 2018 13:03:51 +0100 Subject: l: set ssh agentTimeout to 10m --- lass/2configs/baseX.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 5cb7eb03f..5ca024574 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -53,6 +53,7 @@ in { time.timeZone = "Europe/Berlin"; + programs.ssh.agentTimeout = "10m"; programs.ssh.startAgent = true; services.openssh.forwardX11 = true; -- cgit v1.2.3 From 697b202e25d9c738e6d5ebf265f1005520cfb1ac Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 22 Jan 2018 18:05:43 +0100 Subject: l zsh: use zsh in nix-shell & better prompt --- lass/2configs/zsh.nix | 64 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 25 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index 7b0ef79f3..f2c32ba26 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -72,25 +72,6 @@ alias la='ls -la' #fancy window title magic - case $TERM in - (*xterm* | *rxvt*) - function precmd { - if test -n "$SSH_CLIENT"; then - echo -ne "\033]0;$$ $USER@$HOST $PWD\007" - else - echo -ne "\033]0;$$ $USER@$PWD\007" - fi - } - # This is seen while the shell waits for a command to complete. - function preexec { - if test -n "$SSH_CLIENT"; then - echo -ne "\033]0;$$ $USER@$HOST $PWD $1\007" - else - echo -ne "\033]0;$$ $USER@$PWD $1\007" - fi - } - ;; - esac ''; promptInit = '' # TODO: figure out why we need to set this here @@ -101,27 +82,60 @@ autoload -U promptinit promptinit - error='%(?..%F{red}%?%f )' + p_error='%(?..%F{red}%?%f )' + t_error='%(?..%? )' case $UID in 0) - username='%F{red}root%f ' + p_username='%F{red}root%f' + t_username='root' ;; 1337) - username="" + p_username="" + t_username="" ;; *) - username='%F{blue}%n%f ' + p_username='%F{blue}%n%f' + t_username='%n' ;; esac if test -n "$SSH_CLIENT"; then - PROMPT="$error$username@%F{magenta}%M%f %~ " + 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 - PROMPT="$error$username%~ " + 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 ''; }; + environment.shellAliases.ns = "nix-shell --command zsh"; + users.users.mainUser.shell = "/run/current-system/sw/bin/zsh"; users.users.root.shell = "/run/current-system/sw/bin/zsh"; } -- cgit v1.2.3 From 31fc8a8e2e8109eb2b262e907014cdacf58ed9cf Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Jan 2018 20:00:14 +0100 Subject: l git: show diff of prism/master --- lass/2configs/git.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 59c0f5220..1fe87c666 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -79,9 +79,9 @@ let nick = config.krebs.build.host.name; channel = "#xxx"; server = "irc.r"; - verbose = false; + verbose = config.krebs.build.host.name == "prism"; # TODO define branches in some kind of option per repo - branches = [ "master" "staging*" ]; + branches = [ "master" ]; }; }; }; -- cgit v1.2.3 From 7368b6a9dace5de4a798100066b3583faabb6f7b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Jan 2018 23:21:47 +0100 Subject: l mail: template with nix --- lass/2configs/mail.nix | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 962efaf3f..a26f3fcbb 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -1,3 +1,4 @@ +with import ; { pkgs, ... }: let @@ -19,6 +20,14 @@ let text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput; ''; + inboxes = [ + { l = "wireguard"; q = [ "wireguard@lists.zx2c4" ]; } + { l = "c-base"; q = [ "c-base.org" ]; } + { l = "security"; q = [ "seclists.org" "security" "bugtraq" ]; } + { l = "nix-devel"; q = [ "nix-devel@googlegroups.com" ]; } + { l = "shack"; q = [ "shackspace.de" ]; } + ]; + muttrc = pkgs.writeText "muttrc" '' # gpg source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc @@ -72,22 +81,15 @@ let ''} %r |" virtual-mailboxes \ - "Unread" "notmuch://?query=tag:unread"\ - "INBOX" "notmuch://?query=tag:inbox \ - and NOT to:nix-devel\ - and NOT to:shackspace\ - and NOT to:security\ - and NOT to:c-base" \ - "shack" "notmuch://?query=to:shackspace"\ - "c-base" "notmuch://?query=to:c-base"\ - "security" "notmuch://?query=to:securityfocus or from:security-alert@hpe.com"\ - "nix" "notmuch://?query=to:nix-devel"\ - "radio" "notmuch://?query=to:radio or tag:radio"\ - "TODO" "notmuch://?query=tag:TODO"\ - "Starred" "notmuch://?query=tag:*"\ - "Archive" "notmuch://?query=tag:archive"\ - "Sent" "notmuch://?query=tag:sent"\ - "Junk" "notmuch://?query=tag:junk" + "Unread" "notmuch://?query=tag:unread"\ + "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT to:${f}") (concatMap (l: l.q) inboxes)}"\ + ${concatMapStringsSep "\n" (i: ''${" "}"${i.l}" "notmuch://?query=${concatMapStringsSep " or " (f: "to:${f}") i.q}"\'') inboxes} + "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT to:${f}") (concatMap (l: l.q) inboxes)}"\ + "TODO" "notmuch://?query=tag:TODO"\ + "Starred" "notmuch://?query=tag:*"\ + "Archive" "notmuch://?query=tag:archive"\ + "Sent" "notmuch://?query=tag:sent"\ + "Junk" "notmuch://?query=tag:junk" tag-transforms "junk" "k" \ "unread" "u" \ -- cgit v1.2.3 From 22c6aff64698eec5231a9c43b4fb3642d2b97f97 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Jan 2018 23:41:16 +0100 Subject: l mail: use attrSets --- lass/2configs/mail.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index a26f3fcbb..7c58e8c5f 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -20,13 +20,13 @@ let text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput; ''; - inboxes = [ - { l = "wireguard"; q = [ "wireguard@lists.zx2c4" ]; } - { l = "c-base"; q = [ "c-base.org" ]; } - { l = "security"; q = [ "seclists.org" "security" "bugtraq" ]; } - { l = "nix-devel"; q = [ "nix-devel@googlegroups.com" ]; } - { l = "shack"; q = [ "shackspace.de" ]; } - ]; + mailboxes = { + wireguard = [ "wireguard@lists.zx2c4" ]; + c-base = [ "c-base.org" ]; + security = [ "seclists.org" "security" "bugtraq" ]; + nix-devel = [ "nix-devel@googlegroups.com" ]; + shack = [ "shackspace.de" ]; + }; muttrc = pkgs.writeText "muttrc" '' # gpg @@ -82,9 +82,9 @@ let virtual-mailboxes \ "Unread" "notmuch://?query=tag:unread"\ - "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT to:${f}") (concatMap (l: l.q) inboxes)}"\ - ${concatMapStringsSep "\n" (i: ''${" "}"${i.l}" "notmuch://?query=${concatMapStringsSep " or " (f: "to:${f}") i.q}"\'') inboxes} - "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT to:${f}") (concatMap (l: l.q) inboxes)}"\ + "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT to:${f}") (flatten (attrValues mailboxes))}"\ + ${concatMapStringsSep "\n" (i: ''${" "}"${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "to:${f}") i.value}"\'') (mapAttrsToList nameValuePair mailboxes)} + "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT to:${f}") (flatten (attrValues mailboxes))}"\ "TODO" "notmuch://?query=tag:TODO"\ "Starred" "notmuch://?query=tag:*"\ "Archive" "notmuch://?query=tag:archive"\ -- cgit v1.2.3 From 7b49153a48924274a9174002e766b9f56b532ba2 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 30 Jan 2018 18:15:57 +0100 Subject: l zsh: set as default shell for everyone --- lass/2configs/zsh.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index f2c32ba26..add30fbf1 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -136,6 +136,5 @@ }; environment.shellAliases.ns = "nix-shell --command zsh"; - users.users.mainUser.shell = "/run/current-system/sw/bin/zsh"; - users.users.root.shell = "/run/current-system/sw/bin/zsh"; + users.defaultUserShell = "/run/current-system/sw/bin/zsh"; } -- cgit v1.2.3 From ffc294575cb59585c3bfb6b85fa45fb69cdf1d41 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 30 Jan 2018 19:05:10 +0100 Subject: init ftb --- lass/2configs/games.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/games.nix b/lass/2configs/games.nix index 6cea271c1..50362cda4 100644 --- a/lass/2configs/games.nix +++ b/lass/2configs/games.nix @@ -73,6 +73,10 @@ in { extraGroups = [ "audio" "video" "input" "loot" ]; createHome = true; useDefaultShell = true; + packages = with pkgs; [ + ftb + minecraft + ]; }; }; -- cgit v1.2.3