From 64b06a2a0c09f5e57f65bcbf1494c856b58666c3 Mon Sep 17 00:00:00 2001 From: nin Date: Wed, 3 Jan 2018 19:53:35 +0100 Subject: nin axon: add ableton --- nin/1systems/axon/config.nix | 4 ++++ nin/2configs/ableton.nix | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 nin/2configs/ableton.nix diff --git a/nin/1systems/axon/config.nix b/nin/1systems/axon/config.nix index c5f38c1f..483a4f84 100644 --- a/nin/1systems/axon/config.nix +++ b/nin/1systems/axon/config.nix @@ -11,6 +11,7 @@ with lib; #../2configs/copyq.nix + @@ -98,6 +99,9 @@ with lib; enable = true; }; + services.xserver.displayManager.sessionCommands = '' + ${pkgs.xorg.xhost}/bin/xhost + local: + ''; services.xserver.desktopManager.xfce = let xbindConfig = pkgs.writeText "xbindkeysrc" '' diff --git a/nin/2configs/ableton.nix b/nin/2configs/ableton.nix new file mode 100644 index 00000000..343a9089 --- /dev/null +++ b/nin/2configs/ableton.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: let + mainUser = config.users.extraUsers.nin; +in { + users.users= { + ableton = { + isNormalUser = true; + extraGroups = [ + "audio" + "video" + ]; + packages = [ + pkgs.wine + pkgs.winetricks + ]; + }; + }; + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(ableton) NOPASSWD: ALL + ''; +} -- cgit v1.2.3 From 3ba905f2b0cff91cdeaa46c3eaed34d4bfc01215 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 29 Jan 2018 14:45:26 +0100 Subject: ma wbob-kiosk: provide chromium --- makefu/2configs/gui/wbob-kiosk.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makefu/2configs/gui/wbob-kiosk.nix b/makefu/2configs/gui/wbob-kiosk.nix index 4b7a0c33..7db74922 100644 --- a/makefu/2configs/gui/wbob-kiosk.nix +++ b/makefu/2configs/gui/wbob-kiosk.nix @@ -1,11 +1,13 @@ -{ lib, ... }: +{ pkgs, lib, ... }: { imports = [ ./base.nix ]; + users.users.makefu.packages = [ pkgs.chromium ]; services.xserver = { layout = lib.mkForce "de"; + xkbVariant = lib.mkForce ""; windowManager = lib.mkForce { awesome.enable = false; @@ -16,7 +18,7 @@ # xrandrHeads = [ "HDMI1" "HDMI2" ]; # prevent screen from turning off, disable dpms displayManager.sessionCommands = '' - xset s off -dpms + xset -display :0 s off -dpms xrandr --output HDMI2 --right-of HDMI1 ''; }; -- cgit v1.2.3 From 71397b0aa5f27b0b6dbe22101287f60b237e32f0 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 29 Jan 2018 14:47:00 +0100 Subject: ma wbob.r: enable mpd via bluetooth --- makefu/1systems/wbob/config.nix | 126 ++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index f44211b9..6434ba27 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -18,7 +18,7 @@ in { - # + @@ -31,6 +31,63 @@ in { # Services + (let + musicDirectory = "/data/music"; + in { + services.mpd = { + enable = true; + inherit musicDirectory; + # dataDir = "/home/anders/.mpd"; + network.listenAddress = "any"; + extraConfig = '' + audio_output { + type "pulse" + name "Local MPD" + server "127.0.0.1" + } + ''; + }; + # open because of truestedInterfaces + # networking.firewall.allowedTCPPorts = [ 6600 4713 ]; + services.samba.shares.music = { + path = musicDirectory; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "yes"; + }; + + sound.enable = true; + hardware.pulseaudio = { + enable = true; + package = pkgs.pulseaudioFull; + # systemWide = true; + support32Bit = true; + zeroconf.discovery.enable = true; + zeroconf.publish.enable = true; + tcp = { + enable = true; + anonymousClients.allowAll = true; + anonymousClients.allowedIpRanges = [ "127.0.0.1" "192.168.8.0/24" ]; + }; + configFile = pkgs.writeText "default.pa" '' + load-module module-udev-detect + load-module module-bluetooth-policy + load-module module-bluetooth-discover + load-module module-native-protocol-unix + load-module module-always-sink + load-module module-console-kit + load-module module-systemd-login + load-module module-intended-roles + load-module module-position-event-sounds + load-module module-filter-heuristics + load-module module-filter-apply + load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 + load-module module-switch-on-connect + ''; + }; + # connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio + hardware.bluetooth.enable = true; + }) # Sensors @@ -147,7 +204,10 @@ in { boot.loader.grub.device = rootdisk; hardware.cpu.intel.updateMicrocode = true; boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.kernelModules = [ "kvm-intel" ]; + + boot.kernelModules = [ "kvm-intel" + "snd-seq" "snd-rawmidi" + ]; fileSystems = { "/" = { device = rootdisk + "-part1"; @@ -174,66 +234,4 @@ in { serverAddress = "x.r"; }; }; - security.wrappers.fping = { - source = "${pkgs.fping}/bin/fping"; - setuid = true; - }; - services.smokeping = { - enable = true; - targetConfig = '' - probe = FPing - menu = Top - title = Network Latency Grapher - remark = Welcome to this SmokePing website. - - + network - menu = Net latency - title = Network latency (ICMP pings) - - ++ google - probe = FPing - host = google.de - ++ webde - probe = FPing - host = web.de - - + services - menu = Service latency - title = Service latency (DNS, HTTP) - - ++ HTTP - menu = HTTP latency - title = Service latency (HTTP) - - +++ webdeping - probe = EchoPingHttp - host = web.de - - +++ googwebping - probe = EchoPingHttp - host = google.de - - #+++ webwww - #probe = Curl - #host = web.de - - #+++ googwebwww - #probe = Curl - #host = google.de - ''; - probeConfig = '' - + FPing - binary = /run/wrappers/bin/fping - + EchoPingHttp - pings = 5 - url = / - - #+ Curl - ## probe-specific variables - #binary = ${pkgs.curl}/bin/curl - #step = 60 - ## a default for this target-specific variable - #urlformat = http://%host%/ - ''; - }; } -- cgit v1.2.3 From b31a37799eff274215d4cd9d435a9c16d496a88c Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 30 Jan 2018 08:11:00 +0100 Subject: ma pkgs.pfsshell: init --- makefu/5pkgs/pfsshell/default.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 makefu/5pkgs/pfsshell/default.nix diff --git a/makefu/5pkgs/pfsshell/default.nix b/makefu/5pkgs/pfsshell/default.nix new file mode 100644 index 00000000..fc6b3706 --- /dev/null +++ b/makefu/5pkgs/pfsshell/default.nix @@ -0,0 +1,27 @@ +{ stdenv, lib, pkgs, fetchurl,fetchFromGitHub, upx, wine }: +stdenv.mkDerivation rec { + pname = "pfsshell"; + version = "64f8c2"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "makefu"; + repo = "pfsshell"; + rev = version; + sha256 = "01lbqf8s91p8id58xa16fp555i03vfycqvhv7qzpnrjy6yvp9dm8"; + }; + + buildInputs = [ ]; + + makeFlags = [ ]; + + installPhase = '' + mkdir -p $out/bin + cp pfsshell $out/bin + ''; + + meta = { + homepage = https://github.com/uyjulian/pfsshell ; + description = "browse and transfer files to/from PFS filesystems"; + }; +} -- cgit v1.2.3 From 65eadae50972a5a4ad5a510ce1157d3c617fd757 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 09:25:22 +0100 Subject: j enklave +taskserver --- jeschli/1systems/enklave/config.nix | 10 ++++++++++ jeschli/1systems/enklave/taskserver.nix | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 jeschli/1systems/enklave/taskserver.nix diff --git a/jeschli/1systems/enklave/config.nix b/jeschli/1systems/enklave/config.nix index 76e71869..470566a8 100644 --- a/jeschli/1systems/enklave/config.nix +++ b/jeschli/1systems/enklave/config.nix @@ -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; diff --git a/jeschli/1systems/enklave/taskserver.nix b/jeschli/1systems/enklave/taskserver.nix new file mode 100644 index 00000000..23b235d7 --- /dev/null +++ b/jeschli/1systems/enklave/taskserver.nix @@ -0,0 +1,10 @@ + { + services.taskserver = { + enable = true; + fqdn = "enklave.r"; + listenHost = "::"; + listenPort = 53589; + organisations.lass.users = [ "jeschli" ]; + }; + networking.firewall.allowedTCPPorts = [ 53589 ]; + } -- cgit v1.2.3 From 3b23e6e8bbb42d0866b0d4d6c42f610510fa915c Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 09:38:47 +0100 Subject: j: +zsh --- jeschli/2configs/default.nix | 1 + jeschli/2configs/zsh.nix | 138 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 jeschli/2configs/zsh.nix diff --git a/jeschli/2configs/default.nix b/jeschli/2configs/default.nix index 0ac3708b..5aaabe24 100644 --- a/jeschli/2configs/default.nix +++ b/jeschli/2configs/default.nix @@ -4,6 +4,7 @@ with import ; imports = [ ./vim.nix ./retiolum.nix + ./zsh.nix { environment.variables = { diff --git a/jeschli/2configs/zsh.nix b/jeschli/2configs/zsh.nix new file mode 100644 index 00000000..be5b661b --- /dev/null +++ b/jeschli/2configs/zsh.nix @@ -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 "" up-line-or-local-history + bindkey "" 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"; +} -- cgit v1.2.3 From 8a78dd604d9e8334e3db65bb2384ad2a641a68c0 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 11:54:53 +0100 Subject: j bln: +stocki --- jeschli/1systems/bln/config.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 9c491c8a..c088dce7 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -36,7 +36,15 @@ 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.networkmanager.enable = true; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -55,11 +63,6 @@ # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget 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.systemPackages = with pkgs; [ # system helper -- cgit v1.2.3 From 52be338d64125398e363e6bfd52c35bccd08b885 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 11:55:14 +0100 Subject: j bln: +elm --- jeschli/1systems/bln/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index c088dce7..14cbb7ed 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -89,6 +89,7 @@ chromium google-chrome # programming languages + elmPackages.elm go gcc ghc -- cgit v1.2.3 From e5114f1bfb9f7f412236f05e15fb6023699c96d6 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 31 Jan 2018 11:56:05 +0100 Subject: j fontsize default 12; bln 20 --- jeschli/1systems/bln/config.nix | 5 ++-- jeschli/2configs/urxvt.nix | 65 ++++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 14cbb7ed..6893c656 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -3,16 +3,17 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, lib, pkgs, ... }: - +# bln config file { imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix # ./dcso-vpn.nix ]; - + jeschliFontSize = 20; # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2; diff --git a/jeschli/2configs/urxvt.nix b/jeschli/2configs/urxvt.nix index 69811eb0..01491874 100644 --- a/jeschli/2configs/urxvt.nix +++ b/jeschli/2configs/urxvt.nix @@ -1,34 +1,39 @@ { config, pkgs, ... }: with import ; - { - services.urxvtd.enable = true; - krebs.xresources.enable = true; - krebs.xresources.resources.urxvt = '' - *foreground: rgb:a8/a8/a8 - *background: rgb:00/00/00 - *faceName: DejaVu Sans Mono - *faceSize: 12 - *color0: rgb:00/00/00 - *color1: rgb:a8/00/00 - *color2: rgb:00/a8/00 - *color3: rgb:a8/54/00 - *color4: rgb:00/00/a8 - *color5: rgb:a8/00/a8 - *color6: rgb:00/a8/a8 - *color7: rgb:a8/a8/a8 - *color8: rgb:54/54/54 - *color9: rgb:fc/54/54 - *color10: rgb:54/fc/54 - *color11: rgb:fc/fc/54 - *color12: rgb:54/54/fc - *color13: rgb:fc/54/fc - *color14: rgb:54/fc/fc - *color15: rgb:fc/fc/fc - - URxvt*scrollBar: false - URxvt*urgentOnBell: true - URxvt*font: xft:DejaVu Sans Mono:pixelsize=12 - URXvt*faceSize: 12 - ''; + options.jeschliFontSize = mkOption { + type = types.int; + default = 12; + }; + config = { + services.urxvtd.enable = true; + krebs.xresources.enable = true; + krebs.xresources.resources.urxvt = '' + *foreground: rgb:a8/a8/a8 + *background: rgb:00/00/00 + *faceName: DejaVu Sans Mono + *faceSize: ${toString config.jeschliFontSize} + *color0: rgb:00/00/00 + *color1: rgb:a8/00/00 + *color2: rgb:00/a8/00 + *color3: rgb:a8/54/00 + *color4: rgb:26/8b/d2 + *color5: rgb:a8/00/a8 + *color6: rgb:00/a8/a8 + *color7: rgb:a8/a8/a8 + *color8: rgb:54/54/54 + *color9: rgb:fc/54/54 + *color10: rgb:54/fc/54 + *color11: rgb:fc/fc/54 + *color12: rgb:54/54/fc + *color13: rgb:fc/54/fc + *color14: rgb:54/fc/fc + *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} + ''; + }; } -- cgit v1.2.3 From 993437277c5ce501d3baaab2a9448ae1ee62d54d Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 2 Feb 2018 12:13:39 +0100 Subject: go: open port 80 --- krebs/2configs/go.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/2configs/go.nix b/krebs/2configs/go.nix index b7523387..f4c1290c 100644 --- a/krebs/2configs/go.nix +++ b/krebs/2configs/go.nix @@ -8,6 +8,7 @@ with import ; krebs.go = { enable = true; }; + networking.firewall.allowedTCPPorts = [ 80 ]; services.nginx = { enable = true; virtualHosts.go = { -- cgit v1.2.3 From ef3a0dcff538c850c25b46165ed70c899873bece Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Feb 2018 11:55:12 +0100 Subject: ma wvdial: rip --- makefu/1systems/x/config.nix | 3 +- makefu/2configs/hw/network-manager.nix | 37 ++++++++++++++++++ makefu/2configs/hw/wwan.nix | 8 ---- makefu/3modules/wvdial.nix | 71 ---------------------------------- 4 files changed, 39 insertions(+), 80 deletions(-) create mode 100644 makefu/2configs/hw/network-manager.nix delete mode 100644 makefu/2configs/hw/wwan.nix delete mode 100644 makefu/3modules/wvdial.nix diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index a32db91e..f3a1d488 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -59,8 +59,9 @@ with import ; # Hardware + # - + # diff --git a/makefu/2configs/hw/network-manager.nix b/makefu/2configs/hw/network-manager.nix new file mode 100644 index 00000000..7e29849b --- /dev/null +++ b/makefu/2configs/hw/network-manager.nix @@ -0,0 +1,37 @@ +{ pkgs, lib, ... }: +{ + users.users.makefu = { + extraGroups = [ "networkmanager" ]; + packages = with pkgs;[ + networkmanagerapplet + gnome3.gnome_keyring gnome3.dconf + ]; + }; + networking.wireless.enable = lib.mkForce false; + + systemd.services.modemmanager = { + description = "ModemManager"; + after = [ "network-manager.service" ]; + bindsTo = [ "network-manager.service" ]; + wantedBy = [ "network-manager.service" ]; + serviceConfig = { + ExecStart = "${pkgs.modemmanager}/bin/ModemManager"; + PrivateTmp = true; + Restart = "always"; + RestartSec = "5"; + }; + }; + networking.networkmanager.enable = true; + + # TODO: put somewhere else + services.xserver.displayManager.sessionCommands = '' + ${pkgs.clipit}/bin/clipit & + ${pkgs.networkmanagerapplet}/bin/nm-applet & + ''; + +# nixOSUnstable +# networking.networkmanager.wifi = { +# powersave = true; +# scanRandMacAddress = true; +# }; +} diff --git a/makefu/2configs/hw/wwan.nix b/makefu/2configs/hw/wwan.nix deleted file mode 100644 index 0eb0c97d..00000000 --- a/makefu/2configs/hw/wwan.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: - -{ - makefu.umts = { - enable = true; - modem-device = "/dev/serial/by-id/usb-Lenovo_H5321_gw_2D5A51BA0D3C3A90-if01"; - }; -} diff --git a/makefu/3modules/wvdial.nix b/makefu/3modules/wvdial.nix deleted file mode 100644 index 1ed929ed..00000000 --- a/makefu/3modules/wvdial.nix +++ /dev/null @@ -1,71 +0,0 @@ -# Global configuration for wvdial. - -{ config, lib, pkgs, ... }: - -with lib; - -let - - configFile = '' - [Dialer Defaults] - PPPD PATH = ${pkgs.ppp}/sbin/pppd - ${config.environment.wvdial.dialerDefaults} - ''; - - cfg = config.environment.wvdial; - -in -{ - ###### interface - - options = { - - environment.wvdial = { - - dialerDefaults = mkOption { - default = ""; - type = types.str; - example = ''Init1 = AT+CGDCONT=1,"IP","internet.t-mobile"''; - description = '' - Contents of the "Dialer Defaults" section of - /etc/wvdial.conf. - ''; - }; - - pppDefaults = mkOption { - default = '' - noipdefault - usepeerdns - defaultroute - persist - noauth - ''; - type = types.str; - description = "Default ppp settings for wvdial."; - }; - - }; - - }; - - ###### implementation - - config = mkIf (cfg.dialerDefaults != "") { - - environment = { - - etc = - [ - { source = pkgs.writeText "wvdial.conf" configFile; - target = "wvdial.conf"; - } - { source = pkgs.writeText "wvdial" cfg.pppDefaults; - target = "ppp/peers/wvdial"; - } - ]; - - }; - - }; - -} -- cgit v1.2.3 From 72f440fdb567b8000ec72aefa6d3e74734c11c9e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Feb 2018 11:56:36 +0100 Subject: ma omo.r: init google-muell --- makefu/1systems/omo/config.nix | 3 ++- makefu/2configs/deployment/google-muell.nix | 34 +++++++++++++++++++++++++++++ makefu/2configs/deployment/led-fader.nix | 20 +---------------- makefu/5pkgs/ampel/default.nix | 27 +++++++++++++++++++++++ 4 files changed, 64 insertions(+), 20 deletions(-) create mode 100644 makefu/2configs/deployment/google-muell.nix create mode 100644 makefu/5pkgs/ampel/default.nix diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index ce3ffbcf..1e087fef 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -19,7 +19,7 @@ let # __FRONT_ # |* d0 | # | | - # |* d3 | + # |* d1 | # | | # |* d3 | # | | @@ -68,6 +68,7 @@ in { + # security diff --git a/makefu/2configs/deployment/google-muell.nix b/makefu/2configs/deployment/google-muell.nix new file mode 100644 index 00000000..f23789ee --- /dev/null +++ b/makefu/2configs/deployment/google-muell.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, buildPythonPackage, ... }: +with import ; +let + pkg = pkgs.ampel; + home = "/var/lib/ampel"; + sec = "${toString }/google-muell.json"; + ampelsec = "${home}/google-muell.json"; + esp = "192.168.1.23"; + sleepval = "1800"; +in { + users.users.ampel = { + uid = genid "ampel"; + createHome = true; + isSystemUser = true; + inherit home; + }; + systemd.services.google-muell-ampel = { + description = "Send led change to rgb cubes"; + after = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = "ampel"; + ExecStartPre = pkgs.writeDash "copy-ampel-secrets" '' + cp ${sec} ${ampelsec} + chown ampel ${ampelsec} + ''; + ExecStart = "${pkg}/bin/google-muell --esp=${esp} --client-secrets=${ampelsec} --credential-path=${home}/google-muell-creds.json --sleepval=${sleepval}"; + PermissionsStartOnly = true; + Restart = "always"; + RestartSec = 10; + PrivateTmp = true; + }; + }; +} diff --git a/makefu/2configs/deployment/led-fader.nix b/makefu/2configs/deployment/led-fader.nix index 292b6679..d34b6612 100644 --- a/makefu/2configs/deployment/led-fader.nix +++ b/makefu/2configs/deployment/led-fader.nix @@ -2,25 +2,7 @@ let mq = "192.168.8.11"; - - pkg = pkgs.python3Packages.buildPythonPackage { - name = "ampel-master"; - - src = pkgs.fetchgit { - url = "http://cgit.euer.krebsco.de/ampel"; - rev = "531741b"; - sha256 = "110yij53jz074zbswylbzcd8jy7z49r9fg6i3j1gk2y3vl91g81c"; - }; - propagatedBuildInputs = with pkgs.python3Packages; [ - docopt - paho-mqtt - requests - pytz - influxdb - httplib2 - google_api_python_client - ]; - }; + pkg = pkgs.ampel; in { systemd.services.led-fader = { description = "Send led change to message queue"; diff --git a/makefu/5pkgs/ampel/default.nix b/makefu/5pkgs/ampel/default.nix new file mode 100644 index 00000000..86518b9b --- /dev/null +++ b/makefu/5pkgs/ampel/default.nix @@ -0,0 +1,27 @@ +{ lib, pkgs, fetchFromGitHub, ... }: + +with pkgs.python3Packages;buildPythonPackage rec { + name = "ampel-${version}"; + version = "0.2"; + + propagatedBuildInputs = [ + docopt + paho-mqtt + requests + pytz + influxdb + httplib2 + google_api_python_client + ]; + + src = pkgs.fetchgit { + url = "http://cgit.euer.krebsco.de/ampel"; + rev = "d8a0250"; + sha256 = "0n36lc17ca5db6pl6dswdqd5w9f881rfqck9yc4w33a5qpsxj85f"; + }; + meta = { + homepage = http://cgit.euer.krebsco.de/ampel; + description = "change colors of rgb cubes"; + license = lib.licenses.asl20; + }; +} -- cgit v1.2.3 From 083941f7dba4347084779b65cefa9b8cc9713939 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Feb 2018 11:57:58 +0100 Subject: ma gui/base: set packages only for mainuser --- makefu/2configs/gui/base.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/makefu/2configs/gui/base.nix b/makefu/2configs/gui/base.nix index daa0282b..861a9327 100644 --- a/makefu/2configs/gui/base.nix +++ b/makefu/2configs/gui/base.nix @@ -48,13 +48,14 @@ in fonts = [ pkgs.terminus_font ]; }; - environment.systemPackages = with pkgs;[ - pavucontrol - xlockmore - rxvt_unicode-with-plugins - firefox - ]; - users.extraUsers.${mainUser}.extraGroups = [ "audio" ]; + users.users.${mainUser} = { + extraGroups = [ "audio" ]; + packages = with pkgs;[ + pavucontrol + xlockmore + rxvt_unicode-with-plugins + ]; + }; hardware.pulseaudio = { enable = true; -- cgit v1.2.3 From c1b2f919572a485cafdc56af5d9e3240ac74469c Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Feb 2018 11:59:08 +0100 Subject: ma x.r: disable makefu.umts, cleanup --- makefu/1systems/x/config.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index f3a1d488..d5a9bdcf 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -83,13 +83,9 @@ with import ; makefu.server.primary-itf = "wlp3s0"; makefu.full-populate = true; - makefu.umts.apn = "web.vodafone.de"; nixpkgs.config.allowUnfree = true; - environment.systemPackages = [ pkgs.passwdqc-utils ]; - - # configure pulseAudio to provide a HDMI sink as well networking.firewall.enable = true; networking.firewall.allowedTCPPorts = [ 80 24800 26061 8000 3000 ]; @@ -101,8 +97,15 @@ with import ; krebs.tinc.retiolum.connectTo = [ "omo" "gum" "prism" ]; networking.extraHosts = '' - 192.168.1.11 omo.local + 192.168.1.11 omo.local ''; # hard dependency because otherwise the device will not be unlocked boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; allowDiscards=true; }]; + + nix.package = pkgs.nixUnstable; + environment.systemPackages = [ pkgs.passwdqc-utils pkgs.nixUnstable ]; + nixpkgs.overlays = [ (import ) ]; + + # environment.variables = { GOROOT = [ "${pkgs.go.out}/share/go" ]; }; + } -- cgit v1.2.3 From 4dfb5faaab57a69a5940e97feb4c8ed488d931f4 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Feb 2018 12:39:44 +0100 Subject: ma 3/umts: rip --- makefu/3modules/default.nix | 2 -- makefu/3modules/umts.nix | 84 --------------------------------------------- 2 files changed, 86 deletions(-) delete mode 100644 makefu/3modules/umts.nix diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index af0e81df..fa4eb827 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -14,8 +14,6 @@ _: ./snapraid.nix ./torrent.nix ./udpt.nix - ./umts.nix - ./wvdial.nix ]; } diff --git a/makefu/3modules/umts.nix b/makefu/3modules/umts.nix deleted file mode 100644 index 86669945..00000000 --- a/makefu/3modules/umts.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import ; - -let - nixpkgs-1509 = import (pkgs.fetchFromGitHub { - owner = "NixOS"; repo = "nixpkgs-channels"; - rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; - sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; - }) {}; - - wvdial = nixpkgs-1509.wvdial; # https://github.com/NixOS/nixpkgs/issues/16113 - - # TODO: currently it is only netzclub - umts-bin = pkgs.writeScriptBin "umts" '' - #!/bin/sh - set -euf - systemctl start umts - trap "systemctl stop umts;trap - INT TERM EXIT;exit" INT TERM EXIT - echo nameserver 8.8.8.8 | tee -a /etc/resolv.conf - journalctl -xfu umts - ''; - - wvdial-defaults = '' - Phone = *99***1# - Dial Command = ATDT - Modem = ${cfg.modem-device} - Baud = 460800 - Init1 = AT+CGDCONT=1,"IP","${config.makefu.umts.apn}","",0,0 - Init2 = ATZ - Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 - ISDN = 0 - Modem Type = Analog Modem - Username = netzclub - Password = netzclub - Stupid Mode = 1 - Idle Seconds = 0''; - - cfg = config.makefu.umts; - - out = { - options.makefu.umts = api; - config = lib.mkIf cfg.enable imp; - }; - - api = { - enable = mkEnableOption "umts"; - - modem-device = mkOption { - default = "/dev/ttyUSB0"; - type = types.str; - description = '' - path to modem device, use /dev/serial/by-id/... - to avoid race conditions. - ''; - }; - apn = mkOption { - default = "pinternet.interkom.de"; - type = types.str; - description = '' - apn to use for dailing - ''; - }; - }; - - imp = { - environment.shellAliases = { - umts = "sudo ${umts-bin}/bin/umts"; - }; - environment.systemPackages = [ ]; - - environment.wvdial.dialerDefaults = wvdial-defaults; - - systemd.services.umts = { - description = "UMTS wvdial Service"; - serviceConfig = { - Type = "simple"; - Restart = "always"; - RestartSec = "10s"; - ExecStart = "${wvdial}/bin/wvdial -n"; - }; - }; - }; -in out -- cgit v1.2.3 From e7418fbdf1bdddeeabe123c04bbd858fc70fe031 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Feb 2018 13:20:53 +0100 Subject: ma source: bump to 2018-02-06 --- makefu/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/source.nix b/makefu/source.nix index c22c82f3..f06c9454 100644 --- a/makefu/source.nix +++ b/makefu/source.nix @@ -13,7 +13,7 @@ let then "buildbot" else "makefu"; _file = + "/makefu/1systems/${name}/source.nix"; - ref = "0f19bee"; # nixos-17.09 @ 2018-01-05 + ref = "cd36b3d"; # nixos-17.09 @ 2018-02-06 # + do_sqlite3 ruby: 55a952be5b5 # + signal: 0f19beef3 -- cgit v1.2.3 From 34df8b33df0bd8071a628e27ad599d52f7fc61b8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 6 Feb 2018 23:11:36 +0100 Subject: ftb: minimize --- krebs/5pkgs/simple/ftb/default.nix | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/krebs/5pkgs/simple/ftb/default.nix b/krebs/5pkgs/simple/ftb/default.nix index 199c12b4..841e2ea0 100644 --- a/krebs/5pkgs/simple/ftb/default.nix +++ b/krebs/5pkgs/simple/ftb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeDesktopItem +{ stdenv, fetchurl , jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm , openjdk , mesa, openal @@ -7,23 +7,12 @@ with stdenv.lib; assert useAlsa -> alsaOss != null; -let - desktopItem = makeDesktopItem { - name = "minecraft"; - exec = "minecraft"; - icon = "minecraft"; - comment = "A sandbox-building game"; - desktopName = "Minecraft"; - genericName = "minecraft"; - categories = "Game;"; - }; - -in stdenv.mkDerivation { +stdenv.mkDerivation { name = "ftb"; src = fetchurl { url = "http://ftb.cursecdn.com/FTB2/launcher/FTB_Launcher.jar"; - sha256 = "10ga4jgyfsj5dy4rj2rla0fpnfpnxv8r3bmxpqpwn7fsry4il79v"; + sha256 = "0pyh83hhni97ryvz6yy8lyiagjrlx67cwr780s2bja92rxc1sqpj"; }; phases = "installPhase"; @@ -43,9 +32,6 @@ in stdenv.mkDerivation { chmod +x $out/bin/ftb - mkdir -p $out/share/applications - ln -s ${desktopItem}/share/applications/* $out/share/applications/ - ${openjdk}/bin/jar xf $out/ftb.jar favicon.png ''; } -- cgit v1.2.3 From 257f91eff3cf2ef01c25f4e88d186ea30dc250f7 Mon Sep 17 00:00:00 2001 From: jeschli Date: Wed, 7 Feb 2018 10:08:36 +0100 Subject: j vim: +trailing White detection; *cosmetics --- jeschli/2configs/vim.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index 7721b1d4..02ea95f6 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -27,6 +27,9 @@ in { name = "vim"; vimrcConfig.customRC = let colorscheme = ''colorscheme molokai''; + highlightTrailingWhiteSpaces = '' + au Syntax * syn match Garbage containedin=ALL /\s\+$/ + ''; setStatements = '' set autowrite set clipboard=unnamedplus @@ -74,11 +77,12 @@ in { ''; in '' ${colorscheme} + ${highlightTrailingWhiteSpaces} ${remapStatements} ${setStatements} ${settingsForElm} ${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 ''; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins; -- cgit v1.2.3 From 057d428ef53632cd8e6df7efd9ed5ca84c9a7b56 Mon Sep 17 00:00:00 2001 From: jeschli Date: Thu, 8 Feb 2018 11:20:24 +0100 Subject: j bln: +termite --- jeschli/1systems/bln/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 6893c656..8a3090a4 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -66,6 +66,7 @@ nixpkgs.config.allowUnfree = true; environment.variables = { GOROOT= [ "${pkgs.go.out}/share/go" ]; }; environment.systemPackages = with pkgs; [ + termite # system helper ag copyq -- cgit v1.2.3 From d5aa4524f478a29779b4219e1a8dea10fef74065 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 9 Feb 2018 09:23:14 +0100 Subject: nixpkgs: b222a07 -> b34a5f6 --- krebs/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/source.nix b/krebs/source.nix index fcc7fb74..60303c7c 100644 --- a/krebs/source.nix +++ b/krebs/source.nix @@ -18,7 +18,7 @@ in stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "b222a0713f4a689519686421b3fbf5ca0c9bd3da"; # nixos-17.09 @ 2018-01-23 + ref = "b34a5f6d874e3c3f3f7812371b858b79ddb5be35"; # nixos-17.09 @ 2018-02-09 }; } override -- cgit v1.2.3 From ab24f3c3a802eabef3f425d2b46e1b4ffc626e71 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 9 Feb 2018 15:11:24 +0100 Subject: j vim.nix: remap tt to GoTest --- jeschli/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index 02ea95f6..c13113f1 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -45,6 +45,7 @@ in { remapStatements = '' imap jk map gr :GoRun " Map gr to execute go run + map tt :GoTest " Map tt to execute go test map nf :NERDTreeToggle nnoremap nnoremap :bnext -- cgit v1.2.3 From 2f9edee631e353cb250cc1c10e015b7f4c14fb4f Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 9 Feb 2018 17:31:23 +0100 Subject: nixpkgs: b34a5f6 -> e18442d --- krebs/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/source.nix b/krebs/source.nix index 60303c7c..ca87b33f 100644 --- a/krebs/source.nix +++ b/krebs/source.nix @@ -18,7 +18,7 @@ in stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "b34a5f6d874e3c3f3f7812371b858b79ddb5be35"; # nixos-17.09 @ 2018-02-09 + ref = "e18442d46621ee7e1204db0b14025621a9d49cbd"; # nixos-17.09 @ 2018-02-09 }; } override -- cgit v1.2.3 From e155044112209e4a63b9c27ef100dc5d748a2e32 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 10 Feb 2018 12:30:26 +0100 Subject: nixpkgs: e18442d -> 2062ac5 --- krebs/source.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/source.nix b/krebs/source.nix index ca87b33f..27450c2a 100644 --- a/krebs/source.nix +++ b/krebs/source.nix @@ -18,7 +18,7 @@ in stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "e18442d46621ee7e1204db0b14025621a9d49cbd"; # nixos-17.09 @ 2018-02-09 + ref = "2062ac5aa2dc0770322272e3d2b647cf431dd893"; # nixos-17.09 @ 2018-02-09 }; } override -- cgit v1.2.3 From e000690cc2fa3b494cf3b44eb0213dda80b34e12 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 10 Feb 2018 16:07:18 +0100 Subject: hw x220: remove broken tp-smapi --- krebs/2configs/hw/x220.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/krebs/2configs/hw/x220.nix b/krebs/2configs/hw/x220.nix index 90a1a111..3780e0d7 100644 --- a/krebs/2configs/hw/x220.nix +++ b/krebs/2configs/hw/x220.nix @@ -14,7 +14,6 @@ with import ; boot = { kernelModules = [ "kvm-intel" "acpi_call" "tpm-rng" ]; - extraModulePackages = [ config.boot.kernelPackages.tp_smapi ]; kernelParams = [ "acpi_backlight=none" ]; }; -- cgit v1.2.3 From 06732ced01be5ba35e343439cc034c4fa60b8e6a Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 10 Feb 2018 19:46:08 +0100 Subject: exim: init at 4.90.1 --- krebs/5pkgs/simple/exim/default.nix | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 krebs/5pkgs/simple/exim/default.nix diff --git a/krebs/5pkgs/simple/exim/default.nix b/krebs/5pkgs/simple/exim/default.nix new file mode 100644 index 00000000..4911c1d9 --- /dev/null +++ b/krebs/5pkgs/simple/exim/default.nix @@ -0,0 +1,64 @@ +{ coreutils, fetchurl, db, openssl, pcre, perl, pkgconfig, stdenv }: + +stdenv.mkDerivation rec { + name = "exim-4.90.1"; + + src = fetchurl { + url = "http://ftp.exim.org/pub/exim/exim4/${name}.tar.xz"; + sha256 = "09ppq8l7cah6dcqwdvpa6r12i6fdcd9lvxlfp18mggj3438xz62w"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ coreutils db openssl pcre perl ]; + + preBuild = '' + sed ' + s:^\(BIN_DIRECTORY\)=.*:\1='"$out"'/bin: + s:^\(CONFIGURE_FILE\)=.*:\1=/etc/exim.conf: + s:^\(EXIM_USER\)=.*:\1=ref\:nobody: + s:^\(SPOOL_DIRECTORY\)=.*:\1=/exim-homeless-shelter: + s:^# \(SUPPORT_MAILDIR\)=.*:\1=yes: + s:^EXIM_MONITOR=.*$:# &: + s:^\(FIXED_NEVER_USERS\)=root$:\1=0: + s:^# \(WITH_CONTENT_SCAN\)=.*:\1=yes: + s:^# \(AUTH_PLAINTEXT\)=.*:\1=yes: + s:^# \(SUPPORT_TLS\)=.*:\1=yes: + s:^# \(USE_OPENSSL_PC=openssl\)$:\1: + s:^# \(LOG_FILE_PATH=syslog\)$:\1: + s:^# \(HAVE_IPV6=yes\)$:\1: + s:^# \(CHOWN_COMMAND\)=.*:\1=${coreutils}/bin/chown: + s:^# \(CHGRP_COMMAND\)=.*:\1=${coreutils}/bin/chgrp: + s:^# \(CHMOD_COMMAND\)=.*:\1=${coreutils}/bin/chmod: + s:^# \(MV_COMMAND\)=.*:\1=${coreutils}/bin/mv: + s:^# \(RM_COMMAND\)=.*:\1=${coreutils}/bin/rm: + s:^# \(TOUCH_COMMAND\)=.*:\1=${coreutils}/bin/touch: + s:^# \(PERL_COMMAND\)=.*:\1=${perl}/bin/perl: + #/^\s*#.*/d + #/^\s*$/d + ' < src/EDITME > Local/Makefile + ''; + + installPhase = '' + mkdir -p $out/bin $out/share/man/man8 + cp doc/exim.8 $out/share/man/man8 + + ( cd build-Linux-* + cp exicyclog exim_checkaccess exim_dumpdb exim_lock exim_tidydb \ + exipick exiqsumm exigrep exim_dbmbuild exim exim_fixdb eximstats \ + exinext exiqgrep exiwhat \ + $out/bin ) + + ( cd $out/bin + for i in mailq newaliases rmail rsmtp runq sendmail; do + ln -s exim $i + done ) + ''; + + meta = { + homepage = http://exim.org/; + description = "A mail transfer agent (MTA)"; + license = stdenv.lib.licenses.gpl3; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.tv ]; + }; +} -- cgit v1.2.3 From dbd48fdbf91672dc96992ee0b55ad1da226d4199 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 11 Feb 2018 16:08:28 +0100 Subject: ftb: add java workaround --- krebs/5pkgs/simple/ftb/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/5pkgs/simple/ftb/default.nix b/krebs/5pkgs/simple/ftb/default.nix index 841e2ea0..c2e83c9f 100644 --- a/krebs/5pkgs/simple/ftb/default.nix +++ b/krebs/5pkgs/simple/ftb/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation { cat > $out/bin/ftb << EOF #!${stdenv.shell} + export _JAVA_AWT_WM_NONREPARENTING=1 export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm mesa openal ]} ${if useAlsa then "${alsaOss}/bin/aoss" else "" } \ ${jre}/bin/java -jar $out/ftb.jar -- cgit v1.2.3 From aa1c6c814c9afbe4483b23b37b9d95d5055848fe Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 12 Feb 2018 10:41:19 +0100 Subject: l helios.r: add docker --- lass/1systems/helios/config.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index f53e93f2..0ab6ec2c 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -149,11 +149,13 @@ with import ; lass.screenlock.command = "${pkgs.i3lock}/bin/i3lock -i /home/lass/lock.png -t -f"; programs.adb.enable = true; - users.users.mainUser.extraGroups = [ "adbusers" ]; + users.users.mainUser.extraGroups = [ "adbusers" "docker" ]; services.printing.drivers = [ pkgs.postscript-lexmark ]; services.logind.extraConfig = '' HandleLidSwitch=ignore ''; + + virtualisation.docker.enable = true; } -- cgit v1.2.3 From 38fe362fdcf723f354c6e4ee0909ec3a544ac819 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 16:55:02 +0100 Subject: l: add lass-daedalus --- krebs/3modules/lass/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 1634a62a..655a3803 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -624,6 +624,10 @@ with import ; mail = "lass@xerxes.r"; pubkey = builtins.readFile ./ssh/xerxes.rsa; }; + lass-daedalus = { + mail = "lass@daedalus.r"; + pubkey = builtins.readFile ./ssh/daedalus.rsa; + }; fritz = { pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz34435NSXgj72YAOL4cIlRq/4yInKEyL9no+gymURoW5x1nkYpP0EK331e7UyQQSOdWOogRo6d7YHcFqNlYWv5xlYcHucIhgJwC4Zda1liVA+v7tSOJz2BjmFvOT3/qlcPS69f3zdLHZooz2C33uHX1FgGRXlxiA8dpqGnSr8o76QLZjuQkuDqr8reOspjO/RHCo2Moq0Xm5q9OgN1WLAZzupqt9A5lx567mRzYsRAr23pUxVN8T/tSCgDlPe4ktEjYX9CXLKfMyh9WuBVi+AuH4GFEWBT+AMpsHeF45w+w956x56mz0F5nYOQNK87gFr+Jr+mh2AF1ot2CxzrfTb fritz@scriptkiddiT540"; }; -- cgit v1.2.3 From 51cfaef6412f833f2137336617ceb2f234932ede Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 16:56:59 +0100 Subject: l mors.r: add /home/virtual --- lass/1systems/mors/config.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 936666a7..b81fa891 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -89,6 +89,10 @@ with import ; fsType = "btrfs"; options = ["defaults" "noatime" "ssd" "compress=lzo"]; }; + "/home/virtual" = { + device = "/dev/mapper/pool-virtual"; + fsType = "ext4"; + }; }; services.udev.extraRules = '' -- cgit v1.2.3 From e26d3bbd72acad8b3e00dcf8356ea58f4bbaf7d7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:06:02 +0100 Subject: l mors.r: enable docker --- lass/1systems/mors/config.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index b81fa891..265ef714 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -198,5 +198,6 @@ with import ; nix.package = pkgs.nixUnstable; programs.adb.enable = true; - users.users.mainUser.extraGroups = [ "adbusers" ]; + users.users.mainUser.extraGroups = [ "adbusers" "docker" ]; + virtualisation.docker.enable = true; } -- cgit v1.2.3 From 391fdd01b204402894718109d94c6c9590ccf644 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:06:38 +0100 Subject: l prism.r: add jeschli-bolide git access --- lass/1systems/prism/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index 087aaab0..eae8feb8 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -297,6 +297,7 @@ in { user = with config.krebs.users; [ jeschli jeschli-bln + jeschli-bolide jeschli-brauerei ]; repo = [ config.krebs.git.repos.stockholm ]; -- cgit v1.2.3 From 94a5ac9aeb1d11b5f37a8256db06a8e672cf3439 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:07:31 +0100 Subject: l prism.r: add taskserver config --- lass/1systems/prism/config.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index eae8feb8..b498d94f 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -314,6 +314,18 @@ in { } + { + services.taskserver = { + enable = true; + fqdn = "lassul.us"; + listenHost = "::"; + listenPort = 53589; + organisations.lass.users = [ "lass" "android" ]; + }; + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-p tcp --dport 53589"; target = "ACCEPT"; } + ]; + } ]; krebs.build.host = config.krebs.hosts.prism; -- cgit v1.2.3 From abebd470e34a8c1774565b071631a7c318827fb2 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:07:55 +0100 Subject: l IM: add helios to authorized_keys --- lass/2configs/IM.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/IM.nix b/lass/2configs/IM.nix index 51512955..7d3dfd42 100644 --- a/lass/2configs/IM.nix +++ b/lass/2configs/IM.nix @@ -41,6 +41,7 @@ in { lass-shodan.pubkey lass-icarus.pubkey lass-android.pubkey + lass-helios.pubkey ]; }; -- cgit v1.2.3 From 79fc51585a1e922893c327ea228583acf75e7f3d Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:08:53 +0100 Subject: l baseX: exec in x session --- lass/2configs/baseX.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 5ca02457..61a006a5 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -121,7 +121,7 @@ in { name = "xmonad"; start = '' ${pkgs.xorg.xhost}/bin/xhost +LOCAL: - ${pkgs.coreutils}/bin/sleep infinity + exec ${pkgs.coreutils}/bin/sleep infinity ''; }]; }; -- cgit v1.2.3 From 8b9c4fd21a608aef2f2fdeea78b31d3457e49288 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:12:48 +0100 Subject: l dcso-dev: add jschli-brauerei --- lass/2configs/dcso-dev.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix index cbf853d6..e2ba4436 100644 --- a/lass/2configs/dcso-dev.nix +++ b/lass/2configs/dcso-dev.nix @@ -17,6 +17,7 @@ in { config.krebs.users.lass.pubkey config.krebs.users.lass-android.pubkey config.krebs.users.jeschli-bln.pubkey + config.krebs.users.jeschli-brauerei.pubkey "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1T5+2epslFARSnETdr4wdolA6ocJaD4H9tmz6BZFQKXlwIq+OMp+sSEdwYwW3Lu9+mNbBHPxVVJDWg/We9DXB0ezXPM5Bs1+FcehmkoGwkmgKaFCDt0sL+CfSnog/3wEkN21O/rQxVFqMmiJ7WUDGci6IKCFZ5ZjOsmmfHg5p3LYxU9xv33fNr2v+XauhrGbFtQ7eDz4kSywxN/aw73LN4d8em0V0UV8VPI3Qkw7MamDFwefA+K1TfK8pBzMeruU6N7HLuNkpkAp7kS+K4Zzd72aQtR37a5qMiFUbOxQ9B7iFypuPx0iu6ZwY1s/sM8t3kLmcDJ9O4FOTzlbpneet3as6iJ+Ckr/TlfKor2Tl5pWcXh2FXHoG8VUu5bYmIViJBrKihAlAQfQN0mJ9fdFTnCXVTtbYTy11s4eEVHgUlb7oSpgBnx5bnBONgApbsOX9zyoo8wz8KkZBcf1SQpkV5br8uUAHCcZtHuY6I3kKlv+8lJmgUipiYzMdTi7+dHa49gVEcEKL4ZnJ0msQkl4XT7JjKETLvumC4/TIqVuRu48wuYalkCR9OzxCsTXQ/msBJBztPdYLrEOXVb2HfzuCT+43UuMQ5rP/EoPy0TWQO9BaqfEXqvbOvWjVxj/GMvglQ2ChZTwHxwwTKB8qRVvJLnbZQwizQiSrkzjb6hRJfQ== u0_a165@localhost" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjtdqRxD0+UU7O8xogSqAQYd/Hrc79CTTKnvbhKy7jp2TVfxQpl81ndSH6DN6Cz90mu65C+DFGq43YtKTPqXmTn1+2wru71C2UOl6ZR0tmU7UELkRt4SJuFQLEgQCt3BWvXJPye6cKRRIlb+XZHWyVyCDxHo9EYO2GWI1wIP8mHMltKj65mobHY+R0CJNhhwlFURzTto8C30ejfVg2OW81qkNWqYtpdC9txLUlQ9/LBVKrafHGprmcBEp9qtecVgx8kxHpS7cuQNYoFcfljug4IyFO+uBfdbKqnGM5mra3huNhX3+AcQxKbLMlRgZD+jc47Xs+s5qSvWBou2ygd5T413k/SDOTCxDjidA+dcwzRo0qUWcGL201a5g+F0EvWv8rjre9m0lii6QKEoPyj60y3yfaIHeafels1Ia1FItjkBe8XydiXf7rKq8nmVRlpo8vl+vKwVuJY783tObHjUgBtXJdmnyYGiXxkxSrXa2mQhPz3KodK/QrnqCP27dURcMlp1hFF3LxFz7WtMCLW0yvDuUsuI2pdq0+zdt702wuwXVNIvbq/ssvX/CL8ryBLAogaxN9DN0vpjk+aXQLn11Zt99MgmnnqUgvOKQi1Quog/SxnSBiloKqB6aA10a28Uxoxkr0KAfhWhX3XPpfGMlbVj4GJuevLp0sGDVQT2biUQ== rhaist@RH-NB" ]; -- cgit v1.2.3 From 119856187d954204592ac9d702b9c0327db82eb1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:13:18 +0100 Subject: l: add dunst --- lass/1systems/mors/config.nix | 1 + lass/2configs/dunst.nix | 277 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100644 lass/2configs/dunst.nix diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 265ef714..6a606e0a 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -31,6 +31,7 @@ with import ; + { #risk of rain port krebs.iptables.tables.filter.INPUT.rules = [ diff --git a/lass/2configs/dunst.nix b/lass/2configs/dunst.nix new file mode 100644 index 00000000..6d3d839b --- /dev/null +++ b/lass/2configs/dunst.nix @@ -0,0 +1,277 @@ +{ config, pkgs, ... }: +with import ; +let + dunstConfig = pkgs.writeText "dunst-config" '' + [global] + font = Iosevka Term 11 + + # Allow a small subset of html markup: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # If markup is not allowed, those tags will be stripped out of the + # message. + markup = yes + plain_text = no + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # Markup is allowed + format = "%a\n%s\n%b" + + # Sort messages by urgency. + sort = yes + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = center + + # The frequency with wich text that is longer than the notification + # window allows bounces back and forth. + # This option conflicts with "word_wrap". + # Set to 0 to disable. + bounce_freq = 0 + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 1 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Hide duplicate's count and stack them + stack_duplicates = yes + hide_duplicates_count = no + + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectevly. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "500x10-0+0" + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing windowmanager is + # present (e.g. xcompmgr, compiz, etc.). + # transparency = 5 + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + idle_threshold = 0 + + # Which monitor should the notifications be displayed on. + monitor = keyboard + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a windowmanager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern windowmanagers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = none + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 15 + + # Display indicators for URLs (U) and actions (A). + show_indicators = no + + # The height of a single line. If the height is smaller than the + # font height, it will get raised to the font height. + # This adds empty space above and under the text. + line_height = 3 + + # Draw a line of "separatpr_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 1 + + # Padding between text and separator. + padding = 1 + + # Horizontal padding. + horizontal_padding = 1 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = true + + # dmenu path. + dmenu = ${pkgs.dmenu}/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # Align icons left/right/off + icon_position = off + max_icon_size = 80 + + # Paths to default icons. + icon_folders = /usr/share/icons/Paper/16x16/mimetypes/:/usr/share/icons/Paper/48x48/status/:/usr/share/icons/Paper/16x16/devices/:/usr/share/icons/Paper/48x48/notifications/:/usr/share/icons/Paper/48x48/emblems/ + + frame_width = 2 + frame_color = "#8EC07C" + + [shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = ctrl+space + + # Close all notifications. + close_all = ctrl+shift+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". + history = ctrl+grave + + # Context menu. + context = mod4+u + + [urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + frame_color = "#3B7C87" + foreground = "#3B7C87" + background = "#191311" + #background = "#2B313C" + timeout = 0 + + [urgency_normal] + frame_color = "#5B8234" + foreground = "#5B8234" + background = "#191311" + #background = "#2B313C" + timeout = 0 + + [urgency_critical] + frame_color = "#B7472A" + foreground = "#B7472A" + background = "#191311" + #background = "#2B313C" + timeout = 0 + + + # Every section that isn't one of the above is interpreted as a rules to + # override settings for certain messages. + # Messages can be matched by "appname", "summary", "body", "icon", "category", + # "msg_urgency" and you can override the "timeout", "urgency", "foreground", + # "background", "new_icon" and "format". + # Shell-like globbing will get expanded. + # + # SCRIPTING + # You can specify a script that gets run when the rule matches by + # setting the "script" option. + # The script will be called as follows: + # script appname summary body icon urgency + # where urgency can be "LOW", "NORMAL" or "CRITICAL". + # + # NOTE: if you don't want a notification to be displayed, set the format + # to "". + # NOTE: It might be helpful to run dunst -print in a terminal in order + # to find fitting options for rules. + + #[espeak] + # summary = "*" + # script = dunst_espeak.sh + + #[script-test] + # summary = "*script*" + # script = dunst_test.sh + + #[ignore] + # # This notification will not be displayed + # summary = "foobar" + # format = "" + + #[signed_on] + # appname = Pidgin + # summary = "*signed on*" + # urgency = low + # + #[signed_off] + # appname = Pidgin + # summary = *signed off* + # urgency = low + # + #[says] + # appname = Pidgin + # summary = *says* + # urgency = critical + # + #[twitter] + # appname = Pidgin + # summary = *twitter.com* + # urgency = normal + # + # vim: ft=cfg + ''; +in { + systemd.user.services.dunst = { + wantedBy = [ "graphical-session.target" ]; + requires = [ "xmonad.service" ]; + environment = { + DISPLAY = ":${toString config.services.xserver.display}"; + }; + serviceConfig = { + SyslogIdentifier = "dunst"; + ExecStart = "${pkgs.dunst}/bin/dunst -conf ${dunstConfig}"; + Restart = "always"; + RestartSec = "15s"; + StartLimitBurst = 0; + }; + }; +} -- cgit v1.2.3 From be0a02f5d696aeb79312ee172e0d77d5c32229a3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:13:55 +0100 Subject: l: add rtl-sdr --- lass/1systems/helios/config.nix | 1 + lass/1systems/mors/config.nix | 1 + lass/2configs/rtl-sdr.nix | 6 ++++++ 3 files