From 8f0f19c5539fde7c93761bb4939ab0a5349e8d2e Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 Aug 2016 22:05:02 +0200 Subject: k 5 pwqgen: allow user-provided wordset --- makefu/5pkgs/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'makefu') diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 51987c35b..99f401ff5 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -18,6 +18,12 @@ in mycube-flask = callPackage ./mycube-flask {}; nodemcu-uploader = callPackage ./nodemcu-uploader {}; ps3netsrv = callPackage ./ps3netsrv {}; + pwqgen-ger = callPackage ../../krebs/5pkgs/passwdqc-utils { + wordset-file = pkgs.fetchurl { + url = https://gist.githubusercontent.com/makefu/b56f5554c9ef03fe6e09878962e6fd8d/raw/1f147efec51325bc9f80c823bad8381d5b7252f6/wordset_4k.c ; + sha256 = "18ddzyh11bywrhzdkzvrl7nvgp5gdb4k1s0zxbz2bkhd14vi72bb"; + }; + }; tw-upload-plugin = callPackage ./tw-upload-plugin {}; skytraq-logger = callPackage ./skytraq-logger {}; taskserver = callPackage ./taskserver {}; -- cgit v1.2.3 From 50863545322191f91b089d6bf4d932235a2991a0 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:41:26 +0200 Subject: m 2 urlwatch: remove override --- makefu/2configs/urlwatch.nix | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/urlwatch.nix b/makefu/2configs/urlwatch.nix index f869f5a78..e0fbefa36 100644 --- a/makefu/2configs/urlwatch.nix +++ b/makefu/2configs/urlwatch.nix @@ -1,22 +1,6 @@ { config, lib, ... }: { - nixpkgs.config.packageOverrides = pkgs: { - urlwatch = with pkgs.pythonPackages; buildPythonPackage rec { - name = "urlwatch-1.18"; - - propagatedBuildInputs = [ futures ]; - - src = pkgs.fetchurl { - url = "http://thp.io/2008/urlwatch/${name}.tar.gz"; - sha256 = "090qfgx249ks7103sap6w47f8302ix2k46wxhfssxwsqcqdl25vb"; - }; - - postFixup = '' - wrapProgram "$out/bin/urlwatch" --prefix "PYTHONPATH" : "$PYTHONPATH" - ''; - }; - }; krebs.urlwatch = { enable = true; mailto = config.krebs.users.makefu.mail; -- cgit v1.2.3 From 442582f18169e4bef5c35ac817f1701c562782fb Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:41:56 +0200 Subject: m 2 iodined: update to new revision --- makefu/2configs/iodined.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/iodined.nix b/makefu/2configs/iodined.nix index d57c91ce8..ca489d073 100644 --- a/makefu/2configs/iodined.nix +++ b/makefu/2configs/iodined.nix @@ -7,10 +7,12 @@ let in { services.iodined = { - enable = true; - domain = domain; - ip = "172.16.10.1/24"; - extraConfig = "-P ${pw} -l ${config.krebs.build.host.nets.internet.ip4.addr}"; + server = { + enable = true; + domain = domain; + ip = "172.16.10.1/24"; + extraConfig = "-P ${pw} -l ${config.krebs.build.host.nets.internet.ip4.addr}"; + }; }; } -- cgit v1.2.3 From d445954a117638b73ba8fdf43d1b2eed99b5bb8a Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:42:28 +0200 Subject: m 2 omo-share: remove aio threads --- makefu/2configs/omo-share.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/omo-share.nix b/makefu/2configs/omo-share.nix index 7e9842e14..86f768662 100644 --- a/makefu/2configs/omo-share.nix +++ b/makefu/2configs/omo-share.nix @@ -21,7 +21,6 @@ in { sendfile on; sendfile_max_chunk 512k; directio 512; - aio threads; mp4; autoindex on; root /media; -- cgit v1.2.3 From aed8ec549f754d7008b02712e99a9e1133e21932 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:47:34 +0200 Subject: m 1 omo: replace torrent --- makefu/1systems/omo.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo.nix index 96f7be9fc..71fb85ff6 100644 --- a/makefu/1systems/omo.nix +++ b/makefu/1systems/omo.nix @@ -43,9 +43,11 @@ in { # TODO: unlock home partition via ssh ../2configs/fs/sda-crypto-root.nix ../2configs/zsh-user.nix + ../2configs/urlwatch.nix ../2configs/exim-retiolum.nix ../2configs/smart-monitor.nix ../2configs/mail-client.nix + ../2configs/disable_v6.nix #../2configs/graphite-standalone.nix #../2configs/share-user-sftp.nix ../2configs/omo-share.nix @@ -56,13 +58,11 @@ in { # docker run -d -v /var/lib/pyload:/opt/pyload/pyload-config -v /media/crypt0/pyload:/opt/pyload/Downloads --name pyload --restart=always -p 8112:8000 -P writl/pyload ]; makefu.full-populate = true; - makefu.deluge.cfg = { - max_active_seeding = 1; - stop_seed_ratio = 1; - natpmp = true; - upnp = true; - max_upload_speed = 200; - + krebs.rtorrent = { + downloadDir = lib.mkForce "/media/crypt0/torrent"; + extraConfig = '' + upload_rate = 200 + ''; }; users.groups.share = { gid = config.krebs.lib.genid "share"; @@ -109,6 +109,7 @@ in { environment.systemPackages = with pkgs;[ mergerfs # hard requirement for mount wol # wake up filepimp + f3 ]; fileSystems = let cryptMount = name: -- cgit v1.2.3 From 3f09ee57c688105898cedb5e9006f6b6c1bff483 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:47:53 +0200 Subject: m 2 temp/share-samba: add group --- makefu/2configs/temp/share-samba.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'makefu') diff --git a/makefu/2configs/temp/share-samba.nix b/makefu/2configs/temp/share-samba.nix index c021e66c6..34f0ab0b4 100644 --- a/makefu/2configs/temp/share-samba.nix +++ b/makefu/2configs/temp/share-samba.nix @@ -2,9 +2,11 @@ users.users.smbguest = { name = "smbguest"; uid = config.ids.uids.smbguest; + group = "share"; description = "smb guest user"; home = "/var/empty"; }; + users.groups.share.members = [ "makefu" ]; networking.firewall.allowedTCPPorts = [ 139 445 # samba -- cgit v1.2.3 From 7c799482fd1e5fcd6195a265ea74a050eb9c58f2 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:48:32 +0200 Subject: m udpt: update config --- makefu/2configs/udpt.nix | 10 ++++++++-- makefu/3modules/udpt.nix | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/udpt.nix b/makefu/2configs/udpt.nix index 6d55ffaf8..922743bf1 100644 --- a/makefu/2configs/udpt.nix +++ b/makefu/2configs/udpt.nix @@ -1,6 +1,7 @@ {pkgs, ...}: let + daemon-port = 6969; cfgfile = pkgs.writeText "udpt-config" '' [db] driver=sqlite3 @@ -11,7 +12,9 @@ let port=6969 threads=5 allow_remotes=yes - allow_iana_ips=no + + # allow retiolum: + allow_iana_ips=yes announce_interval=1800 cleanup_interval=120 @@ -19,7 +22,7 @@ let enable=yes [logging] - filename=- + filename=/tmp/udpt.log level=warning ''; in { @@ -27,5 +30,8 @@ in { enable = true; inherit cfgfile; }; + networking.firewall.extraCommands = '' + iptables -A INPUT -i retiolum -p udp --dport ${toString daemon-port} -j ACCEPT + ''; } diff --git a/makefu/3modules/udpt.nix b/makefu/3modules/udpt.nix index 2086bd540..59602e4a9 100644 --- a/makefu/3modules/udpt.nix +++ b/makefu/3modules/udpt.nix @@ -40,8 +40,9 @@ let restartIfChanged = true; serviceConfig = { Type = "simple"; - ExecStart = "${cfg.package}/bin/udpt -c ${shell.escape cfg.cfgfile}"; + ExecStart = "${cfg.package}/bin/udpt -i -c ${shell.escape cfg.cfgfile}"; PrivateTmp = true; + WorkingDirectory = "/tmp"; User = "${cfg.user}"; }; }; -- cgit v1.2.3 From 1258b4c7d20512c1afe0f3b0eceb52335e4155b9 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:49:04 +0200 Subject: m 2 sabnzbd: init --- makefu/2configs/sabnzbd.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 makefu/2configs/sabnzbd.nix (limited to 'makefu') diff --git a/makefu/2configs/sabnzbd.nix b/makefu/2configs/sabnzbd.nix new file mode 100644 index 000000000..6b0f2ac3a --- /dev/null +++ b/makefu/2configs/sabnzbd.nix @@ -0,0 +1,16 @@ +{ pkgs, config, ... }: + +with config.krebs.lib; +let + web-port = 8080; +in { + services.sabnzbd.enable = true; + services.sabnzbd.group = "download"; + systemd.services.sabnzbd.environment.SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + + users.users.sabnzbd.group = mkForce "download"; + + networking.firewall.extraCommands = '' + iptables -A INPUT -i retiolum -p tcp --dport ${toString web-port} -j ACCEPT + ''; +} -- cgit v1.2.3 From 50eea6cd812efc65babdea728515ac496055539a Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:49:37 +0200 Subject: m 2 x: add laptop-backup --- makefu/2configs/laptop-backup.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 makefu/2configs/laptop-backup.nix (limited to 'makefu') diff --git a/makefu/2configs/laptop-backup.nix b/makefu/2configs/laptop-backup.nix new file mode 100644 index 000000000..8df7043c8 --- /dev/null +++ b/makefu/2configs/laptop-backup.nix @@ -0,0 +1,12 @@ +{config, lib, pkgs, ... }: + +{ + systemd.user.services.duply-secrets = { + description = "run daily secrets backup"; + startAt = "daily"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "{pkgs.duply}/bin/duply omo-secrets backup"; + }; + }; +} -- cgit v1.2.3 From c2295316a8b9e5b6b07c7871d0426bf58035693d Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:50:07 +0200 Subject: m 1 x: add laptop-backup --- makefu/1systems/x.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/x.nix b/makefu/1systems/x.nix index 4829aaabd..0243856ab 100644 --- a/makefu/1systems/x.nix +++ b/makefu/1systems/x.nix @@ -9,6 +9,7 @@ ../. ../2configs/main-laptop.nix #< base-gui + zsh ../2configs/laptop-utils.nix + ../2configs/laptop-backup.nix # Krebs #../2configs/disable_v6.nix @@ -42,13 +43,14 @@ ../2configs/tinc/retiolum.nix # temporary modules ../2configs/temp/share-samba.nix - ../2configs/temp/elkstack.nix + ../2configs/laptop-backup.nix + # ../2configs/temp/elkstack.nix # ../2configs/temp/sabnzbd.nix ../2configs/tinc/siem.nix - ../2configs/torrent.nix + #../2configs/torrent.nix ]; makefu.full-populate = true; - makefu.deluge.web.enable = true; + krebs.nginx = { default404 = false; servers.default.listen = [ "80 default_server" ]; -- cgit v1.2.3 From 44d94048ac0158944877776710a349063ac5a210 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 2 Sep 2016 12:50:24 +0200 Subject: m 1 gum: add sabnzbd config --- makefu/1systems/gum.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'makefu') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index ab369d192..401ec6093 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -22,6 +22,8 @@ in { ../2configs/tinc/retiolum.nix ../2configs/urlwatch.nix ../2configs/torrent.nix + ../2configs/sabnzbd.nix + ../2configs/opentracker.nix ]; -- cgit v1.2.3 From 66ba3c3c37b6c08104e3c7f53a203853a481af26 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Sep 2016 00:45:11 +0200 Subject: m 5 qcma:init --- makefu/5pkgs/default.nix | 1 + makefu/5pkgs/qcma/default.nix | 64 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 makefu/5pkgs/qcma/default.nix (limited to 'makefu') diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 99f401ff5..0d375a510 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -24,6 +24,7 @@ in sha256 = "18ddzyh11bywrhzdkzvrl7nvgp5gdb4k1s0zxbz2bkhd14vi72bb"; }; }; + qcma = pkgs.qt5.callPackage ./qcma {}; tw-upload-plugin = callPackage ./tw-upload-plugin {}; skytraq-logger = callPackage ./skytraq-logger {}; taskserver = callPackage ./taskserver {}; diff --git a/makefu/5pkgs/qcma/default.nix b/makefu/5pkgs/qcma/default.nix new file mode 100644 index 000000000..6eb1a971d --- /dev/null +++ b/makefu/5pkgs/qcma/default.nix @@ -0,0 +1,64 @@ +{ lib, stdenv, fetchFromGitHub, fetchgit, libusb, libtool, autoconf, pkgconfig, git, +gettext, automake, libxml2 , qmakeHook, makeQtWrapper, +qtbase, qttools, qtmultimedia, libnotify, ffmpeg, gdk_pixbuf }: +let + libvitamtp = stdenv.mkDerivation rec { + name = "libvitamtp-${version}"; + version = "2.5.9"; + + src = fetchFromGitHub { + owner = "codestation"; + repo = "vitamtp"; + rev = "v"+version; + sha256 = "09c9f7gqpyicfpnhrfb4r67s2hci6hh31bzmqlpds4fywv5mzaf8"; + }; + + buildInputs = [ libusb libxml2 libtool autoconf automake gettext pkgconfig ]; + preConfigure = "sh ./autogen.sh"; + + meta = { + description = "Content Manager Assistant for the PS Vita"; + homepage = https://github.com/codestation/qcma; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ makefu ]; + }; + }; +in stdenv.mkDerivation rec { + name = "qcma-${version}"; + version = "0.3.13"; + + src = fetchgit { + url = "git://github.com/codestation/qcma.git"; + rev = "refs/tags/v"+version; + leaveDotGit = true; + sha256 = "164abjwlw2nw2i30wlwpsavz1zjkp6a14yprvinma5hflkw4yj6i"; + }; + + preConfigure = '' + lrelease common/resources/translations/*.ts + ''; + + # TODO: manually adding qtbase and qtmultimedia to the library path is shit, + # this should be done somewhere before when building the project, idk. + installPhase = '' + make INSTALL_ROOT="$(out)" install + for i in qcma qcma_cli; do + wrapQtProgram $out/bin/$i --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ + qtbase qtmultimedia ]} + done + ''; + + enableParallelBuilding = true; + + buildInputs = [ gdk_pixbuf ffmpeg libnotify libvitamtp git qtmultimedia qtbase ]; + nativeBuildInputs = [ qmakeHook qttools pkgconfig makeQtWrapper ]; + + meta = { + description = "Content Manager Assistant for the PS Vita"; + homepage = https://github.com/codestation/qcma; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ makefu ]; + }; +} -- cgit v1.2.3 From df48b1cce8982684177d3114760af107c2f76818 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 7 Sep 2016 15:18:09 +0200 Subject: m 2 default: add trace for populate --- makefu/2configs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index cdaa38f27..110d1ec80 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -24,7 +24,7 @@ with config.krebs.lib; source = let inherit (config.krebs.build) host user; in { nixpkgs = if config.makefu.full-populate or (getEnv "dummy_secrets" == "true") then { # stable @ 2016-07-20 - git = { url = https://github.com/nixos/nixpkgs; ref = "125ffff"; }; + git = trace "Populating nixpkgs via full clone" { url = https://github.com/nixos/nixpkgs; ref = "125ffff"; }; } else # TODO use http, once it is implemented @@ -32,7 +32,7 @@ with config.krebs.lib; ## prepare so we do not have to wait for rsync: ## cd /var/src; curl https://github.com/nixos/nixpkgs/tarball/125ffff -L | tar zx && mv NixOS-nixpkgs-125ffff nixpkgs - { file = "/home/makefu/store/125ffff";}; + trace "Populating nixpkgs with local directory" { file = "/home/makefu/store/125ffff";}; secrets.file = if getEnv "dummy_secrets" == "true" then toString -- cgit v1.2.3 From 907499c10bd4063cd4649899b959edd503743ee7 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 7 Sep 2016 15:52:18 +0200 Subject: m 2 default: remove trace, use || instead of or --- makefu/2configs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 110d1ec80..a7c2a983e 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -22,9 +22,9 @@ with config.krebs.lib; build = { user = config.krebs.users.makefu; source = let inherit (config.krebs.build) host user; in { - nixpkgs = if config.makefu.full-populate or (getEnv "dummy_secrets" == "true") then + nixpkgs = if config.makefu.full-populate || (getEnv "dummy_secrets" == "true") then { # stable @ 2016-07-20 - git = trace "Populating nixpkgs via full clone" { url = https://github.com/nixos/nixpkgs; ref = "125ffff"; }; + git = { url = https://github.com/nixos/nixpkgs; ref = "125ffff"; }; } else # TODO use http, once it is implemented @@ -32,7 +32,7 @@ with config.krebs.lib; ## prepare so we do not have to wait for rsync: ## cd /var/src; curl https://github.com/nixos/nixpkgs/tarball/125ffff -L | tar zx && mv NixOS-nixpkgs-125ffff nixpkgs - trace "Populating nixpkgs with local directory" { file = "/home/makefu/store/125ffff";}; + { file = "/home/makefu/store/125ffff";}; secrets.file = if getEnv "dummy_secrets" == "true" then toString -- cgit v1.2.3 From 1daec454eb524925eebf407c54a0e9d925b2bb7a Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 8 Sep 2016 08:27:01 +0200 Subject: m 5 default: use cups from nixpkgs-stable --- makefu/5pkgs/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'makefu') diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 0d375a510..6d020406d 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -2,9 +2,16 @@ let inherit (pkgs) callPackage; + nixpkgs-1509 = import (pkgs.fetchFromGitHub { + owner = "NixOS"; repo = "nixpkgs-channels"; + rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; + sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; + }) {}; + in { nixpkgs.config.packageOverrides = rec { + cups = nixpkgs-1509.cups; alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";}; alsa-hdspmixer = callPackage ./alsa-tools { alsaToolTarget="hdspmixer";}; alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";}; -- cgit v1.2.3