From 2b8f8363392a7b337b3f67ffae93719f15952754 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Jan 2017 08:36:29 +0100 Subject: infest/prepare: fix style inconsistencies --- krebs/4lib/infest/prepare.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/4lib/infest/prepare.sh b/krebs/4lib/infest/prepare.sh index e265b0e67..3068e2b00 100644 --- a/krebs/4lib/infest/prepare.sh +++ b/krebs/4lib/infest/prepare.sh @@ -143,10 +143,10 @@ prepare_common() {( mkdir -p /mnt/boot if mount | grep -Fq ' on /boot type '; then - bootdev=$(mount | grep " on /boot type " | sed 's/ .*//') - mount $bootdev /mnt/boot + bootpart=$(mount | grep ' on /boot type ' | sed 's/ .*//') + mount $bootpart /mnt/boot else - mount --bind /boot/ /mnt/boot + mount --bind /boot /mnt/boot fi fi @@ -155,7 +155,7 @@ prepare_common() {( # prepare install directory # - rootpart=$(mount | grep " on / type" | sed 's/ .*//') + rootpart=$(mount | grep ' on / type ' | sed 's/ .*//') mkdir -p /mnt/etc/nixos mkdir -m 0555 -p /mnt/var/empty -- cgit v1.2.3 From 19f8234cef2934e0a0c43a28efbf9a057154c704 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Jan 2017 08:36:55 +0100 Subject: infest/prepare: touch /mnt/var/src/.populate --- krebs/4lib/infest/prepare.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/krebs/4lib/infest/prepare.sh b/krebs/4lib/infest/prepare.sh index 3068e2b00..3f5d66431 100644 --- a/krebs/4lib/infest/prepare.sh +++ b/krebs/4lib/infest/prepare.sh @@ -159,6 +159,8 @@ prepare_common() {( mkdir -p /mnt/etc/nixos mkdir -m 0555 -p /mnt/var/empty + mkdir -p /mnt/var/src + touch /mnt/var/src/.populate if ! mount | grep -Fq "$rootpart on /mnt/root type "; then mkdir -p /mnt/root -- cgit v1.2.3 From 3607bd0832d0f47a4bf56cae7e4cb14f6e257bc9 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Jan 2017 11:50:37 +0100 Subject: cd: hart eingeCACt --- krebs/3modules/tv/default.nix | 2 +- tv/1systems/cd.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index d44c322aa..1220143a7 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -85,7 +85,7 @@ with import ; }; nets = { internet = { - ip4.addr = "45.62.237.203"; + ip4.addr = "64.137.177.226"; aliases = [ "cd.i" "cd.krebsco.de" diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 108006f34..b718d19b8 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -16,11 +16,11 @@ with import ; networking = { interfaces.enp2s1.ip4 = singleton { address = let - addr = "45.62.237.203"; + addr = "64.137.177.226"; in assert config.krebs.build.host.nets.internet.ip4.addr == addr; addr; prefixLength = 24; }; - defaultGateway = "45.62.237.1"; + defaultGateway = "64.137.177.1"; nameservers = ["8.8.8.8"]; }; -- cgit v1.2.3 From 0d4911ce2f7b44af8e04bfd37f25593aa1c33eda Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Jan 2017 12:23:42 +0100 Subject: tv backup: drop *-pull-cd-ejabberd --- tv/2configs/backup.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index 7c91b1cf1..5cc86cfdd 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -46,12 +46,6 @@ with import ; dst = { host = config.krebs.hosts.zu; path = "/bku/xu-home"; }; startAt = "06:20"; }; - xu-pull-cd-ejabberd = { - method = "pull"; - src = { host = config.krebs.hosts.cd; path = "/var/ejabberd"; }; - dst = { host = config.krebs.hosts.xu; path = "/bku/cd-ejabberd"; }; - startAt = "07:00"; - }; xu-pull-cd-home = { method = "pull"; src = { host = config.krebs.hosts.cd; path = "/home"; }; @@ -76,12 +70,6 @@ with import ; dst = { host = config.krebs.hosts.xu; path = "/bku/zu-home"; }; startAt = "05:00"; }; - zu-pull-cd-ejabberd = { - method = "pull"; - src = { host = config.krebs.hosts.cd; path = "/var/ejabberd"; }; - dst = { host = config.krebs.hosts.zu; path = "/bku/cd-ejabberd"; }; - startAt = "06:00"; - }; zu-pull-cd-home = { method = "pull"; src = { host = config.krebs.hosts.cd; path = "/home"; }; -- cgit v1.2.3 From ef757f6e37ac02e18e04dd2fdf15d6d723a679ec Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Jan 2017 21:03:23 +0100 Subject: tv: use body instead of out --- tv/2configs/git.nix | 6 +++--- tv/2configs/vim.nix | 7 +++---- tv/3modules/iptables.nix | 16 +++------------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/tv/2configs/git.nix b/tv/2configs/git.nix index 48d738365..9ccb0a057 100644 --- a/tv/2configs/git.nix +++ b/tv/2configs/git.nix @@ -2,9 +2,9 @@ with import ; -let +let { - out = { + body = { krebs.git = { enable = true; cgit = { @@ -123,4 +123,4 @@ let perm = fetch; }; -in out +} diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index cc59a95a5..1ffafe9c9 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -1,8 +1,8 @@ { config, lib, pkgs, ... }: with import ; -let - out = { +let { + body = { environment.systemPackages = [ vim ]; @@ -411,5 +411,4 @@ let catch /^Vim\%((\a\+)\)\=:E484/ endtry ''; -in -out +} diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix index 7276726ca..803ed6fbf 100644 --- a/tv/3modules/iptables.nix +++ b/tv/3modules/iptables.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: with import ; -let +let { cfg = config.tv.iptables; - out = { + body = { options.tv.iptables = api; config = lib.mkIf cfg.enable imp; }; @@ -146,14 +146,4 @@ let )} COMMIT ''; -in out - -#let -# cfg = config.tv.iptables; -# arg' = arg // { inherit cfg; }; -#in -# -#{ -# options.tv.iptables = import ./options.nix arg'; -# config = lib.mkIf cfg.enable (import ./config.nix arg'); -#} +} -- cgit v1.2.3 From 51bbf7f5c2077a5bab74a077049db7ef3d995ca9 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Jan 2017 12:51:06 +0100 Subject: alnus nixpkgs: d745044 -> e924319 --- tv/1systems/alnus.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tv/1systems/alnus.nix b/tv/1systems/alnus.nix index bc6e3a6d8..4bc0318e8 100644 --- a/tv/1systems/alnus.nix +++ b/tv/1systems/alnus.nix @@ -22,10 +22,6 @@ with import ; devices = [ { name = "luksroot"; device = "/dev/sda2"; } ]; }; }; - loader = { - efi.canTouchEfiVariables = true; - gummiboot.enable = true; - }; }; environment.systemPackages = with pkgs; [ @@ -62,7 +58,7 @@ with import ; krebs.build = { host = config.krebs.hosts.alnus; user = mkForce config.krebs.users.dv; - source.nixpkgs.git.ref = mkForce "d7450443c42228832c68fba203a7c15cfcfb264e"; + source.nixpkgs.git.ref = mkForce "e924319cb6c74aa2a9c943eddeb0caef79db01bc"; }; networking.networkmanager.enable = true; -- cgit v1.2.3 From 9779351be952095ed55ad4ccee98452a8838cfb9 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Jan 2017 13:28:23 +0100 Subject: krebs.git: add authorizedKeys only for users found in rules --- krebs/3modules/git.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix index 164831846..a08dbb32c 100644 --- a/krebs/3modules/git.nix +++ b/krebs/3modules/git.nix @@ -339,9 +339,11 @@ let description = "Git repository hosting user"; shell = "/bin/sh"; openssh.authorizedKeys.keys = - mapAttrsToList (_: makeAuthorizedKey git-ssh-command) - (filterAttrs (_: user: isString user.pubkey) - config.krebs.users); + unique + (sort lessThan + (map (makeAuthorizedKey git-ssh-command) + (filter (user: isString user.pubkey) + (concatMap (getAttr "user") cfg.rules)))); }; }; -- cgit v1.2.3 From 5d7a3d0cccc260565577a6441eadf12c1463a03d Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Jan 2017 13:07:58 +0100 Subject: wu: resurrect --- tv/1systems/wu.nix | 15 +++++++++------ tv/2configs/hw/w110er.nix | 8 +++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index d5be57bb8..a9d7e94eb 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -23,7 +23,6 @@ with import ; # stockholm gnumake hashPassword - haskellPackages.lentil parallel # root @@ -47,7 +46,6 @@ with import ; p7zip push qrencode - texLive tmux #ack @@ -116,18 +114,23 @@ with import ; boot.initrd.luks = { cryptoModules = [ "aes" "sha512" "xts" ]; devices = [ - { name = "home"; device = "/dev/vg840/enchome"; preLVM = false; } + { name = "wuca"; device = "/dev/sda2"; } ]; }; fileSystems = { "/" = { - device = "/dev/mapper/vg840-wuroot"; + device = "/dev/mapper/wuvga-root"; + fsType = "btrfs"; + options = ["defaults" "noatime" "ssd" "compress=lzo"]; + }; + "/bku" = { + device = "/dev/mapper/wuvga-bku"; fsType = "btrfs"; options = ["defaults" "noatime" "ssd" "compress=lzo"]; }; "/home" = { - device = "/dev/mapper/home"; + device = "/dev/mapper/wuvga-home"; fsType = "btrfs"; options = ["defaults" "noatime" "ssd" "compress=lzo"]; }; @@ -174,5 +177,5 @@ with import ; KERNEL=="hpet", GROUP="audio" ''; - services.virtualboxHost.enable = true; + virtualisation.virtualbox.host.enable = true; } diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index aa8292441..787bfc6e9 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -12,9 +12,11 @@ boot.initrd.availableKernelModules = [ "ahci" ]; boot.kernelModules = [ "kvm-intel" ]; - boot.loader.gummiboot.enable = true; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + hardware.opengl.extraPackages = [ pkgs.vaapiIntel ]; + networking.wireless.enable = true; nix = { @@ -31,10 +33,6 @@ HandleSuspendKey=ignore ''; - services.xserver = { - vaapiDrivers = [ pkgs.vaapiIntel ]; - }; - system.activationScripts.powertopTunables = '' echo 1 > /sys/module/snd_hda_intel/parameters/power_save echo 1500 > /proc/sys/vm/dirty_writeback_centisecs -- cgit v1.2.3 From 13aa779c4422eee2af9fc686eb66a7de5d79abab Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 16:38:22 +0100 Subject: k 5: add telegraf we need it here until the new stable branch is released --- krebs/5pkgs/telegraf/default.nix | 27 ++ krebs/5pkgs/telegraf/deps-1.1.2.nix | 588 ++++++++++++++++++++++++++++++++++++ 2 files changed, 615 insertions(+) create mode 100644 krebs/5pkgs/telegraf/default.nix create mode 100644 krebs/5pkgs/telegraf/deps-1.1.2.nix diff --git a/krebs/5pkgs/telegraf/default.nix b/krebs/5pkgs/telegraf/default.nix new file mode 100644 index 000000000..996c839ac --- /dev/null +++ b/krebs/5pkgs/telegraf/default.nix @@ -0,0 +1,27 @@ +{ lib, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "telegraf-${version}"; + version = "1.1.2"; + + goPackagePath = "github.com/influxdata/telegraf"; + + excludedPackages = "test"; + + src = fetchFromGitHub { + owner = "influxdata"; + repo = "telegraf"; + rev = "${version}"; + sha256 = "0dgrbdyz261j28wcq636125ha4xmfgh4y9shlg8m1y6jqdqd2zf2"; + }; + + goDeps = ./. + builtins.toPath "/deps-${version}.nix"; + + meta = with lib; { + description = "The plugin-driven server agent for collecting & reporting metrics."; + license = licenses.mit; + homepage = https://www.influxdata.com/time-series-platform/telegraf/; + maintainers = with maintainers; [ mic92 roblabla ]; + platforms = platforms.linux; + }; +} diff --git a/krebs/5pkgs/telegraf/deps-1.1.2.nix b/krebs/5pkgs/telegraf/deps-1.1.2.nix new file mode 100644 index 000000000..b62ae44db --- /dev/null +++ b/krebs/5pkgs/telegraf/deps-1.1.2.nix @@ -0,0 +1,588 @@ +# This file was generated by go2nix. +[ + { + goPackagePath = "github.com/Shopify/sarama"; + fetch = { + type = "git"; + url = "https://github.com/Shopify/sarama"; + rev = "8aadb476e66ca998f2f6bb3c993e9a2daa3666b9"; + sha256 = "1ndaddqcll9r22jg9x36acanxv5ds3xwahrm4b6nmmg06670gksv"; + }; + } + { + goPackagePath = "github.com/Sirupsen/logrus"; + fetch = { + type = "git"; + url = "https://github.com/Sirupsen/logrus"; + rev = "219c8cb75c258c552e999735be6df753ffc7afdc"; + sha256 = "04v55846v1535dplldyjhr0yqxl6n1mr4kiy2vz3ragv92xpshr6"; + }; + } + { + goPackagePath = "github.com/aerospike/aerospike-client-go"; + fetch = { + type = "git"; + url = "https://github.com/aerospike/aerospike-client-go"; + rev = "7f3a312c3b2a60ac083ec6da296091c52c795c63"; + sha256 = "05ancqplckvni9xp6xd4bv2pgkfa4v23svfcg27m8xinzi4ry219"; + }; + } + { + goPackagePath = "github.com/amir/raidman"; + fetch = { + type = "git"; + url = "https://github.com/amir/raidman"; + rev = "53c1b967405155bfc8758557863bf2e14f814687"; + sha256 = "08a6zz4akkm7lk02w53vfhkxdf0ikv32x41rc4jyi2qaf0wyw6b4"; + }; + } + { + goPackagePath = "github.com/aws/aws-sdk-go"; + fetch = { + type = "git"; + url = "https://github.com/aws/aws-sdk-go"; + rev = "13a12060f716145019378a10e2806c174356b857"; + sha256 = "09yl85kk2y4ayk44af5rbnkq4vy82vbh2z5ac4vpl2vgv7zyh46h"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3ac7bf7a47d159a033b107610db8a1b6575507a4"; + sha256 = "1qc3l4r818xpvrhshh1sisc5lvl9479qspcfcdbivdyh0apah83r"; + }; + } + { + goPackagePath = "github.com/cenkalti/backoff"; + fetch = { + type = "git"; + url = "https://github.com/cenkalti/backoff"; + rev = "4dc77674aceaabba2c7e3da25d4c823edfb73f99"; + sha256 = "0icf4vrgzksr0g8h6y00rd92h1mym6waf3mbqpf890bkw60gnm0w"; + }; + } + { + goPackagePath = "github.com/couchbase/go-couchbase"; + fetch = { + type = "git"; + url = "https://github.com/couchbase/go-couchbase"; + rev = "cb664315a324d87d19c879d9cc67fda6be8c2ac1"; + sha256 = "1dfw1apwrlfwl7bahb6dy5g9z2vs431l4lpaj3k9bnm13p0awivr"; + }; + } + { + goPackagePath = "github.com/couchbase/gomemcached"; + fetch = { + type = "git"; + url = "https://github.com/couchbase/gomemcached"; + rev = "a5ea6356f648fec6ab89add00edd09151455b4b2"; + sha256 = "00x57qqdv9ciyxiw2y6p4s65sfgi4cs6zi39qlqlw90nh133xnwi"; + }; + } + { + goPackagePath = "github.com/couchbase/goutils"; + fetch = { + type = "git"; + url = "https://github.com/couchbase/goutils"; + rev = "5823a0cbaaa9008406021dc5daf80125ea30bba6"; + sha256 = "15v5ps2i2y2hczwxs2ci4c2w4p3pn3bl7vc5wlaqnc7i14f9285c"; + }; + } + { + goPackagePath = "github.com/dancannon/gorethink"; + fetch = { + type = "git"; + url = "https://github.com/dancannon/gorethink"; + rev = "e7cac92ea2bc52638791a021f212145acfedb1fc"; + sha256 = "0f9gwsqf93qzvfpdwgam7vcfzrrkcj2s9ms4p056kcyxv9snwq3g"; + }; + } + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"; + sha256 = "15h9kl73rdbzlfmsdxp13jja5gs7sknvqkpq2qizq3qv3nr1x8dk"; + }; + } + { + goPackagePath = "github.com/docker/engine-api"; + fetch = { + type = "git"; + url = "https://github.com/docker/engine-api"; + rev = "8924d6900370b4c7e7984be5adc61f50a80d7537"; + sha256 = "1klimc3d1a2vfgl14a7js20ricpghq5jzvh8l46kf87ycjwc0q4n"; + }; + } + { + goPackagePath = "github.com/docker/go-connections"; + fetch = { + type = "git"; + url = "https://github.com/docker/go-connections"; + rev = "f549a9393d05688dff0992ef3efd8bbe6c628aeb"; + sha256 = "0k1yf4bimmwxc0qiz997nagfmddbm8nwb0c1q16387m8lgw1gbwg"; + }; + } + { + goPackagePath = "github.com/docker/go-units"; + fetch = { + type = "git"; + url = "https://github.com/docker/go-units"; + rev = "5d2041e26a699eaca682e2ea41c8f891e1060444"; + sha256 = "0hn8xdbaykp046inc4d2mwig5ir89ighma8hk18dfkm8rh1vvr8i"; + }; + } + { + goPackagePath = "github.com/eapache/go-resiliency"; + fetch = { + type = "git"; + url = "https://github.com/eapache/go-resiliency"; + rev = "b86b1ec0dd4209a588dc1285cdd471e73525c0b3"; + sha256 = "1kzv95bh3nidm2cr7iv9lk3s2qiw1i17n8gyl2x6xk6qv8b0bc21"; + }; + } + { + goPackagePath = "github.com/eapache/queue"; + fetch = { + type = "git"; + url = "https://github.com/eapache/queue"; + rev = "ded5959c0d4e360646dc9e9908cff48666781367"; + sha256 = "0inclypw0kln8hsn34c5ww34h0qa9fcqwak93lac5dp59rz5430n"; + }; + } + { + goPackagePath = "github.com/eclipse/paho.mqtt.golang"; + fetch = { + type = "git"; + url = "https://github.com/eclipse/paho.mqtt.golang"; + rev = "0f7a459f04f13a41b7ed752d47944528d4bf9a86"; + sha256 = "13l6mrx9z859r4r7kpa9rsbf4ni7dn6xgz8iyv2xnz53pqffanjh"; + }; + } + { + goPackagePath = "github.com/go-sql-driver/mysql"; + fetch = { + type = "git"; + url = "https://github.com/go-sql-driver/mysql"; + rev = "1fca743146605a172a266e1654e01e5cd5669bee"; + sha256 = "02vbq8j4r3skg3fmiv1wvjqh1542dr515w8f3d42b5lpwc1fsn38"; + }; + } + { + goPackagePath = "github.com/gobwas/glob"; + fetch = { + type = "git"; + url = "https://github.com/gobwas/glob"; + rev = "49571a1557cd20e6a2410adc6421f85b66c730b5"; + sha256 = "16j7pdxajqrl20a737p7kgsngr2f7gkkpgqxxmfkrmgckgkc8cvk"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "552c7b9542c194800fd493123b3798ef0a832032"; + sha256 = "1zaw1xxnvgsvfcrv5xkn1f7p87vyh9i6mc44csl11fgc2hvqp6xm"; + }; + } + { + goPackagePath = "github.com/golang/snappy"; + fetch = { + type = "git"; + url = "https://github.com/golang/snappy"; + rev = "d9eb7a3d35ec988b8585d4a0068e462c27d28380"; + sha256 = "0wynarlr1y8sm9y9l29pm9dgflxriiialpwn01066snzjxnpmbyn"; + }; + } + { + goPackagePath = "github.com/gonuts/go-shellquote"; + fetch = { + type = "git"; + url = "https://github.com/gonuts/go-shellquote"; + rev = "e842a11b24c6abfb3dd27af69a17f482e4b483c2"; + sha256 = "19lbz7wl241bsyzsv2ai40b2vnj8c9nl107b6jf9gid3i6h0xydg"; + }; + } + { + goPackagePath = "github.com/gorilla/context"; + fetch = { + type = "git"; + url = "https://github.com/gorilla/context"; + rev = "1ea25387ff6f684839d82767c1733ff4d4d15d0a"; + sha256 = "1nh1nzxcsgd215x4xn59wc4cbqfa8zvhvnnx5p8fkrn4bj1cgak4"; + }; + } + { + goPackagePath = "github.com/gorilla/mux"; + fetch = { + type = "git"; + url = "https://github.com/gorilla/mux"; + rev = "c9e326e2bdec29039a3761c07bece13133863e1e"; + sha256 = "1bplp6v14isjdfpf8328k8bvkn35n451axkxlm822d9h5ccg47g6"; + }; + } + { + goPackagePath = "github.com/hailocab/go-hostpool"; + fetch = { + type = "git"; + url = "https://github.com/hailocab/go-hostpool"; + rev = "e80d13ce29ede4452c43dea11e79b9bc8a15b478"; + sha256 = "05ld4wp3illkbgl043yf8jq9y1ld0zzvrcg8jdij129j50xgfxny"; + }; + } + { + goPackagePath = "github.com/hashicorp/consul"; + fetch = { + type = "git"; + url = "https://github.com/hashicorp/consul"; + rev = "5aa90455ce78d4d41578bafc86305e6e6b28d7d2"; + sha256 = "1xas814kkhwnjg5ghhlkgygcgi5p7h6dczmpbrzzh3yygbfdzxgw"; + }; + } + { + goPackagePath = "github.com/hpcloud/tail"; + fetch = { + type = "git"; + url = "https://github.com/hpcloud/tail"; + rev = "b2940955ab8b26e19d43a43c4da0475dd81bdb56"; + sha256 = "1x266pdfvcymsbdrdsns06qq5qfjb62z6h4512ylhakbm64qkn4s"; + }; + } + { + goPackagePath = "github.com/influxdata/config"; + fetch = { + type = "git"; + url = "https://github.com/influxdata/config"; + rev = "b79f6829346b8d6e78ba73544b1e1038f1f1c9da"; + sha256 = "0k4iywy83n3kq2f58a41rjinj03wp1di67aacpf04p25qmf46c4z"; + }; + } + { + goPackagePath = "github.com/influxdata/influxdb"; + fetch = { + type = "git"; + url = "https://github.com/influxdata/influxdb"; + rev = "fc57c0f7c635df3873f3d64f0ed2100ddc94d5ae"; + sha256 = "07cv1gryp4a84a2acgc8k8alr7jw4jwphf12cby8jjy1br35jrbq"; + }; + } + { + goPackagePath = "github.com/influxdata/toml"; + fetch = { + type = "git"; + url = "https://github.com/influxdata/toml"; + rev = "af4df43894b16e3fd2b788d01bd27ad0776ef2d0"; + sha256 = "1faf51s89sk1z41qfsazmddgwll7jq9xna67k3h3vry86c4vs2j4"; + }; + } + { + goPackagePath = "github.com/influxdata/wlog"; + fetch = { + type = "git"; + url = "https://github.com/influxdata/wlog"; + rev = "7c63b0a71ef8300adc255344d275e10e5c3a71ec"; + sha256 = "04kw4kivxvr3kkmghj3427b1xyhzbhnfr971qfn3lv2vvhs8kpfl"; + }; + } + { + goPackagePath = "github.com/kardianos/osext"; + fetch = { + type = "git"; + url = "https://github.com/kardianos/osext"; + rev = "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc"; + sha256 = "1mawalaz84i16njkz6f9fd5jxhcbxkbsjnav3cmqq2dncv2hyv8a"; + }; + } + { + goPackagePath = "github.com/kardianos/service"; + fetch = { + type = "git"; + url = "https://github.com/kardianos/service"; + rev = "5e335590050d6d00f3aa270217d288dda1c94d0a"; + sha256 = "1g10qisgywfqj135yyiq63pnbjgr201gz929ydlgyzqq6yk3bn3h"; + }; + } + { + goPackagePath = "github.com/klauspost/crc32"; + fetch = { + type = "git"; + url = "https://github.com/klauspost/crc32"; + rev = "19b0b332c9e4516a6370a0456e6182c3b5036720"; + sha256 = "0fcnsf1m0bzplgp28dz8skza6l7rc65s180x85rzbdl9l3zzi43r"; + }; + } + { + goPackagePath = "github.com/lib/pq"; + fetch = { + type = "git"; + url = "https://github.com/lib/pq"; + rev = "e182dc4027e2ded4b19396d638610f2653295f36"; + sha256 = "1636v3snixapjf7rbjq0xn1sbym7hwckqfla0dm5cr4a5q4fw5cj"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "d0c3fe89de86839aecf2e0579c40ba3bb336a453"; + sha256 = "0jkjgpi1s8l9bdbf14fh8050757jqy36kn1l1hxxlb2fjn1pcg0r"; + }; + } + { + goPackagePath = "github.com/miekg/dns"; + fetch = { + type = "git"; + url = "https://github.com/miekg/dns"; + rev = "cce6c130cdb92c752850880fd285bea1d64439dd"; + sha256 = "098gadhfjiijlgq497gbccvf26xrmjvln1fws56m0ljcgszq3jdx"; + }; + } + { + goPackagePath = "github.com/mreiferson/go-snappystream"; + fetch = { + type = "git"; + url = "https://github.com/mreiferson/go-snappystream"; + rev = "028eae7ab5c4c9e2d1cb4c4ca1e53259bbe7e504"; + sha256 = "0jdd5whp74nvg35d9hzydsi3shnb1vrnd7shi9qz4wxap7gcrid6"; + }; + } + { + goPackagePath = "github.com/naoina/go-stringutil"; + fetch = { + type = "git"; + url = "https://github.com/naoina/go-stringutil"; + rev = "6b638e95a32d0c1131db0e7fe83775cbea4a0d0b"; + sha256 = "00831p1wn3rimybk1z8l30787kn1akv5jax5wx743nn76qcmkmc6"; + }; + } + { + goPackagePath = "github.com/nats-io/nats"; + fetch = { + type = "git"; + url = "https://github.com/nats-io/nats"; + rev = "ea8b4fd12ebb823073c0004b9f09ac8748f4f165"; + sha256 = "0i5f6n9k0d2vzdy20sqygmss5j45y72irxsi80grjsh7qkxa6vn1"; + }; + } + { + goPackagePath = "github.com/nats-io/nuid"; + fetch = { + type = "git"; + url = "https://github.com/nats-io/nuid"; + rev = "a5152d67cf63cbfb5d992a395458722a45194715"; + sha256 = "0fphar5bz735wwa7549j31nxnm5a9dyw472gs9zafz0cv7g8np40"; + }; + } + { + goPackagePath = "github.com/nsqio/go-nsq"; + fetch = { + type = "git"; + url = "https://github.com/nsqio/go-nsq"; + rev = "0b80d6f05e15ca1930e0c5e1d540ed627e299980"; + sha256 = "1zi9jazjfzilp2g0xy30dlx9nd9g47cjqrnqxallly97mz9n01xr"; + }; + } + { + goPackagePath = "github.com/opencontainers/runc"; + fetch = { + type = "git"; + url = "https://github.com/opencontainers/runc"; + rev = "89ab7f2ccc1e45ddf6485eaa802c35dcf321dfc8"; + sha256 = "1rnaqcsww7plr430r4ksv9si4l91l25li0bwa1b03g3sn2shirk1"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "18acf9993a863f4c4b40612e19cdd243e7c86831"; + sha256 = "1gyjvwnvgyl0fs4hd2vp5hj1dsafhwb2h55w8zgzdpshvhwrpmhv"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"; + sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "e8eabff8812b05acf522b45fdcd725a785188e37"; + sha256 = "08magd2aw7dqaa8bbv85404zvy120ify61msfpy75az5rdl5anxq"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8"; + sha256 = "0yla9hz15pg63394ygs9iiwzsqyv29labl8p424hijwsc9z9nka8"; + }; + } + { + goPackagePath = "github.com/samuel/go-zookeeper"; + fetch = { + type = "git"; + url = "https://github.com/samuel/go-zookeeper"; + rev = "218e9c81c0dd8b3b18172b2bbfad92cc7d6db55f"; + sha256 = "1v0m6wn83v4pbqz6hs7z1h5hbjk7k6npkpl7icvcxdcjd7rmyjp2"; + }; + } + { + goPackagePath = "github.com/shirou/gopsutil"; + fetch = { + type = "git"; + url = "https://github.com/shirou/gopsutil"; + rev = "4d0c402af66c78735c5ccf820dc2ca7de5e4ff08"; + sha256 = "1wkp7chzpz6brq2y0k2mvsf0iaknns279wfsjn5gm6gvih49lqni"; + }; + } + { + goPackagePath = "github.com/soniah/gosnmp"; + fetch = { + type = "git"; + url = "https://github.com/soniah/gosnmp"; + rev = "3fe3beb30fa9700988893c56a63b1df8e1b68c26"; + sha256 = "0a0vlxx1plqj9fi863wd8ajbzl705wgma4qk75v949azgn1yx9ib"; + }; + } + { + goPackagePath = "github.com/streadway/amqp"; + fetch = { + type = "git"; + url = "https://github.com/streadway/amqp"; + rev = "b4f3ceab0337f013208d31348b578d83c0064744"; + sha256 = "1whcg2l6w2q7xrkk8q5y95i90ckq72bpgksii9ibrpyixbx7p5xp"; + }; + } + { + goPackagePath = "github.com/stretchr/testify"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/testify"; + rev = "1f4a1643a57e798696635ea4c126e9127adb7d3c"; + sha256 = "0nam9d68rn8ha8ldif22kkgv6k6ph3y88fp26159wdrs63ca3bzl"; + }; + } + { + goPackagePath = "github.com/vjeantet/grok"; + fetch = { + type = "git"; + url = "https://github.com/vjeantet/grok"; + rev = "83bfdfdfd1a8146795b28e547a8e3c8b28a466c2"; + sha256 = "03zdcg9gy482gbasa7sw4cpw1k1n3dr2q06q80qnkqn268p7hp80"; + }; + } + { + goPackagePath = "github.com/wvanbergen/kafka"; + fetch = { + type = "git"; + url = "https://github.com/wvanbergen/kafka"; + rev = "46f9a1cf3f670edec492029fadded9c2d9e18866"; + sha256 = "1czmbilprffdbwnrq4wcllaqknbq91l6p0ni6b55fkaggnwck694"; + }; + } + { + goPackagePath = "github.com/wvanbergen/kazoo-go"; + fetch = { + type = "git"; + url = "https://github.com/wvanbergen/kazoo-go"; + rev = "0f768712ae6f76454f987c3356177e138df258f8"; + sha256 = "1paaayg03nknbnl3kdl0ybqv4llz7iwry7f29i0bh9srb6c87x16"; + }; + } + { + goPackagePath = "github.com/yuin/gopher-lua"; + fetch = { + type = "git"; + url = "https://github.com/yuin/gopher-lua"; + rev = "bf3808abd44b1e55143a2d7f08571aaa80db1808"; + sha256 = "02m7ly5yzc3snvxlfl9j4ggwd7v0kpvy3pqgqbfr7scdjxdap4nm"; + }; + } + { + goPackagePath = "github.com/zensqlmonitor/go-mssqldb"; + fetch = { + type = "git"; + url = "https://github.com/zensqlmonitor/go-mssqldb"; + rev = "ffe5510c6fa5e15e6d983210ab501c815b56b363"; + sha256 = "079x8ms8lv5p6253ppaxva37k6w04xnd38y8763rr2giswxqzlkl"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"; + sha256 = "1y2bbghi594m8p4pcm9pwrzql06179xj6zvhaghwcc6y0l48rbgp"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "6acef71eb69611914f7a30939ea9f6e194c78172"; + sha256 = "1fcsv50sbq0lpzrhx3m9jw51wa255fsbqjwsx9iszq4d0gysnnvc"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "a71fd10341b064c10f4a81ceac72bcf70f26ea34"; + sha256 = "1igxqrgnnb6983fl0yck0xal2hwnkcgbslr7cxyrg7a65vawd0q1"; + }; + } + { + goPackagePath = "gopkg.in/dancannon/gorethink.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/dancannon/gorethink.v1"; + rev = "7d1af5be49cb5ecc7b177bf387d232050299d6ef"; + sha256 = "0036hcadshka19bcqmq4mm9ssl9qhsx1n96lj1y24mh9g1api8fi"; + }; + } + { + goPackagePath = "gopkg.in/fatih/pool.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/fatih/pool.v2"; + rev = "cba550ebf9bce999a02e963296d4bc7a486cb715"; + sha256 = "1jlrakgnpvhi2ny87yrsj1gyrcncfzdhypa9i2mlvvzqlj4r0dn0"; + }; + } + { + goPackagePath = "gopkg.in/mgo.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/mgo.v2"; + rev = "d90005c5262a3463800497ea5a89aed5fe22c886"; + sha256 = "1z81k6mnfk07hkrkw31l16qycyiwa6wzyhysmywgkh58sm5dc9m7"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "a83829b6f1293c91addabc89d0571c246397bbf4"; + sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"; + }; + } +] -- cgit v1.2.3 From 91c4f86b31941843ab4a9788dc76ebf18adc871f Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:03:59 +0100 Subject: k 5: add kapacitor we add this here until 17.03 is released --- krebs/5pkgs/kapacitor/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 krebs/5pkgs/kapacitor/default.nix diff --git a/krebs/5pkgs/kapacitor/default.nix b/krebs/5pkgs/kapacitor/default.nix new file mode 100644 index 000000000..804826941 --- /dev/null +++ b/krebs/5pkgs/kapacitor/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, fetchFromGitHub, buildGoPackage }: + +buildGoPackage rec { + name = "kapacitor-${version}"; + version = "1.0.0"; + + goPackagePath = "github.com/influxdata/kapacitor"; + + src = fetchFromGitHub { + owner = "influxdata"; + repo = "kapacitor"; + rev = "v${version}"; + sha256 = "14l9bhj6qdif79s4dyqqbnjgj3m4iarvw0ckld1wdhpdgvl8w9qh"; + }; + + meta = with lib; { + description = "Open source framework for processing, monitoring, and alerting on time series data"; + license = licenses.mit; + homepage = https://influxdata.com/time-series-platform/kapacitor/; + maintainers = with maintainers; [offline]; + platforms = with platforms; linux; + }; +} -- cgit v1.2.3 From 43eaeee506939af8dc1d169754c5279b2372a134 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:07:59 +0100 Subject: l 3: add telegraf service --- lass/3modules/default.nix | 1 + lass/3modules/telegraf.nix | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 lass/3modules/telegraf.nix diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix index b169fea40..1046fb7cd 100644 --- a/lass/3modules/default.nix +++ b/lass/3modules/default.nix @@ -9,5 +9,6 @@ _: ./urxvtd.nix ./usershadow.nix ./xresources.nix + ./telegraf.nix ]; } diff --git a/lass/3modules/telegraf.nix b/lass/3modules/telegraf.nix new file mode 100644 index 000000000..64b323460 --- /dev/null +++ b/lass/3modules/telegraf.nix @@ -0,0 +1,67 @@ +{ 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"; + }; + config = mkOption { + type = types.str; + #TODO: find a good default + default = '' + [agent] + interval = "1s" + + [outputs] + + # Configuration to send data to InfluxDB. + [outputs.influxdb] + urls = ["http://localhost:8086"] + database = "kapacitor_example" + user_agent = "telegraf" + + # Collect metrics about cpu usage + [cpu] + percpu = false + totalcpu = true + drop = ["cpu_time"] + ''; + 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 -- cgit v1.2.3 From d8a52b784450909780f771d6550444ed66d6b667 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:09:52 +0100 Subject: l 3: add kapacitor service --- lass/3modules/default.nix | 1 + lass/3modules/kapacitor.nix | 101 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 lass/3modules/kapacitor.nix diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix index 1046fb7cd..2bf2df8b3 100644 --- a/lass/3modules/default.nix +++ b/lass/3modules/default.nix @@ -9,6 +9,7 @@ _: ./urxvtd.nix ./usershadow.nix ./xresources.nix + ./kapacitor.nix ./telegraf.nix ]; } diff --git a/lass/3modules/kapacitor.nix b/lass/3modules/kapacitor.nix new file mode 100644 index 000000000..023801987 --- /dev/null +++ b/lass/3modules/kapacitor.nix @@ -0,0 +1,101 @@ +{ 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"; + }; + config = mkOption { + type = types.str; + #TODO: find a good default + default = '' + hostname = "localhost" + data_dir = "/home/lass/.kapacitor" + + [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 = "INFO" + ''; + 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}"; + }; + }; + }; + +in out -- cgit v1.2.3 From 4097f5167196dadfa53865769c242126746285d3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:12:50 +0100 Subject: l 1 shodan: reinstall with btrfs --- lass/1systems/shodan.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lass/1systems/shodan.nix b/lass/1systems/shodan.nix index 095898380..232e91d90 100644 --- a/lass/1systems/shodan.nix +++ b/lass/1systems/shodan.nix @@ -59,17 +59,13 @@ with import ; fileSystems = { "/" = { device = "/dev/pool/nix"; - fsType = "ext4"; + fsType = "btrfs"; }; "/boot" = { device = "/dev/sda1"; }; - "/home/lass" = { - device = "/dev/pool/home-lass"; - fsType = "ext4"; - }; "/tmp" = { device = "tmpfs"; fsType = "tmpfs"; @@ -77,7 +73,7 @@ with import ; }; "/bku" = { device = "/dev/pool/bku"; - fsType = "ext4"; + fsType = "btrfs"; }; }; -- cgit v1.2.3 From f239cecef9497e41054ecfedde284ecbc9e8364f Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:13:24 +0100 Subject: l 2 hfos: forward smtp --- lass/2configs/hfos.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lass/2configs/hfos.nix b/lass/2configs/hfos.nix index f6f09e226..fc211dc92 100644 --- a/lass/2configs/hfos.nix +++ b/lass/2configs/hfos.nix @@ -21,12 +21,14 @@ with import ; krebs.iptables.tables.nat.PREROUTING.rules = [ { v6 = false; precedence = 1000; predicate = "-d 213.239.205.246 -p tcp --dport 22"; target = "DNAT --to-destination 192.168.122.208:22"; } + { v6 = false; precedence = 1000; predicate = "-d 213.239.205.246 -p tcp --dport 25"; target = "DNAT --to-destination 192.168.122.208:25"; } { v6 = false; precedence = 1000; predicate = "-d 213.239.205.246 -p tcp --dport 80"; target = "DNAT --to-destination 192.168.122.208:1080"; } { v6 = false; precedence = 1000; predicate = "-d 213.239.205.246 -p tcp --dport 443"; target = "DNAT --to-destination 192.168.122.208:1443"; } ]; krebs.iptables.tables.filter.FORWARD.rules = [ { v6 = false; precedence = 1000; predicate = "-d 192.168.122.208 -p tcp --dport 22 -m state --state NEW,ESTABLISHED,RELATED"; target = "ACCEPT"; } + { v6 = false; precedence = 1000; predicate = "-d 192.168.122.208 -p tcp --dport 25 -m state --state NEW,ESTABLISHED,RELATED"; target = "ACCEPT"; } { v6 = false; precedence = 1000; predicate = "-d 192.168.122.208 -p tcp --dport 1080 -m state --state NEW,ESTABLISHED,RELATED"; target = "ACCEPT"; } { v6 = false; precedence = 1000; predicate = "-d 192.168.122.208 -p tcp --dport 1443 -m state --state NEW,ESTABLISHED,RELATED"; target = "ACCEPT"; } ]; -- cgit v1.2.3 From 154e0cf5cd33ff4a3a5657ed7b01674ba1e6a5e2 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:14:09 +0100 Subject: l 2 websites domsen: remove obsolete ssl function --- lass/2configs/websites/domsen.nix | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 2bbfe7333..9361e3978 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -7,7 +7,6 @@ let genid_signed ; inherit (import {inherit lib pkgs;}) - ssl servePage serveOwncloud serveWordpress; @@ -25,47 +24,16 @@ let in { imports = [ ./sqlBackup.nix - (ssl [ "reich-gebaeudereinigung.de" "www.reich-gebaeudereinigung.de" ]) (servePage [ "reich-gebaeudereinigung.de" "www.reich-gebaeudereinigung.de" ]) - (ssl [ "karlaskop.de" "www.karlaskop.de" ]) (servePage [ "karlaskop.de" "www.karlaskop.de" ]) - (ssl [ "makeup.apanowicz.de" "www.makeup.apanowicz.de" ]) (servePage [ "makeup.apanowicz.de" "www.makeup.apanowicz.de" ]) - (ssl [ "pixelpocket.de" ]) (servePage [ "pixelpocket.de" ]) - (ssl [ "o.ubikmedia.de" ]) (serveOwncloud [ "o.ubikmedia.de" ]) - (ssl [ - "ubikmedia.de" - "aldona.ubikmedia.de" - "apanowicz.de" - "nirwanabluete.de" - "aldonasiech.com" - "360gradvideo.tv" - "ubikmedia.eu" - "facts.cloud" - "youthtube.xyz" - "illucloud.eu" - "illucloud.de" - "illucloud.com" - "www.ubikmedia.de" - "www.aldona.ubikmedia.de" - "www.apanowicz.de" - "www.nirwanabluete.de" - "www.aldonasiech.com" - "www.360gradvideo.tv" - "www.ubikmedia.eu" - "www.facts.cloud" - "www.youthtube.xyz" - "www.illucloud.eu" - "www.illucloud.de" - "www.illucloud.com" - ]) (serveWordpress [ "ubikmedia.de" "apanowicz.de" -- cgit v1.2.3 From 44800f5ca9b79d64836cb1bb4c318b64182ad6aa Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 17:14:25 +0100 Subject: l 2 websites domsen: add ubikmedia subdomains --- lass/2configs/websites/domsen.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 9361e3978..01699001e 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -56,6 +56,14 @@ in { "www.illucloud.eu" "www.illucloud.de" "www.illucloud.com" + "apanowicz.ubikmedia.de" + "karlaskop.ubikmedia.de" + "nb.ubikmedia.de" + "cinevita.ubikmedia.de" + "factscloud.ubikmedia.de" + "youthtube.ubikmedia.de" + "aldona2.ubikmedia.de" + "illucloud.ubikmedia.de" ]) ]; -- cgit v1.2.3 From ab07f1082e060f2fd98f1bd4b4f2c7a05a5c1972 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 9 Jan 2017 19:38:07 +0100 Subject: l 2 nixpkgs: 819c1ab -> d98b556 --- lass/2configs/nixpkgs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/2configs/nixpkgs.nix b/lass/2configs/nixpkgs.nix index 6885ef59d..a33e69bf8 100644 --- a/lass/2configs/nixpkgs.nix +++ b/lass/2configs/nixpkgs.nix @@ -3,6 +3,6 @@ { krebs.build.source.nixpkgs.git = { url = https://github.com/lassulus/nixpkgs; - ref = "819c1ab486a9c81d6a6b76c759aedece2df39037"; + ref = "d98b556864f2b3a634e39ed1ae29f47c0e3fae35"; }; } -- cgit v1.2.3 From 79cfd8b26f560e0d792a392efdcc7d7a9e1daf1e Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 14:53:48 +0100 Subject: l 2 vim: add flake8 for python style checking --- lass/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix index bfaae24c8..f79e6b807 100644 --- a/lass/2configs/vim.nix +++ b/lass/2configs/vim.nix @@ -5,6 +5,7 @@ let out = { environment.systemPackages = [ vim + pkgs.pythonPackages.flake8 ]; environment.etc.vimrc.source = vimrc; -- cgit v1.2.3 From 52044fb27391acf4645ce09fcfd2fe85ffc47a94 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 16:17:44 +0100 Subject: l 2 xserver: add copyq to startup --- lass/2configs/xserver/default.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lass/2configs/xserver/default.nix b/lass/2configs/xserver/default.nix index 53c8f9444..cba4db766 100644 --- a/lass/2configs/xserver/default.nix +++ b/lass/2configs/xserver/default.nix @@ -2,6 +2,24 @@ with import ; let user = config.krebs.build.user; + + copyqConfig = pkgs.writeDash "copyq-config" '' + ${pkgs.copyq}/bin/copyq config check_clipboard true + ${pkgs.copyq}/bin/copyq config check_selection true + ${pkgs.copyq}/bin/copyq config copy_clipboard true + ${pkgs.copyq}/bin/copyq config copy_selection true + + ${pkgs.copyq}/bin/copyq config activate_closes true + ${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0 + ${pkgs.copyq}/bin/copyq config clipboard_tab &clipboard + ${pkgs.copyq}/bin/copyq config disable_tray true + ${pkgs.copyq}/bin/copyq config hide_tabs true + ${pkgs.copyq}/bin/copyq config hide_toolbar true + ${pkgs.copyq}/bin/copyq config item_popup_interval true + ${pkgs.copyq}/bin/copyq config maxitems 1000 + ${pkgs.copyq}/bin/copyq config move true + ${pkgs.copyq}/bin/copyq config text_wrap true + ''; in { environment.systemPackages = [ @@ -109,4 +127,21 @@ in { User = user.name; }; }; + + systemd.services.copyq = { + wantedBy = [ "multi-user.target" ]; + requires = [ "xserver.service" ]; + environment = { + DISPLAY = ":${toString config.services.xserver.display}"; + }; + serviceConfig = { + SyslogIdentifier = "copyq"; + ExecStart = "${pkgs.copyq}/bin/copyq"; + ExecStartPost = copyqConfig; + Restart = "always"; + RestartSec = "2s"; + StartLimitBurst = 0; + User = user.name; + }; + }; } -- cgit v1.2.3 From 5631dc07e776c7fb9efe822e70aafe1aab716a59 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 16:18:00 +0100 Subject: l 5 xmonad: add copyq keybinding --- lass/5pkgs/xmonad-lass.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix index ec3ad82af..2f2be6762 100644 --- a/lass/5pkgs/xmonad-lass.nix +++ b/lass/5pkgs/xmonad-lass.nix @@ -144,6 +144,8 @@ myKeyMap = , ("M4-C-q", windowPromptBringCopy infixAutoXPConfig) , ("M4-S-q", return ()) + + , ("M4-w", floatNext True >> spawn "${pkgs.copyq}/bin/copyq show") ] forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X () -- cgit v1.2.3 From 92e989f69ba14400dc059edd5819a751b19e99da Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 17:27:07 +0100 Subject: l 2: add sshuttle config --- lass/2configs/baseX.nix | 8 ++++++++ lass/2configs/default.nix | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 1e796015a..a67c25145 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -13,6 +13,14 @@ in { systemWide = true; }; } + { + krebs.per-user.lass.packages = [ + pkgs.sshuttle + ]; + security.sudo.extraConfig = '' + lass ALL= (root) NOPASSWD:SETENV: ${pkgs.sshuttle}/bin/.sshuttle-wrapped + ''; + } ]; users.extraUsers.mainUser.extraGroups = [ "audio" "video" ]; diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index 6fea97728..1cb68a985 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -56,6 +56,12 @@ with import ; SSL_CERT_FILE = ca-bundle; }; }) + { + #for sshuttle + environment.systemPackages = [ + pkgs.pythonPackages.python + ]; + } ]; networking.hostName = config.krebs.build.host.name; -- cgit v1.2.3 From 899bbbd8207679a5384f5d4d191b4072738366b7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 17:28:04 +0100 Subject: l 2 websites domsen: add www.ubikmedia.de --- lass/2configs/websites/domsen.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 01699001e..71eae5b71 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -56,6 +56,7 @@ in { "www.illucloud.eu" "www.illucloud.de" "www.illucloud.com" + "www.ubikmedia.de" "apanowicz.ubikmedia.de" "karlaskop.ubikmedia.de" "nb.ubikmedia.de" -- cgit v1.2.3 From 0e6548c6f6278f2cacdcb9b098a6a92332ecf23e Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 19:18:11 +0100 Subject: l 2 hfos: update riot pubkey --- lass/2configs/hfos.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/2configs/hfos.nix b/lass/2configs/hfos.nix index fc211dc92..7d4d544aa 100644 --- a/lass/2configs/hfos.nix +++ b/lass/2configs/hfos.nix @@ -7,7 +7,7 @@ with import ; isNormalUser = true; extraGroups = [ "libvirtd" ]; openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5NnADMRySix1kcxQwseHfem/SCDmkbvwc+ZZu7HFz4zss1k4Fh1knsukMY83zlno8p/8bBPWyixLTxuZHNy26af8GP95bvV3brnpRmrijkE4dOlpd+wvPcIyTKNunJvMzNDP/ry9g2GczEZKGWvQZudq/nI54HaCaRWM2kzEMEg8Rr9SGlZEKo8B+8HGVsz1a8USOnm8dqYP9dmfLdpy/s+7yWJSPh8wokvWeOOrahirOhO99ZfXm2gcdHqSKvbD2+4EYEm5w8iFrbYBT2wZ3u9ZOiooL/JuEBBdnDrcqZqeaTw0vOdKPvkUP8/rzRjvIwSkynMSD8fixpdGRNeIB riot@lagrange" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMkyCwdwBrsbs3qrNQcy/SqQpex4aaQoAMuT+NDefFc8KVHOMfmkDccEyAggDTgQhUrEVIvo/fFUmGBd9sm1vN1IthO2Qh5nX+qiK/A2R7sxci0Ry6piU03R27JfpZqi6g8TSPNi1C9rC8eBqOfO3OB8oQOkFmM48Q9cmS8AV3ERLR0LaHoEqUbs86JELbtHrMdKk4Hzo8zTM/isP3GO8iDHRt4dBS/03Ve7+WVxgNwWU2HW3a3jJd3tWHrqGmS/ZfCEC/47eIj4WSW+JiH9Q0BarNEbkkMV1Mvm32MX52stGPd5FaIIUtFqD4745iVSiw8esUGFUxJ1RjWgUHr99h riot@vortex" config.krebs.users.lass.pubkey ]; }; -- cgit v1.2.3 From fca1c21a1adf837f5312b97e98126fef023eee60 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 19:18:33 +0100 Subject: l 2 websites fritz: remove obsolete ssl function --- lass/2configs/websites/fritz.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lass/2configs/websites/fritz.nix b/lass/2configs/websites/fritz.nix index 00e987116..9bf7e4a9c 100644 --- a/lass/2configs/websites/fritz.nix +++ b/lass/2configs/websites/fritz.nix @@ -7,7 +7,6 @@ let head ; inherit (import {inherit lib pkgs;}) - ssl servePage serveWordpress ; @@ -29,28 +28,20 @@ in { imports = [ ./sqlBackup.nix - (ssl [ "radical-dreamers.de" "www.radical-dreamers.de" ]) (serveWordpress [ "radical-dreamers.de" "www.radical-dreamers.de" ]) - (ssl [ "gs-maubach.de" "www.gs-maubach.de" ]) (serveWordpress [ "gs-maubach.de" "www.gs-maubach.de" ]) - (ssl [ "spielwaren-kern.de" "www.spielwaren-kern.de" ]) (serveWordpress [ "spielwaren-kern.de" "www.spielwaren-kern.de" ]) - (ssl [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ]) (servePage [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ]) - (ssl [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ]) (serveWordpress [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ]) - (ssl [ "eastuttgart.de" "www.eastuttgart.de" ]) (serveWordpress [ "eastuttgart.de" "www.eastuttgart.de" ]) - (ssl [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ]) (servePage [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ]) - (ssl [ "goldbarrendiebstahl.radical-dreamers.de" ]) (serveWordpress [ "goldbarrendiebstahl.radical-dreamers.de" ]) ]; -- cgit v1.2.3 From 8616bb393f7c994c78af50f10058434610157e57 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 10 Jan 2017 19:40:32 +0100 Subject: l 1 prism: change sequence of ip addresses --- lass/1systems/prism.nix | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lass/1systems/prism.nix b/lass/1systems/prism.nix index 854c98f46..d07acebee 100644 --- a/lass/1systems/prism.nix +++ b/lass/1systems/prism.nix @@ -12,6 +12,22 @@ let in { imports = [ ../. + { + networking.interfaces.et0.ip4 = [ + { + address = ip; + prefixLength = 24; + } + ]; + networking.defaultGateway = "213.239.205.225"; + networking.nameservers = [ + "8.8.8.8" + ]; + services.udev.extraRules = '' + SUBSYSTEM=="net", ATTR{address}=="54:04:a6:7e:f4:06", NAME="et0" + ''; + + } ../2configs/retiolum.nix ../2configs/exim-smarthost.nix ../2configs/downloading.nix @@ -48,22 +64,6 @@ in { lock.gid = 10001; }; } - { - networking.interfaces.et0.ip4 = [ - { - address = ip; - prefixLength = 24; - } - ]; - networking.defaultGateway = "213.239.205.225"; - networking.nameservers = [ - "8.8.8.8" - ]; - services.udev.extraRules = '' - SUBSYSTEM=="net", ATTR{address}=="54:04:a6:7e:f4:06", NAME="et0" - ''; - - } { boot.loader.grub = { devices = [ -- cgit v1.2.3 From 8884c4274ddd54364e7215f2ce051a53ac542b99 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 11 Jan 2017 23:07:15 +0100 Subject: k 5 bepasty-client-cli: use recent git master --- krebs/5pkgs/bepasty-client-cli/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/krebs/5pkgs/bepasty-client-cli/default.nix b/krebs/5pkgs/bepasty-client-cli/default.nix index 990f99af6..c58e637b3 100644 --- a/krebs/5pkgs/bepasty-client-cli/default.nix +++ b/krebs/5pkgs/bepasty-client-cli/default.nix @@ -1,17 +1,18 @@ -{ lib, pkgs, pythonPackages, fetchurl, ... }: +{ lib, pkgs, pythonPackages, fetchFromGitHub, ... }: with pythonPackages; buildPythonPackage rec { - name = "bepasty-client-cli-${version}"; - version = "0.3.0"; + name = "bepasty-client-cli"; propagatedBuildInputs = [ python_magic click requests2 ]; - src = fetchurl { - url = "https://pypi.python.org/packages/source/b/bepasty-client-cli/bepasty-client-cli-${version}.tar.gz"; - sha256 = "002kcplyfnmr5pn2ywdfilss0rmbm8wcdzz8hzp03ksy2zr4sdbw"; + src = fetchFromGitHub { + owner = "bepasty"; + repo = "bepasty-client-cli"; + rev = "4b7135ba8ba1e17501de08ad7b6aca73c0d949d2"; + sha256 = "1svchyk9zai1vip9ppm12jm7wfjbdr9ijhgcd2n10xh73jrn9cnc"; }; meta = { -- cgit v1.2.3 From 63d3dd2c8cefdac0aaa0336824b08c46b72c1505 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 12 Jan 2017 00:18:43 +0100 Subject: l 2 retiolum: connect to existing hosts --- lass/2configs/retiolum.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lass/2configs/retiolum.nix b/lass/2configs/retiolum.nix index eba40532d..7a7bf95be 100644 --- a/lass/2configs/retiolum.nix +++ b/lass/2configs/retiolum.nix @@ -16,9 +16,9 @@ enable = true; connectTo = [ "prism" - "pigstarter" "gum" - "flap" + "ni" + "dishfire" ]; }; -- cgit v1.2.3 From 270f385c72beea35d797d807c28a08811ebb614b Mon Sep 17 00:00:00 2001 From: nin Date: Thu, 12 Jan 2017 22:21:21 +0100 Subject: nin: init --- krebs/3modules/default.nix | 1 + krebs/3modules/nin/default.nix | 40 ++++++++++ nin/1systems/hiawatha.nix | 125 +++++++++++++++++++++++++++++++ nin/2configs/default.nix | 165 +++++++++++++++++++++++++++++++++++++++++ nin/2configs/nixpkgs.nix | 8 ++ nin/2configs/retiolum.nix | 28 +++++++ nin/default.nix | 7 ++ 7 files changed, 374 insertions(+) create mode 100644 krebs/3modules/nin/default.nix create mode 100644 nin/1systems/hiawatha.nix create mode 100644 nin/2configs/default.nix create mode 100644 nin/2configs/nixpkgs.nix create mode 100644 nin/2configs/retiolum.nix create mode 100644 nin/default.nix diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index bf09b7424..05982bd54 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -93,6 +93,7 @@ let { krebs = import ./lass { inherit config; }; } { krebs = import ./makefu { inherit config; }; } { krebs = import ./mv { inherit config; }; } + { krebs = import ./nin { inherit config; }; } { krebs = import ./shared { inherit config; }; } { krebs = import ./tv { inherit config; }; } { diff --git a/krebs/3modules/nin/default.nix b/krebs/3modules/nin/default.nix new file mode 100644 index 000000000..6f488fd25 --- /dev/null +++ b/krebs/3modules/nin/default.nix @@ -0,0 +1,40 @@ +{ config, ... }: + +with import ; + +{ + hosts = mapAttrs (_: setAttr "owner" config.krebs.users.lass) { + hiawatha = { + cores = 2; + nets = { + retiolum = { + ip4.addr = "10.243.132.96"; + ip6.addr = "42:0000:0000:0000:0000:0000:0000:2342"; + aliases = [ + "hiawatha.retiolum" + "hiawatha.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAucIe5yLzKJ8F982XRpZT6CvyXuPrtnNTmw/E/T6Oyq88m/OVHh6o + Viho1XAlJZZwqNniItD0AQB98uFB3+3yA7FepnwwC+PEceIfBG4bTDNyYD3ZCsAB + iWpmRar9SQ7LFnoZ6X2lYaJkUD9afmvXqJJLR5MClnRQo5OSqXaFdp7ryWinHP7E + UkPSNByu4LbQ9CnBEW8mmCVZSBLb8ezxg3HpJSigmUcJgiDBJ6aj22BsZ5L+j1Sr + lvUuaCr8WOS41AYsD5dbTYk7EG42tU5utrOS6z5yHmhbA5r8Ro2OFi/R3Td68BIJ + yw/m8sfItBCvjJSMEpKHEDfGMBCfQKltCwIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + ssh.privkey.path = ; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFizK5kauDlnjm/IzyzLi+W4hLKqjSWMkfuxzLwg6egx"; + }; + + }; + users = { + nin = { + mail = "nin@hiawatha.retiolum"; + pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDicZLUPEVNX7SgqYWcjPo0UESRizEfIvVVbiwa1aApA8x25u/5R3sevcgbIpLHYKDMl5tebny9inr6G2zqB6oq/pocQjHxrPnuLzqjvqeSpbjQjlNWJ9GaHT5koTXZHdkEXGL0vfv1SRDNWUiK0rNymr3GXab4DyrnRnuNl/G1UtLf4Zka94YUD0SSPdS9y6knnRrUWKjGMFBZEbNSgHqMGATPQP9VDwKHIO2OWGfiBAJ4nj/MWj+BxHDleCMY9zbym8yY7p/0PLaUe9eIyLC8MftJ5suuMmASlj+UGWgnqUxWxsMHax9y7CTAc23r1NNCXN5LC6/facGt0rEQrdrTizBgOA1FSHAPCl5f0DBEgWBrRuygEcAueuGWvI8/uvtvQQZLhosDbXEfs/3vm2xoYBe7wH4NZHm+d2LqgIcPXehH9hVQsl6pczngTCJt0Q/6tIMffjhDHeYf6xbe/n3AqFT0PylUSvOw/H5iHws3R6rxtgnOio7yTJ4sq0NMzXCtBY6LYPGnkwf0oKsgB8KavZVnxzF8B1TD4nNi0a7ma7bd1LMzI/oGE6i8kDMROgisIECOcoe8YYJZXIne/wimhhRKZAsd+VrKUo4SzNIavCruCodGAVh2vfrqRJD+HD/aWH7Vr1fCEexquaxeKpRtKGIPW9LRCcEsTilqpZdAiw== nin@hiawatha"; + }; + }; +} diff --git a/nin/1systems/hiawatha.nix b/nin/1systems/hiawatha.nix new file mode 100644 index 000000000..26de00d18 --- /dev/null +++ b/nin/1systems/hiawatha.nix @@ -0,0 +1,125 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = [ + ../. + + ../2configs/retiolum.nix + ]; + + krebs.build.host = config.krebs.hosts.hiawatha; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b83f8830-84f3-4282-b10e-015c4b76bd9e"; + fsType = "ext4"; + }; + + fileSystems."/tmp" = + { device = "tmpfs"; + fsType = "tmpfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2f319b08-2560-401d-b53c-2abd28f1a010"; + fsType = "ext2"; + }; + + boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; } ]; + boot.initrd.luks.cryptoModules = [ "aes" "sha512" "sha1" "xts" ]; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 4; + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sda"; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + fileSystems."/home/nin/.local/share/Steam" = { + device = "/dev/fam/steam"; + }; + + # nin config + time.timeZone = "Europe/Berlin"; + services.xserver.enable = true; + + networking.networkmanager.enable = true; + #networking.wireless.enable = true; + + hardware.pulseaudio = { + enable = true; + systemWide = true; + }; + + hardware.bluetooth.enable = true; + + hardware.opengl.driSupport32Bit = true; + + #nixpkgs.config.steam.java = true; + + environment.variables.EDITOR = mkForce "vim"; + environment.variables.VIMINIT = ":so /etc/vimrc"; + environment.etc.vimrc.source = pkgs.writeText "vimrc" '' + set nocp + ''; + + environment.systemPackages = with pkgs; [ + firefox + steam + thunderbird + vim + git + hexchat + networkmanagerapplet + ]; + + nixpkgs.config = { + + allowUnfree = true; + + firefox = { + enableGoogleTalkPlugin = true; + enableAdobeFlash = true; + }; + }; + + #services.logind.extraConfig = "HandleLidSwitch=ignore"; + + services.xserver.synaptics = { + enable = true; + }; + + + services.xserver.desktopManager.xfce = let + xbindConfig = pkgs.writeText "xbindkeysrc" '' + "${pkgs.pass}/bin/passmenu --type" + Control + p + ''; + in { + enable = true; + extraSessionCommands = '' + ${pkgs.xbindkeys}/bin/xbindkeys -f ${xbindConfig} + ''; + }; + + # The NixOS release to be compatible with for stateful data such as databases. + system.stateVersion = "17.03"; + +} diff --git a/nin/2configs/default.nix b/nin/2configs/default.nix new file mode 100644 index 000000000..9b33e9c4a --- /dev/null +++ b/nin/2configs/default.nix @@ -0,0 +1,165 @@ +{ config, lib, pkgs, ... }: + +with import ; +{ + imports = [ + ../2configs/nixpkgs.nix + { + users.extraUsers = + mapAttrs (_: h: { hashedPassword = h; }) + (import ); + } + { + users.extraUsers = { + root = { + openssh.authorizedKeys.keys = [ + config.krebs.users.nin.pubkey + ]; + }; + mainUser = { + name = "nin"; + uid = 1337; + home = "/home/nin"; + group = "users"; + createHome = true; + useDefaultShell = true; + extraGroups = [ + "audio" + "fuse" + ]; + openssh.authorizedKeys.keys = [ + config.krebs.users.nin.pubkey + ]; + }; + }; + } + { + environment.variables = { + NIX_PATH = mkForce "secrets=/var/src/stockholm/null:/var/src"; + }; + } + (let ca-bundle = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; in { + environment.variables = { + CURL_CA_BUNDLE = ca-bundle; + GIT_SSL_CAINFO = ca-bundle; + SSL_CERT_FILE = ca-bundle; + }; + }) + ]; + + networking.hostName = config.krebs.build.host.name; + nix.maxJobs = config.krebs.build.host.cores; + + krebs = { + enable = true; + search-domain = "retiolum"; + build = { + user = config