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/2configs') 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/2configs') 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/2configs') 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 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/2configs') 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 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'makefu/2configs') 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 + ''; } -- 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/2configs') 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/2configs') 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 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/2configs') 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/2configs') 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