summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-02-28 20:10:42 +0000
committerjeschli <jeschli@gmail.com>2018-02-28 20:10:42 +0000
commita7e49dd5fc590ba2ccb26d559d672767c87a7692 (patch)
tree3d0fb66d17085f1288037da1b4d9987fa402e40e /lass/2configs
parent4a2af184e6846f80b139357c6230558cd8785b10 (diff)
parent4c0d0f64ed21d3d7292bb5e8900d973e649375c1 (diff)
Merge branch 'staging/jeschli' of prism.i:stockholm into staging/jeschli
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/IM.nix1
-rw-r--r--lass/2configs/baseX.nix7
-rw-r--r--lass/2configs/dcso-dev.nix8
-rw-r--r--lass/2configs/downloading.nix2
-rw-r--r--lass/2configs/dunst.nix277
-rw-r--r--lass/2configs/exim-smarthost.nix11
-rw-r--r--lass/2configs/games.nix4
-rw-r--r--lass/2configs/git.nix4
-rw-r--r--lass/2configs/logf.nix4
-rw-r--r--lass/2configs/mail.nix44
-rw-r--r--lass/2configs/minecraft.nix1
-rw-r--r--lass/2configs/network-manager.nix24
-rw-r--r--lass/2configs/radio.nix1
-rw-r--r--lass/2configs/rtl-sdr.nix6
-rw-r--r--lass/2configs/vim.nix6
-rw-r--r--lass/2configs/websites/util.nix1
-rw-r--r--lass/2configs/wine.nix15
-rw-r--r--lass/2configs/zsh.nix72
18 files changed, 421 insertions, 67 deletions
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
];
};
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index 5cb7eb03f..2b7a5c924 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;
@@ -53,6 +54,7 @@ in {
time.timeZone = "Europe/Berlin";
+ programs.ssh.agentTimeout = "10m";
programs.ssh.startAgent = true;
services.openssh.forwardX11 = true;
@@ -120,13 +122,14 @@ in {
name = "xmonad";
start = ''
${pkgs.xorg.xhost}/bin/xhost +LOCAL:
- ${pkgs.coreutils}/bin/sleep infinity
+ ${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";
diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix
index cbf853d64..ae1c7bc8d 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"
];
@@ -44,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
];
@@ -51,4 +57,6 @@ in {
security.sudo.extraConfig = ''
${mainUser.name} ALL=(dev) NOPASSWD: ALL
'';
+
+ services.minio.enable = true;
}
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 <stockholm/lib>;
lass.pubkey
lass-shodan.pubkey
lass-icarus.pubkey
+ lass-daedalus.pubkey
+ lass-helios.pubkey
makefu.pubkey
wine-mors.pubkey
];
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 <stockholm/lib>;
+let
+ dunstConfig = pkgs.writeText "dunst-config" ''
+ [global]
+ font = Iosevka Term 11
+
+ # Allow a small subset of html markup:
+ # <b>bold</b>
+ # <i>italic</i>
+ # <s>strikethrough</s>
+ # <u>underline</u>
+ #
+ # For a complete reference see
+ # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
+ # 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<b>%s</b>\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;
+ };
+ };
+}
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 <stockholm/lib>;
{ 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"; }
diff --git a/lass/2configs/games.nix b/lass/2configs/games.nix
index 6cea271c1..50362cda4 100644
--- a/lass/2configs/games.nix
+++ b/lass/2configs/games.nix
@@ -73,6 +73,10 @@ in {
extraGroups = [ "audio" "video" "input" "loot" ];
createHome = true;
useDefaultShell = true;
+ packages = with pkgs; [
+ ftb
+ minecraft
+ ];
};
};
diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix
index 59c0f5220..1fe87c666 100644
--- a/lass/2configs/git.nix
+++ b/lass/2configs/git.nix
@@ -79,9 +79,9 @@ let
nick = config.krebs.build.host.name;
channel = "#xxx";
server = "irc.r";
- verbose = false;
+ verbose = config.krebs.build.host.name == "prism";
# TODO define branches in some kind of option per repo
- branches = [ "master" "staging*" ];
+ branches = [ "master" ];
};
};
};
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)}
'')
diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix
index 962efaf3f..c6866c69d 100644
--- a/lass/2configs/mail.nix
+++ b/lass/2configs/mail.nix
@@ -1,3 +1,4 @@
+with import <stockholm/lib>;
{ pkgs, ... }:
let
@@ -19,6 +20,22 @@ let
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
'';
+ mailboxes = {
+ c-base = [ "to:c-base.org" ];
+ 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" ''
+ ${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
@@ -71,23 +88,15 @@ let
# V
''} %r |"
- virtual-mailboxes \
- "Unread" "notmuch://?query=tag:unread"\
- "INBOX" "notmuch://?query=tag:inbox \
- and NOT to:nix-devel\
- and NOT to:shackspace\
- and NOT to:security\
- and NOT to:c-base" \
- "shack" "notmuch://?query=to:shackspace"\
- "c-base" "notmuch://?query=to:c-base"\
- "security" "notmuch://?query=to:securityfocus or from:security-alert@hpe.com"\
- "nix" "notmuch://?query=to:nix-devel"\
- "radio" "notmuch://?query=to:radio or tag:radio"\
- "TODO" "notmuch://?query=tag:TODO"\
- "Starred" "notmuch://?query=tag:*"\
- "Archive" "notmuch://?query=tag:archive"\
- "Sent" "notmuch://?query=tag:sent"\
- "Junk" "notmuch://?query=tag:junk"
+ virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox"
+ virtual-mailboxes "Unread" "notmuch://?query=tag:unread"
+ ${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"
+ 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" \
@@ -161,5 +170,6 @@ in {
mutt
pkgs.much
pkgs.notmuch
+ tag-mails
];
}
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"; }
];
}
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
+ ];
+ };
+}
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index 7f531bf3a..a83d51f1d 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -118,6 +118,7 @@ in {
if test $(timeLeft) -le $LIMIT; then
${add_random}/bin/add_random
fi
+ ${pkgs.mpc_cli}/bin/mpc play > /dev/null
'';
in {
description = "radio playlist autoadder";
diff --git a/lass/2configs/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"
+ '';
+}
diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix
index 5fe9e1450..6014fd082 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;
@@ -68,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 <esc>q :buffer
nmap <M-q> :buffer
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;
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
'';
}
diff --git a/lass/2configs/zsh.nix b/lass/2configs/zsh.nix
index 7b0ef79f3..aa3e6731d 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
@@ -72,25 +71,6 @@
alias la='ls -la'
#fancy window title magic
- case $TERM in
- (*xterm* | *rxvt*)
- function precmd {
- if test -n "$SSH_CLIENT"; then
- echo -ne "\033]0;$$ $USER@$HOST $PWD\007"
- else
- echo -ne "\033]0;$$ $USER@$PWD\007"
- fi
- }
- # This is seen while the shell waits for a command to complete.
- function preexec {
- if test -n "$SSH_CLIENT"; then
- echo -ne "\033]0;$$ $USER@$HOST $PWD $1\007"
- else
- echo -ne "\033]0;$$ $USER@$PWD $1\007"
- fi
- }
- ;;
- esac
'';
promptInit = ''
# TODO: figure out why we need to set this here
@@ -101,27 +81,59 @@
autoload -U promptinit
promptinit
- error='%(?..%F{red}%?%f )'
+ p_error='%(?..%F{red}%?%f )'
+ t_error='%(?..%? )'
case $UID in
0)
- username='%F{red}root%f '
+ p_username='%F{red}root%f'
+ t_username='root'
;;
1337)
- username=""
+ p_username=""
+ t_username=""
;;
*)
- username='%F{blue}%n%f '
+ p_username='%F{blue}%n%f'
+ t_username='%n'
;;
esac
if test -n "$SSH_CLIENT"; then
- PROMPT="$error$username@%F{magenta}%M%f %~ "
+ p_hostname='@%F{magenta}%M%f '
+ t_hostname='@%M '
+ else
+ p_hostname=""
+ t_hostname=""
+ fi
+
+ #check if in nix shell
+ if test -n "$IN_NIX_SHELL"; then
+ p_nixshell='%F{green}[s]%f '
+ t_nixshell='[s] '
else
- PROMPT="$error$username%~ "
+ p_nixshell=""
+ t_nixshell=""
fi
+
+ PROMPT="$p_error$p_username$p_hostname$p_nixshell%~ "
+ TITLE="$t_error$t_username$t_hostname$t_nixshell%~"
+ case $TERM in
+ (*xterm* | *rxvt*)
+ function precmd {
+ PROMPT_EVALED="$(print -P $TITLE)"
+ echo -ne "\033]0;$$ $PROMPT_EVALED\007"
+ }
+ # This is seen while the shell waits for a command to complete.
+ function preexec {
+ PROMPT_EVALED="$(print -P $TITLE)"
+ echo -ne "\033]0;$$ $PROMPT_EVALED $1\007"
+ }
+ ;;
+ esac
'';
};
- users.users.mainUser.shell = "/run/current-system/sw/bin/zsh";
- users.users.root.shell = "/run/current-system/sw/bin/zsh";
+ environment.shellAliases.ns = "nix-shell --command zsh";
+
+ users.defaultUserShell = "/run/current-system/sw/bin/zsh";
}