summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
Diffstat (limited to 'lass')
-rw-r--r--lass/1systems/iso.nix152
-rw-r--r--lass/1systems/prism.nix3
-rw-r--r--lass/2configs/baseX.nix1
-rw-r--r--lass/2configs/buildbot-standalone.nix2
-rw-r--r--lass/2configs/mail.nix4
-rw-r--r--lass/2configs/monitoring/client.nix105
-rw-r--r--lass/2configs/monitoring/server.nix83
-rw-r--r--lass/2configs/newsbot-js.nix5
-rw-r--r--lass/2configs/nixpkgs.nix2
-rw-r--r--lass/2configs/repo-sync.nix3
-rw-r--r--lass/2configs/websites/domsen.nix10
-rw-r--r--lass/3modules/default.nix3
-rw-r--r--lass/3modules/kapacitor.nix143
-rw-r--r--lass/3modules/telegraf.nix84
-rw-r--r--lass/3modules/urxvtd.nix55
-rw-r--r--lass/5pkgs/xmonad-lass.nix1
16 files changed, 242 insertions, 414 deletions
diff --git a/lass/1systems/iso.nix b/lass/1systems/iso.nix
new file mode 100644
index 000000000..9dfbf7cb8
--- /dev/null
+++ b/lass/1systems/iso.nix
@@ -0,0 +1,152 @@
+{ config, pkgs, ... }:
+
+with import <stockholm/lib>;
+{
+ imports = [
+ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
+ ../../krebs
+ ../3modules
+ ../5pkgs
+ ../2configs/binary-cache/client.nix
+ ../2configs/mc.nix
+ ../2configs/nixpkgs.nix
+ ../2configs/vim.nix
+ {
+ krebs.enable = true;
+ krebs.build.user = config.krebs.users.lass;
+ krebs.build.host = config.krebs.hosts.iso;
+ krebs.build.source.nixos-config.symlink = "stockholm/lass/1systems/${config.krebs.buil.host.name}.nix";
+ }
+ {
+ nixpkgs.config.allowUnfree = true;
+ }
+ {
+ users.extraUsers = {
+ root = {
+ openssh.authorizedKeys.keys = [
+ config.krebs.users.lass.pubkey
+ config.krebs.users.lass-shodan.pubkey
+ config.krebs.users.lass-icarus.pubkey
+ ];
+ };
+ };
+ }
+ {
+ environment.extraInit = ''
+ EDITOR=vim
+ '';
+ }
+ {
+ environment.systemPackages = with pkgs; [
+ #stockholm
+ git
+ gnumake
+ jq
+ parallel
+ proot
+ populate
+
+ #style
+ most
+ rxvt_unicode.terminfo
+
+ #monitoring tools
+ htop
+ iotop
+
+ #network
+ iptables
+ iftop
+
+ #stuff for dl
+ aria2
+
+ #neat utils
+ krebspaste
+ pciutils
+ pop
+ psmisc
+ q
+ rs
+ tmux
+ untilport
+ usbutils
+
+ #unpack stuff
+ p7zip
+ unzip
+ unrar
+
+ #data recovery
+ ddrescue
+ ntfs3g
+ dosfstools
+ ];
+ }
+ {
+ programs.bash = {
+ enableCompletion = true;
+ interactiveShellInit = ''
+ HISTCONTROL='erasedups:ignorespace'
+ HISTSIZE=65536
+ HISTFILESIZE=$HISTSIZE
+
+ shopt -s checkhash
+ shopt -s histappend histreedit histverify
+ shopt -s no_empty_cmd_completion
+ complete -d cd
+ '';
+ promptInit = ''
+ if test $UID = 0; then
+ PS1='\[\033[1;31m\]\w\[\033[0m\] '
+ PROMPT_COMMAND='echo -ne "\033]0;$$ $USER@$PWD\007"'
+ elif test $UID = 1337; then
+ PS1='\[\033[1;32m\]\w\[\033[0m\] '
+ PROMPT_COMMAND='echo -ne "\033]0;$$ $PWD\007"'
+ else
+ PS1='\[\033[1;33m\]\u@\w\[\033[0m\] '
+ PROMPT_COMMAND='echo -ne "\033]0;$$ $USER@$PWD\007"'
+ fi
+ if test -n "$SSH_CLIENT"; then
+ PS1='\[\033[35m\]\h'" $PS1"
+ PROMPT_COMMAND='echo -ne "\033]0;$$ $HOSTNAME $USER@$PWD\007"'
+ fi
+ '';
+ };
+ }
+ {
+ services.openssh = {
+ enable = true;
+ hostKeys = [
+ # XXX bits here make no science
+ { bits = 8192; type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; }
+ ];
+ };
+ }
+ {
+ krebs.iptables = {
+ enable = true;
+ tables = {
+ nat.PREROUTING.rules = [
+ { predicate = "! -i retiolum -p tcp -m tcp --dport 22"; target = "REDIRECT --to-ports 0"; precedence = 100; }
+ { predicate = "-p tcp -m tcp --dport 45621"; target = "REDIRECT --to-ports 22"; precedence = 99; }
+ ];
+ nat.OUTPUT.rules = [
+ { predicate = "-o lo -p tcp -m tcp --dport 45621"; target = "REDIRECT --to-ports 22"; precedence = 100; }
+ ];
+ filter.INPUT.policy = "DROP";
+ filter.FORWARD.policy = "DROP";
+ filter.INPUT.rules = [
+ { predicate = "-m conntrack --ctstate RELATED,ESTABLISHED"; target = "ACCEPT"; precedence = 10001; }
+ { predicate = "-p icmp"; target = "ACCEPT"; precedence = 10000; }
+ { predicate = "-i lo"; target = "ACCEPT"; precedence = 9999; }
+ { predicate = "-p tcp --dport 22"; target = "ACCEPT"; precedence = 9998; }
+ { predicate = "-p tcp -i retiolum"; target = "REJECT --reject-with tcp-reset"; precedence = -10000; }
+ { predicate = "-p udp -i retiolum"; target = "REJECT --reject-with icmp-port-unreachable"; v6 = false; precedence = -10000; }
+ { predicate = "-i retiolum"; target = "REJECT --reject-with icmp-proto-unreachable"; v6 = false; precedence = -10000; }
+ ];
+ };
+ };
+ }
+ ];
+}
diff --git a/lass/1systems/prism.nix b/lass/1systems/prism.nix
index f9654ac4c..c0c22a0de 100644
--- a/lass/1systems/prism.nix
+++ b/lass/1systems/prism.nix
@@ -215,7 +215,8 @@ in {
}
{
krebs.repo-sync.timerConfig = {
- OnCalendar = "*:0/5";
+ OnUnitInactiveSec = "5min";
+ RandomizedDelaySec = "2min";
};
}
{
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index e879e8e58..2933ca0e4 100644
--- a/lass/2configs/baseX.nix
+++ b/lass/2configs/baseX.nix
@@ -66,7 +66,6 @@ in {
youtube-tools
rxvt_unicode
- termite
#window manager stuff
#haskellPackages.xmobar
#haskellPackages.yeganesh
diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix
index c9e2928b3..cd11254d6 100644
--- a/lass/2configs/buildbot-standalone.nix
+++ b/lass/2configs/buildbot-standalone.nix
@@ -11,7 +11,7 @@ let
in {
config.krebs.buildbot.master = let
- stockholm-mirror-url = http://cgit.prism/stockholm ;
+ stockholm-mirror-url = http://cgit.lassul.us/stockholm ;
in {
workers = {
testworker = "lasspass";
diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix
index 872acc003..e4b319528 100644
--- a/lass/2configs/mail.nix
+++ b/lass/2configs/mail.nix
@@ -17,7 +17,7 @@ let
muttrc = pkgs.writeText "muttrc" ''
# gpg
- source ${pkgs.mutt-kz}/share/doc/mutt-kz/samples/gpg.rc
+ source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc
set pgp_use_gpg_agent = yes
set pgp_sign_as = 0x976A7E4D
set crypt_autosign = yes
@@ -99,7 +99,7 @@ let
'';
mutt = pkgs.writeDashBin "mutt" ''
- exec ${pkgs.mutt-kz}/bin/mutt -F ${muttrc} $@
+ exec ${pkgs.neomutt}/bin/mutt -F ${muttrc} $@
'';
in {
diff --git a/lass/2configs/monitoring/client.nix b/lass/2configs/monitoring/client.nix
index e879d6960..e2b7dcae6 100644
--- a/lass/2configs/monitoring/client.nix
+++ b/lass/2configs/monitoring/client.nix
@@ -1,94 +1,35 @@
{pkgs, config, ...}:
with import <stockholm/lib>;
{
- lass.telegraf = {
+ services.telegraf = {
enable = true;
- interval = "1s";
-
- outputs = ''
- [outputs.influxdb]
- urls = ["http://prism:8086"]
- database = "telegraf_db"
- user_agent = "telegraf"
- '';
- inputs = [
- ''
- [cpu]
- percpu = false
- totalcpu = true
- drop = ["cpu_time"]
- ''
- ''
- [[inputs.mem]]
- ''
- ''
- [[inputs.ping]]
- urls = ["8.8.8.8"]
- ''
- ''
- [[inputs.net]]
- ''
- ''
- [[inputs.dns_query]]
- servers = ["8.8.8.8"]
- ''
- ];
+ extraConfig = {
+ agent.interval = "1s";
+ outputs = {
+ influxdb = {
+ urls = ["http://prism:8086"];
+ database = "telegraf_db";
+ user_agent = "telegraf";
+ };
+ };
+ inputs = {
+ cpu = {
+ percpu = false;
+ totalcpu = true;
+ };
+ mem = {};
+ net = {};
+ };
+ };
};
- systemd.services.telegraf.path = with pkgs; [
- iputils
- lm_sensors
- ];
- services.collectd = {
+ services.journalbeat = {
enable = true;
- autoLoadPlugin = true;
extraConfig = ''
- Hostname ${config.krebs.build.host.name}
- LoadPlugin load
- LoadPlugin disk
- LoadPlugin memory
- Interval 30.0
-
- LoadPlugin interface
- <Plugin "interface">
- Interface "*Link"
- Interface "lo"
- Interface "vboxnet*"
- Interface "virbr*"
- IgnoreSelected true
- </Plugin>
-
- LoadPlugin df
- <Plugin "df">
- MountPoint "/nix/store"
- FSType "tmpfs"
- FSType "binfmt_misc"
- FSType "debugfs"
- FSType "mqueue"
- FSType "hugetlbfs"
- FSType "systemd-1"
- FSType "cgroup"
- FSType "securityfs"
- FSType "ramfs"
- FSType "proc"
- FSType "devpts"
- FSType "devtmpfs"
- MountPoint "/var/lib/docker/devicemapper"
- IgnoreSelected true
- </Plugin>
-
- LoadPlugin cpu
- <Plugin cpu>
- ReportByCpu true
- ReportByState true
- ValuesPercentage true
- </Plugin>
-
- LoadPlugin network
- <Plugin "network">
- Server "prism" "25826"
- </Plugin>
+ output.elasticsearch:
+ hosts: ["prism:9200"]
+ template.enabled: false
'';
};
}
diff --git a/lass/2configs/monitoring/server.nix b/lass/2configs/monitoring/server.nix
index 2e1c15ca1..bbae4511e 100644
--- a/lass/2configs/monitoring/server.nix
+++ b/lass/2configs/monitoring/server.nix
@@ -1,15 +1,14 @@
{pkgs, config, ...}:
with import <stockholm/lib>;
{
- services.influxdb = {
- enable = true;
- };
+ services.influxdb.enable = true;
services.influxdb.extraConfig = {
meta.hostname = config.krebs.build.host.name;
# meta.logging-enabled = true;
http.bind-address = ":8086";
admin.bind-address = ":8083";
+ http.log-enabled = false;
monitoring = {
enabled = false;
# write-interval = "24h";
@@ -22,45 +21,79 @@ with import <stockholm/lib>;
}];
};
- lass.kapacitor =
+ krebs.kapacitor =
let
+ db = "telegraf_db";
echoToIrc = pkgs.writeDash "echo_irc" ''
set -euf
data="$(${pkgs.jq}/bin/jq -r .message)"
export LOGNAME=prism-alarm
${pkgs.irc-announce}/bin/irc-announce \
- irc.freenode.org 6667 prism-alarm \#krebs-bots "$data" >/dev/null
+ ni.r 6667 prism-alarm \#retiolum "$data" >/dev/null
'';
in {
enable = true;
alarms = {
- test2 = ''
- batch
- |query(${"'''"}
- SELECT mean("usage_user") AS mean
- FROM "${config.lass.kapacitor.check_db}"."default"."cpu"
- ${"'''"})
- .every(3m)
- .period(1m)
- .groupBy('host')
- |alert()
- .crit(lambda: "mean" > 90)
- // Whenever we get an alert write it to a file.
- .log('/tmp/alerts.log')
- .exec('${echoToIrc}')
- '';
+ cpu = {
+ database = db;
+ text = ''
+ var data = batch
+ |query(${"'''"}
+ SELECT mean("usage_user") AS mean
+ FROM "${db}"."default"."cpu"
+ ${"'''"})
+ .period(10m)
+ .every(1m)
+ .groupBy('host')
+ data |alert()
+ .crit(lambda: "mean" > 90)
+ .exec('${echoToIrc}')
+ data |deadman(1.0,5m)
+ .stateChangesOnly()
+ .exec('${echoToIrc}')
+ '';
+ };
+ ram = {
+ database = db;
+ text = ''
+ var data = batch
+ |query(${"'''"}
+ SELECT mean("used_percent") AS mean
+ FROM "${db}"."default"."mem"
+ ${"'''"})
+ .period(10m)
+ .every(1m)
+ .groupBy('host')
+ data |alert()
+ .crit(lambda: "mean" > 90)
+ .exec('${echoToIrc}')
+ '';
+ };
};
};
- krebs.iptables.tables.filter.INPUT.rules = [
- { predicate = "-p tcp -i retiolum --dport 8086"; target = "ACCEPT"; }
- { predicate = "-p tcp -i retiolum --dport 3000"; target = "ACCEPT"; }
- { predicate = "-p udp -i retiolum --dport 25826"; target = "ACCEPT"; }
- ];
services.grafana = {
enable = true;
addr = "0.0.0.0";
auth.anonymous.enable = true;
security = import <secrets/grafana_security.nix>; # { AdminUser = ""; adminPassword = ""}
};
+
+ services.elasticsearch = {
+ enable = true;
+ listenAddress = "0.0.0.0";
+ };
+
+ services.kibana = {
+ enable = true;
+ listenAddress = "0.0.0.0";
+ };
+
+ krebs.iptables.tables.filter.INPUT.rules = [
+ { predicate = "-p tcp -i retiolum --dport 8086"; target = "ACCEPT"; }
+ { predicate = "-p tcp -i retiolum --dport 3000"; target = "ACCEPT"; }
+ { predicate = "-p udp -i retiolum --dport 25826"; target = "ACCEPT"; }
+ { predicate = "-p tcp -i retiolum --dport 9200"; target = "ACCEPT"; }
+ { predicate = "-p tcp -i retiolum --dport 5601"; target = "ACCEPT"; }
+ ];
}
diff --git a/lass/2configs/newsbot-js.nix b/lass/2configs/newsbot-js.nix
index 46ff3fbf9..3c6c5dc88 100644
--- a/lass/2configs/newsbot-js.nix
+++ b/lass/2configs/newsbot-js.nix
@@ -10,10 +10,6 @@ let
arbor|http://feeds2.feedburner.com/asert/|#news
archlinux|http://www.archlinux.org/feeds/news/|#news
ars|http://feeds.arstechnica.com/arstechnica/index?format=xml|#news
- asiaone_asia|http://news.asiaone.com/rss/asia|#news
- asiaone_business|http://business.asiaone.com/rss.xml|#news
- asiaone_sci|http://news.asiaone.com/rss/science-and-tech|#news
- asiaone_world|http://news.asiaone.com/rss/world|#news
augustl|http://augustl.com/atom.xml|#news
bbc|http://feeds.bbci.co.uk/news/rss.xml|#news
bdt_drucksachen|http://www.bundestag.de/dip21rss/bundestag_drucksachen.rss|#news #bundestag
@@ -78,7 +74,6 @@ let
heise|http://heise.de.feedsportal.com/c/35207/f/653902/index.rss|#news
hindu_business|http://www.thehindubusinessline.com/?service=rss|#news #financial
hindu|http://www.thehindu.com/?service=rss|#news
- hintergrund|http://www.hintergrund.de/index.php?option=com_bca-rss-syndicator&feed_id=8|#news
ign|http://feeds.ign.com/ign/all|#news
independent|http://www.independent.com/rss/headlines/|#news
indymedia|http://de.indymedia.org/RSS/newswire.xml|#news
diff --git a/lass/2configs/nixpkgs.nix b/lass/2configs/nixpkgs.nix
index 4a1b0379b..aef9dd8b4 100644
--- a/lass/2configs/nixpkgs.nix
+++ b/lass/2configs/nixpkgs.nix
@@ -3,6 +3,6 @@
{
krebs.build.source.nixpkgs.git = {
url = https://github.com/nixos/nixpkgs;
- ref = "5fff5a902594b34471b613eb2babcec923e1e1f1";
+ ref = "f7b7d8e";
};
}
diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix
index b1a26b171..83f646130 100644
--- a/lass/2configs/repo-sync.nix
+++ b/lass/2configs/repo-sync.nix
@@ -49,7 +49,7 @@ let
mirror.url = "${mirror}${name}";
};
lassulus = {
- origin.url = "http://cgit.prism/${name}";
+ origin.url = "http://cgit.lassul.us/${name}";
mirror.url = "${mirror}${name}";
};
"@latest" = {
@@ -102,6 +102,7 @@ in {
(sync-retiolum "go")
(sync-retiolum "much")
(sync-retiolum "newsbot-js")
+ (sync-retiolum "populate")
(sync-retiolum "stockholm")
(sync-retiolum "wai-middleware-time")
(sync-retiolum "web-routes-wai-custom")
diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix
index 66fc681b1..0b75425c4 100644
--- a/lass/2configs/websites/domsen.nix
+++ b/lass/2configs/websites/domsen.nix
@@ -118,8 +118,7 @@ in {
{ from = "mail@jla-trading.com"; to = "jla-trading"; }
{ from = "jms@ubikmedia.eu"; to = "jms"; }
{ from = "ms@ubikmedia.eu"; to = "ms"; }
- { from = "nrg@ubikmedia.eu"; to = "nrg"; }
- { from = "ubik@ubikmedia.eu"; to = "domsen, jms, ms, nrg"; }
+ { from = "ubik@ubikmedia.eu"; to = "domsen, jms, ms"; }
{ from = "testuser@lassul.us"; to = "testuser"; }
];
@@ -161,13 +160,6 @@ in {
createHome = true;
};
- users.users.nrg = {
- uid = genid_signed "nrg";
- home = "/home/nrg";
- useDefaultShell = true;
- createHome = true;
- };
-
users.users.testuser = {
uid = genid_signed "testuser";
home = "/home/testuser";
diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix
index 2bf2df8b3..959c9d1b4 100644
--- a/lass/3modules/default.nix
+++ b/lass/3modules/default.nix
@@ -6,10 +6,7 @@ _:
./hosts.nix
./mysql-backup.nix
./umts.nix
- ./urxvtd.nix
./usershadow.nix
./xresources.nix
- ./kapacitor.nix
- ./telegraf.nix
];
}
diff --git a/lass/3modules/kapacitor.nix b/lass/3modules/kapacitor.nix
deleted file mode 100644
index 299a56d92..000000000
--- a/lass/3modules/kapacitor.nix
+++ /dev/null
@@ -1,143 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with builtins;
-with lib;
-
-let
- cfg = config.lass.kapacitor;
-
- out = {
- options.lass.kapacitor = api;
- config = mkIf cfg.enable imp;
- };
-
- api = {
- enable = mkEnableOption "kapacitor";
- dataDir = mkOption {
- type = types.str;
- default = "/var/lib/kapacitor";
- };
- user = mkOption {
- type = types.str;
- default = "kapacitor";
- };
- logLevel = mkOption {
- type = types.enum ["DEBUG" "INFO" "WARN" "ERROR" "OFF"];
- default = "INFO";
- };
- alarms = mkOption {
- type = with types; attrsOf str;
- default = {};
- };
- check_db = mkOption {
- type = types.str;
- default = "all_data";
- };
- config = mkOption {
- type = types.str;
- #TODO: find a good default
- default = ''
- hostname = "localhost"
- data_dir = "${cfg.dataDir}"
-
- [http]
- bind-address = ":9092"
- auth-enabled = false
- log-enabled = true
- write-tracing = false
- pprof-enabled = false
- https-enabled = false
- https-certificate = "/etc/ssl/kapacitor.pem"
- shutdown-timeout = "10s"
- shared-secret = ""
-
- [replay]
- dir = "${cfg.dataDir}/replay"
-
- [storage]
- boltdb = "${cfg.dataDir}/kapacitor.db"
-
- [task]
- dir = "${cfg.dataDir}/tasks"
- snapshot-interval = "1m0s"
-
- [[influxdb]]
- enabled = true
- name = "default"
- default = false
- urls = ["http://localhost:8086"]
- username = ""
- password = ""
- ssl-ca = ""
- ssl-cert = ""
- ssl-key = ""
- insecure-skip-verify = false
- timeout = "0s"
- disable-subscriptions = false
- subscription-protocol = "http"
- udp-bind = ""
- udp-buffer = 1000
- udp-read-buffer = 0
- startup-timeout = "5m0s"
- subscriptions-sync-interval = "1m0s"
- [influxdb.subscriptions]
- [influxdb.excluded-subscriptions]
- _kapacitor = ["autogen"]
-
- [logging]
- file = "STDERR"
- level = "${cfg.logLevel}"
-
- [deadman]
- interval = "10s"
- threshold = 0.0
- id = "{{ .Group }}:NODE_NAME for task '{{ .TaskName }}'"
- message = "{{ .ID }} is {{ if eq .Level \"OK\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \"emitted\" | printf \"%0.3f\" }} points/INTERVAL."
- global = false
- '';
- description = "configuration kapacitor is started with";
- };
- };
-
- configFile = pkgs.writeText "kapacitor.conf" cfg.config;
-
- imp = {
-
- systemd.services.kapacitor = {
- description = "kapacitor";
- after = [ "network.target" ];
- wantedBy = [ "multi-user.target" ];
-
- restartIfChanged = true;
-
- serviceConfig = {
- Restart = "always";
- ExecStart = "${pkgs.kapacitor}/bin/kapacitord -config ${configFile}";
- };
- };
-
- systemd.services.kapacitor-alarms = {
- description = "kapacitor-alarms";
- after = [ "kapacitor.service" ];
- wantedBy = [ "multi-user.target" ];
-
- restartIfChanged = true;
-
- serviceConfig = {
- Type = "oneshot";
- ExecStart = pkgs.writeDash "add_alarms" ''
- ${pkgs.kapacitor}/bin/kapacitor delete tasks \*
- ${concatStrings (mapAttrsToList (name: alarm: ''
- ${pkgs.kapacitor}/bin/kapacitor define ${name} \
- -type batch \
- -tick ${pkgs.writeText "${name}.tick" alarm} \
- -dbrp ${cfg.check_db}.default
- ${pkgs.kapacitor}/bin/kapacitor enable ${name}
- '') cfg.alarms)}
- '';
- };
- };
-
- };
-
-in out
diff --git a/lass/3modules/telegraf.nix b/lass/3modules/telegraf.nix
deleted file mode 100644
index 0b3be2d69..000000000
--- a/lass/3modules/telegraf.nix
+++ /dev/null
@@ -1,84 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with builtins;
-with lib;
-
-let
- cfg = config.lass.telegraf;
-
- out = {
- options.lass.telegraf = api;
- config = mkIf cfg.enable imp;
- };
-
- api = {
- enable = mkEnableOption "telegraf";
- dataDir = mkOption {
- type = types.str;
- default = "/var/lib/telegraf";
- };
- user = mkOption {
- type = types.str;
- default = "telegraf";
- };
- outputs = mkOption {
- type = types.str;
- default = ''
- [outputs.influxdb]
- urls = ["http://localhost:8086"]
- database = "telegraf_db"
- user_agent = "telegraf"
- '';
- };
- inputs = mkOption {
- type = with types; listOf str;
- default = [
- ''
- [cpu]
- percpu = false
- totalcpu = true
- drop = ["cpu_time"]
- ''
- ];
- };
- interval = mkOption {
- type = types.str;
- default = "10s";
- };
- config = mkOption {
- type = types.str;
- #TODO: find a good default
- default = ''
- [agent]
- interval = "${cfg.interval}"
-
- [outputs]
-
- ${cfg.outputs}
-
- ${concatStringsSep "\n" cfg.inputs}
-
- '';
- description = "configuration telegraf is started with";
- };
- };
-
- configFile = pkgs.writeText "telegraf.conf" cfg.config;
-
- imp = {
-
- systemd.services.telegraf = {
- description = "telegraf";
- after = [ "network.target" ];
- wantedBy = [ "multi-user.target" ];
-
- restartIfChanged = true;
-
- serviceConfig = {
- Restart = "always";
- ExecStart = "${pkgs.telegraf}/bin/telegraf -config ${configFile}";
- };
- };
- };
-
-in out
diff --git a/lass/3modules/urxvtd.nix b/lass/3modules/urxvtd.nix
deleted file mode 100644
index 469616a9f..000000000
--- a/lass/3modules/urxvtd.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
-in
-
-with builtins;
-with lib;
-
-{
- options = {
- services.urxvtd = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Enable urxvtd per user";
- };
- users = mkOption {
- type = types.listOf types.string;
- default = [];
- description = "users to run urxvtd for";
- };
- urxvtPackage = mkOption {
- type = types.package;
- default = pkgs.rxvt_unicode;
- description = "urxvt package to use";
- };
- };
- };
-
- config =
- let
- cfg = config.services.urxvtd;
- users = cfg.users;
- urxvt = cfg.urxvtPackage;
- mkService = user: {
- description = "urxvt terminal daemon";
- wantedBy = [ "multi-user.target" ];
- restartIfChanged = false;
- path = [ pkgs.xlibs.xrdb ];
- environment = {
- DISPLAY = ":0";
- URXVT_PERL_LIB = "${urxvt}/lib/urxvt/perl";
- };
- serviceConfig = {
- Restart = "always";
- User = user;
- ExecStart = "${urxvt}/bin/urxvtd";
- };
- };
- in
- mkIf cfg.enable {
- environment.systemPackages = [ urxvt ];
- systemd.services = listToAttrs (map (u: { name = "${u}-urxvtd"; value = mkService u; }) users);
- };
-}
diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix
index cf8eaf058..dd4d8803c 100644
--- a/lass/5pkgs/xmonad-lass.nix
+++ b/lass/5pkgs/xmonad-lass.nix
@@ -129,7 +129,6 @@ myKeyMap =
, ("M4-<Esc>", toggleWS)
, ("M4-S-<Enter>", spawn urxvtcPath)
, ("M4-x", floatNext True >> spawn urxvtcPath)
- , ("M4-z", floatNext True >> spawn "${pkgs.termite}/bin/termite")
, ("M4-f", floatNext True)
, ("M4-b", sendMessage ToggleStruts)