diff options
Diffstat (limited to 'lass')
-rw-r--r-- | lass/1systems/helios/config.nix | 1 | ||||
-rw-r--r-- | lass/1systems/mors/config.nix | 2 | ||||
-rw-r--r-- | lass/2configs/baseX.nix | 30 | ||||
-rw-r--r-- | lass/2configs/copyq.nix | 7 | ||||
-rw-r--r-- | lass/2configs/games.nix | 4 | ||||
-rw-r--r-- | lass/2configs/git.nix | 4 | ||||
-rw-r--r-- | lass/2configs/mail.nix | 34 | ||||
-rw-r--r-- | lass/2configs/radio.nix | 1 | ||||
-rw-r--r-- | lass/2configs/zsh.nix | 74 | ||||
-rw-r--r-- | lass/source.nix | 5 |
10 files changed, 103 insertions, 59 deletions
diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index fc30a3478..f53e93f26 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -131,7 +131,6 @@ with import <stockholm/lib>; services.xserver.displayManager.sessionCommands = '' ${pkgs.xorg.xrandr}/bin/xrandr --output DP-6 --off --output DP-5 --off --output DP-4 --mode 2560x1440 --pos 3840x0 --rotate left --output DP-3 --off --output DP-2 --primary --mode 3840x2160 --pos 0x400 --rotate normal --output DP-1 --off --output DP-0 --mode 2560x1440 --pos 5280x1120 --rotate normal - ${pkgs.systemd}/bin/systemctl start xresources.service ''; networking.hostName = lib.mkForce "BLN02NB0162"; diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index c231a0b10..936666a73 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -192,7 +192,7 @@ with import <stockholm/lib>; ''; }; - #nix.package = pkgs.nixUnstable; + nix.package = pkgs.nixUnstable; programs.adb.enable = true; users.users.mainUser.extraGroups = [ "adbusers" ]; } diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 65e8f15a4..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; @@ -106,15 +107,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; } 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"; }; }; } 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 + ]; }; }; diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 4a2199b39..1fe87c666 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -81,7 +81,7 @@ let server = "irc.r"; verbose = config.krebs.build.host.name == "prism"; # TODO define branches in some kind of option per repo - branches = [ "master" "staging*" ]; + branches = [ "master" ]; }; }; }; @@ -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*" ]; }; diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 962efaf3f..7c58e8c5f 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -1,3 +1,4 @@ +with import <stockholm/lib>; { pkgs, ... }: let @@ -19,6 +20,14 @@ let text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput; ''; + 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 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}") (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"\ + "Sent" "notmuch://?query=tag:sent"\ + "Junk" "notmuch://?query=tag:junk" tag-transforms "junk" "k" \ "unread" "u" \ 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"; diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index 728c0cc0d..add30fbf1 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} @@ -69,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 @@ -98,27 +82,59 @@ 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 - PROMPT="$error$username%~ " + 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.users.mainUser.shell = "/run/current-system/sw/bin/zsh"; - users.users.root.shell = "/run/current-system/sw/bin/zsh"; + environment.shellAliases.ns = "nix-shell --command zsh"; + + users.defaultUserShell = "/run/current-system/sw/bin/zsh"; } diff --git a/lass/source.nix b/lass/source.nix index 8ca3fe3c0..e3332c5de 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -8,10 +8,7 @@ in evalSource (toString _file) [ { nixos-config.symlink = "stockholm/lass/1systems/${name}/config.nix"; - nixpkgs.git = { - url = https://github.com/nixos/nixpkgs; - ref = "92d088e"; - }; + nixpkgs = (import <stockholm/krebs/source.nix> host).nixpkgs; secrets = getAttr builder { buildbot.file = toString <stockholm/lass/2configs/tests/dummy-secrets>; lass.pass = { |