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(-) (limited to 'lass') diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index f53e93f26..0ab6ec2c6 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 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(+) (limited to 'lass') diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 936666a73..b81fa891c 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(-) (limited to 'lass') diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index b81fa891c..265ef7145 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(+) (limited to 'lass') diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index 087aaab06..eae8feb8f 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(+) (limited to 'lass') diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index eae8feb8f..b498d94ff 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(+) (limited to 'lass') diff --git a/lass/2configs/IM.nix b/lass/2configs/IM.nix index 51512955e..7d3dfd428 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(-) (limited to 'lass') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 5ca024574..61a006a52 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(+) (limited to 'lass') diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix index cbf853d64..e2ba44360 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 (limited to 'lass') diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 265ef7145..6a606e0ad 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 000000000..6d3d839bc --- /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 changed, 8 insertions(+) create mode 100644 lass/2configs/rtl-sdr.nix (limited to 'lass') diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index 0ab6ec2c6..5a553572e 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -16,6 +16,7 @@ with import ; + { # automatic hardware detection boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.kernelModules = [ "kvm-intel" ]; diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 6a606e0ad..6ca980155 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -32,6 +32,7 @@ with import ; + { #risk of rain port krebs.iptables.tables.filter.INPUT.rules = [ diff --git a/lass/2configs/rtl-sdr.nix b/lass/2configs/rtl-sdr.nix new file mode 100644 index 000000000..7d640ea6c --- /dev/null +++ b/lass/2configs/rtl-sdr.nix @@ -0,0 +1,6 @@ +{ + boot.blacklistedKernelModules = [ "dvb_usb_rtl28xxu" ]; + services.udev.extraRules = '' + SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="adm", MODE="0666", SYMLINK+="rtl_sdr" + ''; +} -- cgit v1.2.3 From 6ee55cef8fd386f80938cfffcf7edd46884ef173 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:15:34 +0100 Subject: l dcso-dev: open firewall --- lass/2configs/dcso-dev.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lass') diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix index e2ba44360..04b742acf 100644 --- a/lass/2configs/dcso-dev.nix +++ b/lass/2configs/dcso-dev.nix @@ -45,6 +45,11 @@ in { }; }; + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-p tcp --dport 8000"; target = "ACCEPT";} + { predicate = "-p tcp --dport 9000"; target = "ACCEPT";} + ]; + krebs.per-user.dev.packages = [ pkgs.go ]; -- cgit v1.2.3 From 9c8c17c7c8f4031d450605c91f2906fd445cf73d Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:28:25 +0100 Subject: l mail: refactor --- lass/2configs/mail.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'lass') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 7c58e8c5f..e83201cd8 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -21,11 +21,11 @@ let ''; mailboxes = { - wireguard = [ "wireguard@lists.zx2c4" ]; - c-base = [ "c-base.org" ]; - security = [ "seclists.org" "security" "bugtraq" ]; - nix-devel = [ "nix-devel@googlegroups.com" ]; - shack = [ "shackspace.de" ]; + wireguard = [ "to:wireguard@lists.zx2c4" ]; + c-base = [ "to:c-base.org" ]; + security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; + nix-devel = [ "to:nix-devel@googlegroups.com" ]; + shack = [ "to:shackspace.de" ]; }; muttrc = pkgs.writeText "muttrc" '' @@ -80,16 +80,16 @@ let # V ''} %r |" - virtual-mailboxes \ - "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" + virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT ${f}") (flatten (attrValues mailboxes))}" + virtual-mailboxes "Unread" "notmuch://?query=tag:unread" + ${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "${f}") i.value}"'') (mapAttrsToList nameValuePair mailboxes)} + virtual-mailboxes "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT ${f}") (flatten (attrValues mailboxes))}" + virtual-mailboxes "TODO" "notmuch://?query=tag:TODO" + virtual-mailboxes "Starred" "notmuch://?query=tag:*" + virtual-mailboxes "Archive" "notmuch://?query=tag:archive" + virtual-mailboxes "Sent" "notmuch://?query=tag:sent" + virtual-mailboxes "Junk" "notmuch://?query=tag:junk" + virtual-mailboxes "All" "notmuch://?query=*" tag-transforms "junk" "k" \ "unread" "u" \ -- cgit v1.2.3 From e6eebd606c84d574009c572fad415fcc994d6bea Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:30:52 +0100 Subject: l dcso-dev: enable minio --- lass/2configs/dcso-dev.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass') diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix index 04b742acf..ae1c7bc8d 100644 --- a/lass/2configs/dcso-dev.nix +++ b/lass/2configs/dcso-dev.nix @@ -57,4 +57,6 @@ in { security.sudo.extraConfig = '' ${mainUser.name} ALL=(dev) NOPASSWD: ALL ''; + + services.minio.enable = true; } -- cgit v1.2.3 From 0dce0124c6b2a6c4856ed980152a74a6917f7d11 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:31:25 +0100 Subject: l downloading: add daedalus & helios --- lass/2configs/downloading.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass') diff --git a/lass/2configs/downloading.nix b/lass/2configs/downloading.nix index 9582413ed..8d0fb0d02 100644 --- a/lass/2configs/downloading.nix +++ b/lass/2configs/downloading.nix @@ -16,6 +16,8 @@ with import ; lass.pubkey lass-shodan.pubkey lass-icarus.pubkey + lass-daedalus.pubkey + lass-helios.pubkey makefu.pubkey wine-mors.pubkey ]; -- cgit v1.2.3 From 05c30004c2c27e97437aef441ddc5ae1724ae03c Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:32:49 +0100 Subject: l exim-smarthost: add even more mails --- lass/2configs/exim-smarthost.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lass') diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix index 0219f5216..4335c7cab 100644 --- a/lass/2configs/exim-smarthost.nix +++ b/lass/2configs/exim-smarthost.nix @@ -59,6 +59,17 @@ with import ; { from = "coinexchange@lassul.us"; to = lass.mail; } { from = "verwaltung@lassul.us"; to = lass.mail; } { from = "gearbest@lassul.us"; to = lass.mail; } + { from = "binance@lassul.us"; to = lass.mail; } + { from = "bitfinex@lassul.us"; to = lass.mail; } + { from = "alternate@lassul.us"; to = lass.mail; } + { from = "redacted@lassul.us"; to = lass.mail; } + { from = "mytaxi@lassul.us"; to = lass.mail; } + { from = "pizza@lassul.us"; to = lass.mail; } + { from = "robinhood@lassul.us"; to = lass.mail; } + { from = "drivenow@lassul.us"; to = lass.mail; } + { from = "aws@lassul.us"; to = lass.mail; } + { from = "reddit@lassul.us"; to = lass.mail; } + { from = "banggood@lassul.us"; to = lass.mail; } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; } -- cgit v1.2.3 From 0670606ddc376d165bb2ebc1846469216565fd6a Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:33:46 +0100 Subject: l logf: add urgency for lass@mors --- lass/2configs/logf.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lass') diff --git a/lass/2configs/logf.nix b/lass/2configs/logf.nix index 03414a745..24b806efa 100644 --- a/lass/2configs/logf.nix +++ b/lass/2configs/logf.nix @@ -10,9 +10,13 @@ let echelon = "197"; cloudkrebs = "119"; }; + urgent = [ + "\\blass@mors\\b" + ]; in { environment.systemPackages = [ (pkgs.writeDashBin "logf" '' + export LOGF_URGENT=${pkgs.writeJSON "urgent" urgent} export LOGF_HOST_COLORS=${pkgs.writeJSON "host-colors" host-colors} ${pkgs.logf}/bin/logf ${concatMapStringsSep " " (name: "root@${name}") (attrNames config.lass.hosts)} '') -- cgit v1.2.3 From df18d18ab36953a6c4179d5cb638e1d99d2ee182 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:34:58 +0100 Subject: l zsh: add LS_COLORS in zsh menu --- lass/2configs/zsh.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lass') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index add30fbf1..0a32ce510 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -50,16 +50,15 @@ #enable automatic rehashing of $PATH zstyle ':completion:*' rehash true + #beautiful colors 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} + zstyle ':completion:*:default' list-colors ''${(s.:.)LS_COLORS} #emacs bindings bindkey "[7~" beginning-of-line -- cgit v1.2.3 From f7606723eddae1e6a70a4b6374a950ed3503346a Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:35:21 +0100 Subject: l zsh: check for --- lass/2configs/zsh.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass') diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix index 0a32ce510..aa3e6731d 100644 --- a/lass/2configs/zsh.nix +++ b/lass/2configs/zsh.nix @@ -108,7 +108,7 @@ fi #check if in nix shell - if test -n "$buildInputs"; then + if test -n "$IN_NIX_SHELL"; then p_nixshell='%F{green}[s]%f ' t_nixshell='[s] ' else -- cgit v1.2.3 From dc2b6931ebfb775f715bc1c3837c20463bcb2418 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:35:55 +0100 Subject: l xserver: add DBUS_SESSION --- lass/3modules/xserver/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lass') diff --git a/lass/3modules/xserver/default.nix b/lass/3modules/xserver/default.nix index d16f89f45..cdd80857a 100644 --- a/lass/3modules/xserver/default.nix +++ b/lass/3modules/xserver/default.nix @@ -33,6 +33,11 @@ let XMONAD_STARTUP_HOOK = pkgs.writeDash "xmonad-startup-hook" '' ${pkgs.xorg.xhost}/bin/xhost +LOCAL: & ${xcfg.displayManager.sessionCommands} + if test -z "$DBUS_SESSION_BUS_ADDRESS"; then + exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "" + fi + export DBUS_SESSION_BUS_ADDRESS + ${config.systemd.package}/bin/systemctl --user import-environment DISPLAY DBUS_SESSION_BUS_ADDRESS wait ''; @@ -74,6 +79,7 @@ let "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb" (optional (xcfg.dpi != null) "-dpi ${toString xcfg.dpi}") ]; + User = user.name; }; }; krebs.xresources.resources.dpi = '' -- cgit v1.2.3 From 75eaf9cf08e6f19d287c0b3aec16663b47f7e367 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:37:48 +0100 Subject: l xmonad: send urgency to dbus --- lass/5pkgs/xmonad-lass.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'lass') diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix index 2dd352bd4..f6e916104 100644 --- a/lass/5pkgs/xmonad-lass.nix +++ b/lass/5pkgs/xmonad-lass.nix @@ -36,7 +36,7 @@ import XMonad.Hooks.FloatNext (floatNextHook) import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts)) import XMonad.Hooks.Place (placeHook, smart) import XMonad.Hooks.UrgencyHook (focusUrgent) -import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook) +import XMonad.Hooks.UrgencyHook (withUrgencyHook, UrgencyHook(..)) import XMonad.Layout.FixedColumn (FixedColumn(..)) import XMonad.Layout.Minimize (minimize, minimizeWindow, MinimizeMsg(RestoreNextMinimizedWin)) import XMonad.Layout.NoBorders (smartBorders) @@ -44,9 +44,20 @@ import XMonad.Layout.SimplestFloat (simplestFloat) import XMonad.Prompt (autoComplete, font, searchPredicate, XPConfig) import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy) import XMonad.Util.EZConfig (additionalKeysP) +import XMonad.Util.NamedWindows (getName) +import XMonad.Util.Run (safeSpawn) import XMonad.Stockholm.Shutdown +data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show) + +instance UrgencyHook LibNotifyUrgencyHook where + urgencyHook LibNotifyUrgencyHook w = do + name <- getName w + Just idx <- fmap (W.findTag w) $ gets windowset + + safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx] + myTerm :: FilePath myTerm = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc" @@ -61,7 +72,7 @@ main = getArgs >>= \case main' :: IO () main' = do xmonad $ ewmh - $ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") + $ withUrgencyHook LibNotifyUrgencyHook $ def { terminal = myTerm , modMask = mod4Mask -- cgit v1.2.3 From 2a835111d841770148437fc7692e22c381cf7808 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:38:19 +0100 Subject: l xmonad: add floatHook type --- lass/5pkgs/xmonad-lass.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lass') diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix index f6e916104..59c95cff7 100644 --- a/lass/5pkgs/xmonad-lass.nix +++ b/lass/5pkgs/xmonad-lass.nix @@ -23,6 +23,7 @@ import XMonad import qualified XMonad.StackSet as W import Control.Monad.Extra (whenJustM) import Data.List (isInfixOf) +import Data.Monoid (Endo) import System.Environment (getArgs, lookupEnv) import System.Posix.Process (executeFile) import XMonad.Actions.CopyWindow (copy, kill1) @@ -91,11 +92,12 @@ myLayoutHook = defLayout where defLayout = minimize $ ((avoidStruts $ Tall 1 (3/100) (1/2) ||| Full ||| Mirror (Tall 1 (3/100) (1/2))) ||| FixedColumn 2 80 80 1 ||| simplestFloat) +floatHooks :: Query (Endo WindowSet) floatHooks = composeAll . concat $ [ [ title =? t --> doFloat | t <- myTitleFloats] , [ className =? c --> doFloat | c <- myClassFloats ] ] where - myTitleFloats = [] -- for the KDE "open link" popup from konsole + myTitleFloats = [] myClassFloats = ["Pinentry"] -- for gpg passphrase entry -- cgit v1.2.3 From 5187d0177c2c347838bac00fa981703bfd9a983e Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Feb 2018 14:12:17 +0100 Subject: l wine: remove wine64 --- lass/2configs/wine.nix | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'lass') diff --git a/lass/2configs/wine.nix b/lass/2configs/wine.nix index d60b1feea..dd82b34eb 100644 --- a/lass/2configs/wine.nix +++ b/lass/2configs/wine.nix @@ -19,23 +19,8 @@ in { pkgs.wine ]; }; - wine64 = { - name = "wine64"; - description = "user for running wine in 64bit"; - home = "/home/wine64"; - useDefaultShell = true; - extraGroups = [ - "audio" - "video" - ]; - createHome = true; - packages = [ - (pkgs.wine.override { wineBuild = "wineWow"; }) - ]; - }; }; security.sudo.extraConfig = '' ${mainUser.name} ALL=(wine) NOPASSWD: ALL - ${mainUser.name} ALL=(wine64) NOPASSWD: ALL ''; } -- cgit v1.2.3 From 8b3916ad4ada99d4e48d8ad1a85f5dd8d4d40457 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 00:20:23 +0100 Subject: l helios.r: add minio.cert --- lass/1systems/helios/config.nix | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'lass') diff --git a/lass/1systems/helios/config.nix b/lass/1systems/helios/config.nix index 5a553572e..c4d99cb2c 100644 --- a/lass/1systems/helios/config.nix +++ b/lass/1systems/helios/config.nix @@ -137,14 +137,35 @@ with import ; networking.hostName = lib.mkForce "BLN02NB0162"; security.pki.certificateFiles = [ - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC1G1.pem"; sha256 = "14vz9c0fk6li0a26vx0s5ha6y3yivnshx9pjlh9vmnpkbph5a7rh"; }) - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC2G1.pem"; sha256 = "0r1dd48a850cv7whk4g2maik550rd0vsrsl73r6x0ivzz7ap1xz5"; }) - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC3G1.pem"; sha256 = "0b5cdchdkvllnr0kz35d8jrmrf9cjw0kd98mmvzr0x6nkc8hwpdy"; }) - - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCACOMPC2G1.pem"; sha256 = "0rn57zv1ry9vj4p2248mxmafmqqmdhbrfx1plszrxsphshbk2hfz"; }) - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCACOMPC3G1.pem"; sha256 = "0w88qaqhwxzvdkx40kzj2gka1yi85ipppjdkxah4mscwfhlryrnk"; }) - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAIDENC2G1.pem"; sha256 = "1z2qkyhgjvri13bvi06ynkb7mjmpcznmc9yw8chx1lnwc3cxa7kf"; }) - (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAIDENC3G1.pem"; sha256 = "0smdjjvz95n652cb45yhzdb2lr83zg52najgbzf6lm3w71f8mv7f"; }) + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC1G1.pem"; sha256 = "14vz9c0fk6li0a26vx0s5ha6y3yivnshx9pjlh9vmnpkbph5a7rh"; }) + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC2G1.pem"; sha256 = "0r1dd48a850cv7whk4g2maik550rd0vsrsl73r6x0ivzz7ap1xz5"; }) + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAROOTC3G1.pem"; sha256 = "0b5cdchdkvllnr0kz35d8jrmrf9cjw0kd98mmvzr0x6nkc8hwpdy"; }) + + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCACOMPC2G1.pem"; sha256 = "0rn57zv1ry9vj4p2248mxmafmqqmdhbrfx1plszrxsphshbk2hfz"; }) + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCACOMPC3G1.pem"; sha256 = "0w88qaqhwxzvdkx40kzj2gka1yi85ipppjdkxah4mscwfhlryrnk"; }) + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAIDENC2G1.pem"; sha256 = "1z2qkyhgjvri13bvi06ynkb7mjmpcznmc9yw8chx1lnwc3cxa7kf"; }) + (pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAIDENC3G1.pem"; sha256 = "0smdjjvz95n652cb45yhzdb2lr83zg52najgbzf6lm3w71f8mv7f"; }) + (pkgs.writeText "minio.cert" '' + -----BEGIN CERTIFICATE----- + MIIDFDCCAfygAwIBAgIQBEKYm9VmbR6T/XNLP2P5kDANBgkqhkiG9w0BAQsFADAS + MRAwDgYDVQQKEwdBY21lIENvMB4XDTE4MDIxNDEyNTk1OVoXDTE5MDIxNDEyNTk1 + OVowEjEQMA4GA1UEChMHQWNtZSBDbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC + AQoCggEBAMmRGUTMDxOaoEZ3osG1ZpGj4enHl6ToWaoCXvRXvI6RB/99QOFlwLdL + 8lGjIbXyovNkH686pVsfgCTOLRGzftWHmWgfmaSUv0TToBW8F9DN4ww9YgiLZjvV + YZunRyp1n0x9OrBXMs7xEBBa4q0AG1IvlRJTrd7CW519FlVq7T95LLB7P6t6K54C + ksG4kEzXLRPD/FMdU7LWbhWnQSOxPMCq8erTv3kW3A3Y9hSAKOFQKQHH/3O2HDrM + CbK5ldNklswg2rIHxx7kg1fteLD1lVCNPfCMfuwlLUaMeoRZ03HDof8wFlRz3pzw + hQRWPvfLfRvFCZ0LFNvfgAqXtmG/ywUCAwEAAaNmMGQwDgYDVR0PAQH/BAQDAgKk + MBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wLAYDVR0RBCUw + I4IJbG9jYWxob3N0ggZoZWxpb3OCCGhlbGlvcy5yhwR/AAABMA0GCSqGSIb3DQEB + CwUAA4IBAQBzrPb3NmAn60awoJG3d4BystaotaFKsO3iAnP4Lfve1bhKRELIjJ30 + hX/mRYkEVRbfwKRgkkLab4zpJ/abjb3DjFNo8E4QPNeCqS+8xxeBOf7x61Kg/0Ox + jRQ95fTATyItiChwNkoxYjVIwosqxBVsbe3KxwhkmKPQ6wH/nvr6URX/IGUz2qWY + EqHdjsop83u4Rjn3C0u46U0P+W4U5IFiLfcE3RzFFYh67ko5YEhkyXP+tBNSgrTM + zFisVoQZdXpMCWWxBVWulB4FvvTx3jKUPRZVOrfexBfY4TA/PyhXLoz7FeEK9n2a + qFkrxy+GrHBXfSRZgCaHQFdKorg2fwwa + -----END CERTIFICATE----- + '') ]; lass.screenlock.command = "${pkgs.i3lock}/bin/i3lock -i /home/lass/lock.png -t -f"; -- cgit v1.2.3 From d8c6ef4d103da4701092dc8120abe63bb855014a Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 09:45:39 +0100 Subject: l prism.r: add jeschli user --- lass/1systems/prism/config.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lass') diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index b498d94ff..c0e4620cc 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -292,6 +292,16 @@ in { { + users.users.jeschli = { + uid = genid "jeschli"; + isNormalUser = true; + openssh.authorizedKeys.keys = with config.krebs.users; [ + jeschli.pubkey + jeschli-bln.pubkey + jeschli-bolide.pubkey + jeschli-brauerei.pubkey + ]; + }; krebs.git.rules = [ { user = with config.krebs.users; [ -- cgit v1.2.3 From 8c600fd0f5c8d63115c5527733885a14ad210913 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 09:46:00 +0100 Subject: l shodan.r: ignore lidswitch --- lass/1systems/shodan/config.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lass') diff --git a/lass/1systems/shodan/config.nix b/lass/1systems/shodan/config.nix index ef015aebc..7fb57544f 100644 --- a/lass/1systems/shodan/config.nix +++ b/lass/1systems/shodan/config.nix @@ -61,4 +61,8 @@ with import ; SUBSYSTEM=="net", ATTR{address}=="a0:88:b4:29:26:bc", NAME="wl0" SUBSYSTEM=="net", ATTR{address}=="f0:de:f1:0c:a7:63", NAME="et0" ''; + + services.logind.extraConfig = '' + HandleLidSwitch=ignore + ''; } -- cgit v1.2.3 From ae9dc0e1a645633be77559492840252517eb7c74 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 09:46:50 +0100 Subject: l minecraft: open port for dynmap --- lass/2configs/minecraft.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass') diff --git a/lass/2configs/minecraft.nix b/lass/2configs/minecraft.nix index aa33dcccc..6f8ceb358 100644 --- a/lass/2configs/minecraft.nix +++ b/lass/2configs/minecraft.nix @@ -17,5 +17,6 @@ krebs.iptables.tables.filter.INPUT.rules = [ { predicate = "-p tcp --dport 25565"; target = "ACCEPT"; } { predicate = "-p udp --dport 25565"; target = "ACCEPT"; } + { predicate = "-p tcp --dport 8123"; target = "ACCEPT"; } ]; } -- cgit v1.2.3 From 1adeeffb7e0a6f7321743f431737cfc3d711f2eb Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 09:47:35 +0100 Subject: l vim: add govet workaround --- lass/2configs/vim.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lass') diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix index 5fe9e1450..5d19ae75d 100644 --- a/lass/2configs/vim.nix +++ b/lass/2configs/vim.nix @@ -6,6 +6,9 @@ let environment.systemPackages = [ (hiPrio vim) pkgs.python35Packages.flake8 + (pkgs.writeDashBin "govet" '' + go vet "$@" + '') ]; environment.etc.vimrc.source = vimrc; -- cgit v1.2.3 From efb192f5153f48aa9f3ddde5ee25bc794ccf49bb Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 09:50:45 +0100 Subject: l vim: run gometalinter --- lass/2configs/vim.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lass') diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix index 5d19ae75d..6014fd082 100644 --- a/lass/2configs/vim.nix +++ b/lass/2configs/vim.nix @@ -71,6 +71,9 @@ let let g:syntastic_python_checkers=['flake8'] let g:syntastic_python_flake8_post_args='--ignore=E501' + let g:go_metalinter_autosave = 1 + let g:go_metalinter_deadline = "10s" + nmap q :buffer nmap :buffer -- cgit v1.2.3 From 28f96d4cb1753d0632f42ce0894297f427323133 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 19 Feb 2018 09:53:56 +0100 Subject: l: php5 -> php7 --- lass/2configs/websites/util.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'lass') diff --git a/lass/2configs/websites/util.nix b/lass/2configs/websites/util.nix index 36ae1a904..62055d0fd 100644 --- a/lass/2configs/websites/util.nix +++ b/lass/2configs/websites/util.nix @@ -32,7 +32,6 @@ rec { let domain = head domains; in { - services.phpfpm.phpPackage = pkgs.php56; services.nginx.virtualHosts."${domain}" = { enableACME = true; enableSSL = true; -- cgit v1.2.3 From aef9e595f021ca9c6676d743b24b7de2a2592f5d Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 22 Feb 2018 18:23:12 +0100 Subject: l baseX: use network-manager --- lass/2configs/baseX.nix | 1 + lass/2configs/network-manager.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lass/2configs/network-manager.nix (limited to 'lass') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 61a006a52..93189b0d3 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -10,6 +10,7 @@ in { ./livestream.nix ./dns-stuff.nix ./urxvt.nix + ./network-manager.nix { hardware.pulseaudio = { enable = true; diff --git a/lass/2configs/network-manager.nix b/lass/2configs/network-manager.nix new file mode 100644 index 000000000..c4f757de1 --- /dev/null +++ b/lass/2configs/network-manager.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, ... }: +{ + 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; + users.users.mainUser = { + extraGroups = [ "networkmanager" ]; + packages = with pkgs; [ + gnome3.gnome_keyring gnome3.dconf + ]; + }; +} -- cgit v1.2.3 From 87bc9a72eec639f8a73414e498ee2674355af640 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 22 Feb 2018 18:34:24 +0100 Subject: l baseX: run xmonad only in xmonad session --- lass/2configs/baseX.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lass') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 93189b0d3..2b7a5c924 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -122,13 +122,14 @@ in { name = "xmonad"; start = '' ${pkgs.xorg.xhost}/bin/xhost +LOCAL: + ${pkgs.systemd}/bin/systemctl --user start xmonad exec ${pkgs.coreutils}/bin/sleep infinity ''; }]; }; systemd.user.services.xmonad = { - wantedBy = [ "graphical-session.target" ]; + #wantedBy = [ "graphical-session.target" ]; environment = { DISPLAY = ":${toString config.services.xserver.display}"; RXVT_SOCKET = "%t/urxvtd-socket"; -- cgit v1.2.3 From 2d6f67e5358b1c60b7e778e3844f84434c0140e0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 25 Feb 2018 23:32:59 +0100 Subject: l mail: use tags for mailboxes --- lass/2configs/mail.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lass') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index e83201cd8..2cf20b32c 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -28,6 +28,11 @@ let shack = [ "to:shackspace.de" ]; }; + tag-mails = pkgs.writeDashBin "nm-init-tag" '' + ${pkgs.notmuch}/bin/notmuch new + ${concatMapStringsSep "\n" (i: ''${pkgs.notmuch}/bin/notmuch tag -inbox +${i.name} -- tag:inbox ${concatMapStringsSep " or " (f: "${f}") i.value}'') (mapAttrsToList nameValuePair mailboxes)} + ''; + muttrc = pkgs.writeText "muttrc" '' # gpg source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc @@ -80,10 +85,9 @@ let # V ''} %r |" - virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT ${f}") (flatten (attrValues mailboxes))}" + virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox" virtual-mailboxes "Unread" "notmuch://?query=tag:unread" - ${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "${f}") i.value}"'') (mapAttrsToList nameValuePair mailboxes)} - virtual-mailboxes "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT ${f}") (flatten (attrValues mailboxes))}" + ${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=tag:${i.name}"'') (mapAttrsToList nameValuePair mailboxes)} virtual-mailboxes "TODO" "notmuch://?query=tag:TODO" virtual-mailboxes "Starred" "notmuch://?query=tag:*" virtual-mailboxes "Archive" "notmuch://?query=tag:archive" @@ -163,5 +167,6 @@ in { mutt pkgs.much pkgs.notmuch + tag-mails ]; } -- cgit v1.2.3 From 5b9fe77d8f163c64f4c8960db8ebeadba2c5407c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 25 Feb 2018 23:33:15 +0100 Subject: l mail: add more mailboxes --- lass/2configs/mail.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lass') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 2cf20b32c..c6866c69d 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -21,11 +21,14 @@ let ''; mailboxes = { - wireguard = [ "to:wireguard@lists.zx2c4" ]; c-base = [ "to:c-base.org" ]; - security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; + dezentrale = [ "to:dezentrale.space" ]; + kaosstuff = [ "to:gearbest@lassul.us" "to:banggood@lassul.us" ]; nix-devel = [ "to:nix-devel@googlegroups.com" ]; + patreon = [ "to:patreon@lassul.us" ]; + security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; shack = [ "to:shackspace.de" ]; + wireguard = [ "to:wireguard@lists.zx2c4" ]; }; tag-mails = pkgs.writeDashBin "nm-init-tag" '' -- cgit v1.2.3 From 67969d72e137a65adba775c6219eb85ae72ccc77 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Feb 2018 14:47:12 +0100 Subject: os-release: use --- lass/source.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lass') diff --git a/lass/source.nix b/lass/source.nix index e3332c5de..1d840f38f 100644 --- a/lass/source.nix +++ b/lass/source.nix @@ -4,6 +4,11 @@ host@{ name, secure ? false, override ? {} }: let then "buildbot" else "lass"; _file = + "/lass/1systems/${name}/source.nix"; + pkgs = import { + overlays = map import [ + + ]; + }; in evalSource (toString _file) [ { @@ -17,6 +22,7 @@ in }; }; stockholm.file = toString ; + stockholm-version.pipe = "${pkgs.stockholm}/bin/get-version"; } override ] -- cgit v1.2.3 From 55a156814ae06f16f9e87638ddd5d0b73ddf41e0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Mar 2018 15:02:47 +0100 Subject: l deploy: don't run --diff --- lass/1systems/mors/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass') diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 6ca980155..cbb71ab24 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -182,7 +182,7 @@ with import ; echo 'secrets are crypted' >&2 exit 23 else - exec nix-shell -I stockholm="$PWD" --run 'deploy --diff --system="$SYSTEM"' + exec nix-shell -I stockholm="$PWD" --run 'deploy --system="$SYSTEM"' fi ''; predeploy = pkgs.writeDash "predeploy" '' -- cgit v1.2.3 From 742cda0e2261acad6b3d17dc42331ecc5e833854 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Mar 2018 15:07:00 +0100 Subject: l: turn pkgs into overlay --- lass/2configs/baseX.nix | 6 +- lass/5pkgs/custom/xmonad-lass/default.nix | 192 ++++++++++++++++++++++++++++++ lass/5pkgs/default.nix | 63 +++++----- lass/5pkgs/xmonad-lass.nix | 183 ---------------------------- lass/default.nix | 4 +- 5 files changed, 228 insertions(+), 220 deletions(-) create mode 100644 lass/5pkgs/custom/xmonad-lass/default.nix delete mode 100644 lass/5pkgs/xmonad-lass.nix (limited to 'lass') diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 2b7a5c924..99e574ed4 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -2,6 +2,7 @@ with import ; let user = config.krebs.build.user; + xmonad-lass = pkgs.callPackage { inherit config; }; in { imports = [ ./mpv.nix @@ -84,7 +85,6 @@ in { powertop push rxvt_unicode_with-plugins - screengrab slock sxiv timewarrior @@ -137,8 +137,8 @@ in { }; serviceConfig = { SyslogIdentifier = "xmonad"; - ExecStart = "${pkgs.xmonad-lass}/bin/xmonad"; - ExecStop = "${pkgs.xmonad-lass}/bin/xmonad --shutdown"; + ExecStart = "${xmonad-lass}/bin/xmonad"; + ExecStop = "${xmonad-lass}/bin/xmonad --shutdown"; }; restartIfChanged = false; }; diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix new file mode 100644 index 000000000..e658897da --- /dev/null +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -0,0 +1,192 @@ +{ config, pkgs, ... }: +pkgs.writeHaskell "xmonad-lass" { + executables.xmonad = { + extra-depends = [ + "containers" + "extra" + "unix" + "X11" + "xmonad" + "xmonad-contrib" + "xmonad-stockholm" + ]; + text = /* haskell */ '' +{-# LANGUAGE DeriveDataTypeable #-} -- for XS +{-# LANGUAGE FlexibleContexts #-} -- for xmonad' +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE ScopedTypeVariables #-} + + +module Main where +import XMonad + +import qualified XMonad.StackSet as W +import Control.Monad.Extra (whenJustM) +import Data.List (isInfixOf) +import Data.Monoid (Endo) +import System.Environment (getArgs, lookupEnv) +import System.Posix.Process (executeFile) +import XMonad.Actions.CopyWindow (copy, kill1) +import XMonad.Actions.CycleWS (toggleWS) +import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace, removeEmptyWorkspace) +import XMonad.Actions.DynamicWorkspaces (withWorkspace) +import XMonad.Actions.GridSelect (GSConfig(..), gridselectWorkspace, navNSearch) +import XMonad.Hooks.EwmhDesktops (ewmh) +import XMonad.Hooks.FloatNext (floatNext) +import XMonad.Hooks.FloatNext (floatNextHook) +import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts)) +import XMonad.Hooks.Place (placeHook, smart) +import XMonad.Hooks.UrgencyHook (focusUrgent) +import XMonad.Hooks.UrgencyHook (withUrgencyHook, UrgencyHook(..)) +import XMonad.Layout.FixedColumn (FixedColumn(..)) +import XMonad.Layout.Minimize (minimize, minimizeWindow, MinimizeMsg(RestoreNextMinimizedWin)) +import XMonad.Layout.NoBorders (smartBorders) +import XMonad.Layout.SimplestFloat (simplestFloat) +import XMonad.Prompt (autoComplete, font, searchPredicate, XPConfig) +import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy) +import XMonad.Util.EZConfig (additionalKeysP) +import XMonad.Util.NamedWindows (getName) +import XMonad.Util.Run (safeSpawn) + +import XMonad.Stockholm.Shutdown + +data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show) + +instance UrgencyHook LibNotifyUrgencyHook where + urgencyHook LibNotifyUrgencyHook w = do + name <- getName w + Just idx <- fmap (W.findTag w) $ gets windowset + + safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx] + +myTerm :: FilePath +myTerm = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc" + +myFont :: String +myFont = "${config.lass.fonts.regular}" + +main :: IO () +main = getArgs >>= \case + ["--shutdown"] -> sendShutdownEvent + _ -> main' + +main' :: IO () +main' = do + xmonad $ ewmh + $ withUrgencyHook LibNotifyUrgencyHook + $ def + { terminal = myTerm + , modMask = mod4Mask + , layoutHook = smartBorders $ myLayoutHook + , manageHook = placeHook (smart (1,0)) <+> floatNextHook <+> floatHooks + , startupHook = + whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK")) + (\path -> forkFile path [] Nothing) + , normalBorderColor = "#1c1c1c" + , focusedBorderColor = "#ff0000" + , handleEventHook = handleShutdownEvent + , workspaces = [ "dashboard", "sys", "wp" ] + } `additionalKeysP` myKeyMap + +myLayoutHook = defLayout + where + defLayout = minimize $ ((avoidStruts $ Tall 1 (3/100) (1/2) ||| Full ||| Mirror (Tall 1 (3/100) (1/2))) ||| FixedColumn 2 80 80 1 ||| simplestFloat) + +floatHooks :: Query (Endo WindowSet) +floatHooks = composeAll . concat $ + [ [ title =? t --> doFloat | t <- myTitleFloats] + , [ className =? c --> doFloat | c <- myClassFloats ] ] + where + myTitleFloats = [] + myClassFloats = ["Pinentry"] -- for gpg passphrase entry + + +myKeyMap :: [([Char], X ())] +myKeyMap = + [ ("M4-", spawn "${config.lass.screenlock.command}") + , ("M4-C-p", spawn "${pkgs.scrot}/bin/scrot ~/public_html/scrot.png") + , ("M4-p", spawn "${pkgs.pass}/bin/passmenu --type") + , ("M4-o", spawn "${pkgs.brain}/bin/brainmenu --type") + , ("M4-i", spawn "${pkgs.dpass}/bin/dpassmenu --type") + + , ("", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-mute @DEFAULT_SINK@ toggle") + , ("", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ +4%") + , ("", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ -4%") + , ("", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -time 0 -dec 1%") + , ("", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -time 0 -inc 1") + , ("", gridselectWorkspace gridConfig W.view) + , ("M4-C-k", spawn "${pkgs.xorg.xkill}/bin/xkill") + + , ("M4-a", focusUrgent) + , ("M4-S-r", renameWorkspace myXPConfig) + , ("M4-S-a", addWorkspacePrompt myXPConfig) + , ("M4-S-", removeEmptyWorkspace) + , ("M4-S-c", kill1) + , ("M4-", toggleWS) + , ("M4-S-", spawn myTerm) + , ("M4-x", floatNext True >> spawn myTerm) + , ("M4-c", floatNext True >> spawn "${pkgs.termite}/bin/termite") + , ("M4-f", floatNext True) + , ("M4-b", sendMessage ToggleStruts) + + , ("M4-v", withWorkspace autoXPConfig (windows . W.greedyView)) + , ("M4-S-v", withWorkspace autoXPConfig (windows . W.shift)) + , ("M4-C-v", withWorkspace autoXPConfig (windows . copy)) + + , ("M4-m", withFocused minimizeWindow) + , ("M4-S-m", sendMessage RestoreNextMinimizedWin) + + , ("M4-q", windowPromptGoto infixAutoXPConfig) + , ("M4-C-q", windowPromptBringCopy infixAutoXPConfig) + + , ("M4-S-q", return ()) + + , ("M4-d", floatNext True >> spawn "${pkgs.copyq}/bin/copyq show") + + , ("M4-", spawn "${pkgs.writeDash "nm-dmenu" '' + export PATH=$PATH:${pkgs.dmenu}/bin:${pkgs.networkmanagerapplet}/bin + exec ${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu "$@" + ''}") + + , ("M4-", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 1") + , ("M4-", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 10") + , ("M4-", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 33") + , ("M4-", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 100") + + , ("", spawn "${pkgs.xcalib}/bin/xcalib -invert -alter") + + --, ("M4-w", screenWorkspace 0 >>= (windows . W.greedyView)) + --, ("M4-e", screenWorkspace 1 >>= (windows . W.greedyView)) + --, ("M4-r", screenWorkspace 2 >>= (windows . W.greedyView)) + ] + +forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X () +forkFile path args env = + xfork (executeFile path False args env) >> return () + +myXPConfig :: XPConfig +myXPConfig = def + { font = myFont + } + +autoXPConfig :: XPConfig +autoXPConfig = myXPConfig + { autoComplete = Just 5000 + } + +infixAutoXPConfig :: XPConfig +infixAutoXPConfig = autoXPConfig + { searchPredicate = isInfixOf + } + +gridConfig :: GSConfig WorkspaceId +gridConfig = def + { gs_cellwidth = 100 + , gs_cellheight = 30 + , gs_cellpadding = 2 + , gs_navigate = navNSearch + , gs_font = myFont + } + ''; + }; +} diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix index a158cd3c6..28482eb91 100644 --- a/lass/5pkgs/default.nix +++ b/lass/5pkgs/default.nix @@ -1,40 +1,39 @@ -{ config, pkgs, ... }@args: +with import ; +self: super: let -{ - nixpkgs.config.packageOverrides = rec { - acronym = pkgs.callPackage ./acronym/default.nix {}; - dpass = pkgs.callPackage ./dpass {}; - firefoxPlugins = { - noscript = pkgs.callPackage ./firefoxPlugins/noscript.nix {}; - ublock = pkgs.callPackage ./firefoxPlugins/ublock.nix {}; - vimperator = pkgs.callPackage ./firefoxPlugins/vimperator.nix {}; - }; - init = pkgs.callPackage ./init/default.nix args; - logify = pkgs.callPackage ./logify/default.nix {}; - mk_sql_pair = pkgs.callPackage ./mk_sql_pair/default.nix {}; - mpv-poll = pkgs.callPackage ./mpv-poll/default.nix {}; - pop = pkgs.callPackage ./pop/default.nix {}; - q = pkgs.callPackage ./q {}; - rs = pkgs.callPackage ./rs/default.nix {}; - urban = pkgs.callPackage ./urban/default.nix {}; - xml2json = pkgs.callPackage ./xml2json/default.nix {}; - xmonad-lass = import ./xmonad-lass.nix { inherit config pkgs; }; - yt-next = pkgs.callPackage ./yt-next/default.nix {}; + # This callPackage will try to detect obsolete overrides. + callPackage = path: args: let + override = super.callPackage path args; + upstream = optionalAttrs (override ? "name") + (super.${(parseDrvName override.name).name} or {}); + in if upstream ? "name" && + override ? "name" && + compareVersions upstream.name override.name != -1 + then + trace + "Upstream `${upstream.name}' gets overridden by `${override.name}'." + override + else override; - bank = pkgs.writeDashBin "bank" '' + subdirsOf = path: + mapAttrs (name: _: path + "/${name}") + (filterAttrs (_: eq "directory") (readDir path)); + +in { + bank = self.writeDashBin "bank" '' tmp=$(mktemp) - ${pkgs.pass}/bin/pass show hledger > $tmp - ${pkgs.hledger}/bin/hledger --file=$tmp "$@" - ${pkgs.pass}/bin/pass show hledger | if ${pkgs.diffutils}/bin/diff $tmp -; then + ${self.pass}/bin/pass show hledger > $tmp + ${self.hledger}/bin/hledger --file=$tmp "$@" + ${self.pass}/bin/pass show hledger | if ${self.diffutils}/bin/diff $tmp -; then exit 0 else - ${pkgs.coreutils}/bin/cat $tmp | ${pkgs.pass}/bin/pass insert -m hledger + ${self.coreutils}/bin/cat $tmp | ${self.pass}/bin/pass insert -m hledger fi - ${pkgs.coreutils}/bin/rm $tmp - ''; - screengrab = pkgs.writeDashBin "screengrab" '' - resolution="$(${pkgs.xorg.xrandr}/bin/xrandr | ${pkgs.gnugrep}/bin/grep '*' | ${pkgs.gawk}/bin/awk '{print $1}')" - ${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -i :${toString config.services.xserver.display} -s $resolution -c:v huffyuv $1 + ${self.coreutils}/bin/rm $tmp ''; - }; + rtl8814au = callPackage ./custom/rtl8814au { kernel = self.linux; }; } + +// mapAttrs (_: flip callPackage {}) + (filterAttrs (_: dir: pathExists (dir + "/default.nix")) + (subdirsOf ./.)) diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix deleted file mode 100644 index 59c95cff7..000000000 --- a/lass/5pkgs/xmonad-lass.nix +++ /dev/null @@ -1,183 +0,0 @@ -{ config, pkgs, ... }: -pkgs.writeHaskell "xmonad-lass" { - executables.xmonad = { - extra-depends = [ - "containers" - "extra" - "unix" - "X11" - "xmonad" - "xmonad-contrib" - "xmonad-stockholm" - ]; - text = /* haskell */ '' -{-# LANGUAGE DeriveDataTypeable #-} -- for XS -{-# LANGUAGE FlexibleContexts #-} -- for xmonad' -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE ScopedTypeVariables #-} - - -module Main where -import XMonad - -import qualified XMonad.StackSet as W -import Control.Monad.Extra (whenJustM) -import Data.List (isInfixOf) -import Data.Monoid (Endo) -import System.Environment (getArgs, lookupEnv) -import System.Posix.Process (executeFile) -import XMonad.Actions.CopyWindow (copy, kill1) -import XMonad.Actions.CycleWS (toggleWS) -import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace, removeEmptyWorkspace) -import XMonad.Actions.DynamicWorkspaces (withWorkspace) -import XMonad.Actions.GridSelect (GSConfig(..), gridselectWorkspace, navNSearch) -import XMonad.Hooks.EwmhDesktops (ewmh) -import XMonad.Hooks.FloatNext (floatNext) -import XMonad.Hooks.FloatNext (floatNextHook) -import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts)) -import XMonad.Hooks.Place (placeHook, smart) -import XMonad.Hooks.UrgencyHook (focusUrgent) -import XMonad.Hooks.UrgencyHook (withUrgencyHook, UrgencyHook(..)) -import XMonad.Layout.FixedColumn (FixedColumn(..)) -import XMonad.Layout.Minimize (minimize, minimizeWindow, MinimizeMsg(RestoreNextMinimizedWin)) -import XMonad.Layout.NoBorders (smartBorders) -import XMonad.Layout.SimplestFloat (simplestFloat) -import XMonad.Prompt (autoComplete, font, searchPredicate, XPConfig) -import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy) -import XMonad.Util.EZConfig (additionalKeysP) -import XMonad.Util.NamedWindows (getName) -import XMonad.Util.Run (safeSpawn) - -import XMonad.Stockholm.Shutdown - -data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show) - -instance UrgencyHook LibNotifyUrgencyHook where - urgencyHook LibNotifyUrgencyHook w = do - name <- getName w - Just idx <- fmap (W.findTag w) $ gets windowset - - safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx] - -myTerm :: FilePath -myTerm = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc" - -myFont :: String -myFont = "${config.lass.fonts.regular}" - -main :: IO () -main = getArgs >>= \case - ["--shutdown"] -> sendShutdownEvent - _ -> main' - -ma