diff options
-rw-r--r-- | krebs/3modules/fetchWallpaper.nix | 4 | ||||
-rw-r--r-- | krebs/3modules/makefu/default.nix | 44 | ||||
-rw-r--r-- | krebs/3modules/retiolum.nix | 4 | ||||
-rw-r--r-- | krebs/5pkgs/fortclientsslvpn/default.nix | 4 | ||||
-rw-r--r-- | krebs/5pkgs/repo-sync/default.nix | 4 | ||||
-rw-r--r-- | makefu/1systems/gum.nix | 4 | ||||
-rw-r--r-- | makefu/1systems/vbob.nix | 26 | ||||
-rw-r--r-- | makefu/2configs/base-gui.nix | 10 | ||||
-rw-r--r-- | makefu/2configs/default.nix | 3 | ||||
-rw-r--r-- | makefu/2configs/hw/tp-x220.nix | 8 | ||||
-rw-r--r-- | makefu/2configs/omo-share.nix | 26 | ||||
-rw-r--r-- | makefu/2configs/temp-share-samba.nix | 28 | ||||
-rw-r--r-- | makefu/3modules/awesome-extra.nix | 40 | ||||
-rw-r--r-- | makefu/3modules/default.nix | 2 | ||||
-rw-r--r-- | makefu/3modules/taskserver.nix | 60 | ||||
-rw-r--r-- | makefu/5pkgs/awesomecfg/full.cfg | 10 | ||||
-rw-r--r-- | makefu/5pkgs/default.nix | 5 | ||||
-rw-r--r-- | makefu/5pkgs/devpi/default.nix | 70 | ||||
-rw-r--r-- | makefu/5pkgs/skytraq-logger/default.nix | 31 | ||||
l--------- | makefu/5pkgs/skytraq-logger/result | 1 | ||||
-rw-r--r-- | makefu/5pkgs/taskserver/default.nix | 43 |
21 files changed, 386 insertions, 41 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix index 53fe0839d..bd3d6d3b2 100644 --- a/krebs/3modules/fetchWallpaper.nix +++ b/krebs/3modules/fetchWallpaper.nix @@ -42,9 +42,11 @@ let fetchWallpaperScript = pkgs.writeScript "fetchWallpaper" '' #! ${pkgs.bash}/bin/bash + set -euf mkdir -p ${shell.escape cfg.stateDir} - curl -s -o ${shell.escape cfg.stateDir}/wallpaper -z ${shell.escape cfg.stateDir}/wallpaper ${shell.escape cfg.url} + cd ${shell.escape cfg.stateDir} + curl -s -o wallpaper.tmp -z wallpaper ${shell.escape cfg.url} && mv wallpaper.tmp wallpaper feh --no-fehbg --bg-scale ${shell.escape cfg.stateDir}/wallpaper ''; diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index 814e6929b..79d9a59b4 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -270,8 +270,8 @@ with config.krebs.lib; ''; }; }; - ssh.privkey.path = <secrets/ssh_host_ed25519_key>; - ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIujMZ3ZFxKpWeB/cjfKfYRr77+VRZk0Eik+92t03NoA root@servarch"; + #ssh.privkey.path = <secrets/ssh_host_ed25519_key>; + #ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIujMZ3ZFxKpWeB/cjfKfYRr77+VRZk0Eik+92t03NoA root@servarch"; }; wbob = rec { cores = 1; @@ -409,6 +409,7 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB ip6.addr = "42:9898:a8be:ce56:0ee3:b99c:42c5:109e"; aliases = [ "heidi.r" + "heidi.retiolum" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -424,6 +425,7 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB }; }; + soundflower = rec { cores = 1; nets = { @@ -479,12 +481,12 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- - MIIBCgKCAQEA961eCQE562VPYjuZtd0+FNRfUghvD2ccjUlihMjzg46GAK+duqK+ - 4peWklGOL4eRYQBg6G2VDzWiU2MxXVbXUZaMrxh7fTc3G3LdbqTxzAv3GQKR/6iA - 9bGUf6u4ztVNAcj2mrY3mfs4gMlBQyQ2wcM0ZUpiAMaRB4cdq7I4GVHbYTFYfQuI - 2zdnr0w8AjlMpFFcD0ExsWeppiJsE7iiME/S2VVfh2NrEpAKQbLH9fKrfkiJA/+9 - 0VIH9wLLIYngUtQKbvEQ5xgx6ybrg0vO8ZqZ1ZGXYxOQZzWzPP0tvDU0QHSKYSWb - FjcOf1lWSWjsjHxMl/Gh57hjNJFCbs8yjQIDAQAB + MIIBCgKCAQEA2VjW30A3uQoo5QwbFTnl5fuGg81DZVu8HXmDwgEkhZYr5Xf3V5/d + fmPlX1igzatWYX0OylFAY69r0V4dqeTubIf83sz1eqtpXjK4czG8A3wMHEXj5Pzs + e1Qh8K4rHMEATc7Y/cwpQBi2THn2bhufqgaz94m8HrStCZcKCin3fDMbE01WHWX1 + KFqeBtUd7b9pWbXKlLBNpHTZoGxVQk0Hto9pxYzHecRsbQXykYk3Rw2tSuf0aH99 + oY0i3LjOb+f2oq2S4qVHqHZsMJfDVr+x2/LP1SIcc1lVTztWSSAzZEokE0/ejvXf + wkquBVHXdl6LuzH+/V1I7OsaMhHShYu1LwIDAQAB -----END RSA PUBLIC KEY----- ''; }; @@ -594,7 +596,28 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB }; }; }; - + } // { # hosts only maintained in stockholm, not owned by me + tpsw = { + cores = 2; + owner = config.krebs.users.ciko; # main laptop + nets = { + retiolum = { + addrs4 = ["10.243.183.236"]; + addrs6 = ["42:8ca8:d2e4:adf6:5c0f:38cb:e9ef:eb3c"]; + aliases = [ "tpsw.r" "tpsw.retiolum" ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAvwYPFAINwV0EH0myFpNzRjVbqXdAmJP616C5JvODklhZWJxFxlKJ + Poczl57j2Z+4bonkTrJmsNtSaQLPKYH4H1qfo/lwz7nqEpPi3Xp4Fgts23w36eML + WBvbw0fQO9R8zZJIIdRkJ2qqlhZiTlor1Gtlm8Z1RmpKkhL9O6Yzj94VhGLhABVl + OsaF2M3PgXJMiLry67jzbAs3+mVaT3iBTzWOaOyREjKQEUg9B9IDxrmZMSWqdXZM + 0wfzaCjS40jD73m7tqi7W3tXzAUP4mEeUqkC+NC2Zgm/lJ5B1KPx7AyNqtRLsBLd + pIdJs6ng63WV1fyHYUWMYqZk9zB/tQ0b0wIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; }; users = rec { makefu = { @@ -615,6 +638,9 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB inherit (makefu) mail pgp; pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiKvLKaRQPL/Y/4EWx3rNhrY5YGKK4AeqDOFTLgJ7djwJnMo7FP+OIH/4pFxS6Ri2TZwS9QsR3hsycA4n8Z15jXAOXuK52kP65Ei3lLyz9mF+/s1mJsV0Ui/UKF3jE7PEAVky7zXuyYirJpMK8LhXydpFvH95aGrL1Dk30R9/vNkE9rc1XylBfNpT0X0GXmldI+r5OPOtiKLA5BHJdlV8qDYhQsU2fH8S0tmAHF/ir2bh7+PtLE2hmRT+b8I7y1ZagkJsC0sn9GT1AS8ys5s65V2xTTIfQO1zQ4sUH0LczuRuY8MLaO33GAzhyoSQdbdRAmwZQpY/JRJ3C/UROgHYt makefu@vbob"; }; + ciko = { + mail = "wieczorek.stefan@googlemail.com"; + }; exco = { mail = "dickbutt@excogitation.de"; pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7HCK+TzelJp7atCbvCbvZZnXFr3cE35ioactgpIJL7BOyQM6lJ/7y24WbbrstClTuV7n0rWolDgfjx/8kVQExP3HXEAgCwV6tIcX/Ep84EXSok7QguN0ozZMCwX9CYXOEyLmqpe2KAx3ggXDyyDUr2mWs04J95CFjiR/YgOhIfM4+gVBxGtLSTyegyR3Fk7O0KFwYDjBRLi7a5TIub3UYuOvw3Dxo7bUkdhtf38Kff8LEK8PKtIku/AyDlwZ0mZT4Z7gnihSG2ezR5mLD6QXVuGhG6gW/gsqfPVRF4aZbrtJWZCp2G21wBRafpEZJ8KFHtR18JNcvsuWA1HJmFOj2K0mAY5hBvzCbXGhSzBtcGxKOmTBDTRlZ7FIFgukP/ckSgDduydFUpsv07ZRj+qY07zKp3Nhh3RuN7ZcveCo2WpaAzTuWCMPB0BMhEQvsO8I/p5YtTaw2T1poOPorBbURQwEgNrZ92kB1lL5t1t1ZB4oNeDJX5fddKLkgnLqQZWOZBTKtoq0EAVXojTDLZaA+5z20h8DU7sicDQ/VG4LWtqm9fh8iDpvt/3IHUn/HJEEnlfE1Gd+F2Q+R80yu4e1PClmuzfWjCtkPc4aY7oDxfcJqyeuRW6husAufPqNs31W6X9qXwoaBh9vRQ1erZUo46iicxbzujXIy/Hwg67X8dw== dickbutt@excogitation.de"; diff --git a/krebs/3modules/retiolum.nix b/krebs/3modules/retiolum.nix index 5aaeb5a30..5a035fa50 100644 --- a/krebs/3modules/retiolum.nix +++ b/krebs/3modules/retiolum.nix @@ -102,6 +102,10 @@ let The list of hosts in the network which the client will try to connect to. These hosts should have an 'Address' configured which points to a routeable IPv4 or IPv6 address. + + In stockholm this can be done by configuring: + krebs.hosts.${connect-host}.nets.${netname?"retiolum"}.via.addrs4 = + [ "${external-ip} ${external-port}" ] ''; }; diff --git a/krebs/5pkgs/fortclientsslvpn/default.nix b/krebs/5pkgs/fortclientsslvpn/default.nix index 602766f46..11d567408 100644 --- a/krebs/5pkgs/fortclientsslvpn/default.nix +++ b/krebs/5pkgs/fortclientsslvpn/default.nix @@ -5,6 +5,10 @@ stdenv.mkDerivation rec { # forticlient will be copied into /tmp before execution. this is necessary as # the software demands $base to be writeable + # mkdir /etc/ppp ; touch /etc/ppp/options + ## i still have not found which tool uses tail ... i tried redirecting it in forticlientsslvpn and subproc + # ln -s /run/current-system/sw/bin/tail /usr/bin/tail + src = fetchurl { # archive.org mirror: # https://archive.org/download/ForticlientsslvpnLinux4.4.23171.tar/forticlientsslvpn_linux_4.4.2317.tar.gz diff --git a/krebs/5pkgs/repo-sync/default.nix b/krebs/5pkgs/repo-sync/default.nix index 789c03f36..7cba87b09 100644 --- a/krebs/5pkgs/repo-sync/default.nix +++ b/krebs/5pkgs/repo-sync/default.nix @@ -2,7 +2,7 @@ with python3Packages; buildPythonPackage rec { name = "repo-sync-${version}"; - version = "0.2.5"; + version = "0.2.6"; disabled = isPy26 || isPy27; propagatedBuildInputs = [ docopt @@ -11,7 +11,7 @@ with python3Packages; buildPythonPackage rec { ]; src = fetchurl { url = "https://pypi.python.org/packages/source/r/repo-sync/repo-sync-${version}.tar.gz"; - sha256 = "1a59bj0vc5ajq8indkvkdk022yzvvv5mjb57hk3xf1j3wpr85p84"; + sha256 = "1hqa9qw9qg7mxgniqzys9szycs05llg4yik8a9wz94a437zzarsk"; }; meta = { homepage = http://github.com/makefu/repo-sync; diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index 7bac4398c..17b2b5093 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -41,6 +41,8 @@ in { ]; }; + makefu.taskserver.enable = true; + krebs.nginx.servers.cgit = { server-names = [ "cgit.euer.krebsco.de" ]; listen = [ "${external-ip}:80" "${internal-ip}:80" ]; @@ -86,6 +88,8 @@ in { 21032 # tinc-retiolum 21031 + # taskserver + 53589 ]; allowedUDPPorts = [ # tinc diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix index 5e2382f37..8b71b1393 100644 --- a/makefu/1systems/vbob.nix +++ b/makefu/1systems/vbob.nix @@ -1,9 +1,7 @@ -# -# -# { lib, config, pkgs, ... }: { krebs.build.host = config.krebs.hosts.vbob; + makefu.awesome.modkey = "Mod1"; imports = [ # Include the results of the hardware scan. ../. @@ -19,6 +17,10 @@ device ="/dev/disk/by-label/nixstore"; fsType = "ext4"; }; + fileSystems."/var/lib/docker" = { + device ="/dev/disk/by-label/nix-docker"; + fsType = "ext4"; + }; #makefu.buildbot.master.enable = true; # allow vbob to deploy self users.extraUsers = { @@ -28,11 +30,14 @@ }; environment.systemPackages = with pkgs;[ fortclientsslvpn - buildbot - buildbot-slave get logstash + docker + devpi-web + devpi-client ]; + # virtualisation.docker.enable = true; + networking.firewall.allowedTCPPorts = [ 25 @@ -42,18 +47,21 @@ krebs.retiolum = { enable = true; - extraConfig = "Proxy = http global.proxy.alcatel-lucent.com 8000"; connectTo = [ + "omo" "gum" ]; }; - networking.proxy.default = "http://global.proxy.alcatel-lucent.com:8000"; + networking.extraHosts = '' + 172.17.20.190 gitlab + 172.17.62.27 svbittool01 tool + ''; + fileSystems."/media/share" = { fsType = "vboxsf"; device = "share"; - options = "rw,uid=9001,gid=9001"; + options = [ "rw" "uid=9001" "gid=9001" ]; }; } - diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix index b807957ba..f7d6991c5 100644 --- a/makefu/2configs/base-gui.nix +++ b/makefu/2configs/base-gui.nix @@ -14,7 +14,6 @@ with config.krebs.lib; let mainUser = config.krebs.build.user.name; - awesomecfg = pkgs.awesomecfg.full; in { imports = [ ]; @@ -36,14 +35,7 @@ in }; # lid switch is handled via button presses services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore"; - nixpkgs.config.packageOverrides = pkgs: rec { - awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : { - postFixup = '' - cp ${awesomecfg} $out/etc/xdg/awesome/rc.lua - ''; - }); - }; - + makefu.awesome.enable = true; i18n.consoleFont = "Lat2-Terminus16"; fonts = { diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 20faf7896..afdeec40e 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -138,6 +138,9 @@ with config.krebs.lib; "time.apple.com" "time.nist.gov" ]; + nix.extraOptions = '' + auto-optimise-store = true + ''; security.setuidPrograms = [ "sendmail" ]; services.journald.extraConfig = '' diff --git a/makefu/2configs/hw/tp-x220.nix b/makefu/2configs/hw/tp-x220.nix index 0a471bde0..be3d1eb70 100644 --- a/makefu/2configs/hw/tp-x220.nix +++ b/makefu/2configs/hw/tp-x220.nix @@ -4,8 +4,10 @@ with config.krebs.lib; { imports = [ ./tp-x2x0.nix ]; - - boot.kernelModules = [ "kvm-intel" ]; + boot = { + kernelModules = [ "kvm-intel" "acpi_call" ]; + extraModulePackages = [ config.boot.kernelPackages.tp_smapi ]; + }; services.xserver = { videoDriver = "intel"; @@ -15,6 +17,8 @@ with config.krebs.lib; ''; }; + security.rngd.enable = true; + services.xserver.displayManager.sessionCommands ='' xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 diff --git a/makefu/2configs/omo-share.nix b/makefu/2configs/omo-share.nix index c943e3d9a..7e9842e14 100644 --- a/makefu/2configs/omo-share.nix +++ b/makefu/2configs/omo-share.nix @@ -13,6 +13,16 @@ in { omo-share = { listen = [ "${local-ip}:80" ]; locations = singleton (nameValuePair "/" '' + + access_log off; + # sendfile off; + # tcp_nopush on; + # aio on; + sendfile on; + sendfile_max_chunk 512k; + directio 512; + aio threads; + mp4; autoindex on; root /media; limit_rate_after 100m; @@ -24,7 +34,6 @@ in { keepalive_timeout 65; keepalive_requests 200; reset_timedout_connection on; - sendfile on; tcp_nopush on; gzip off; ''); @@ -48,7 +57,6 @@ in { browseable = "yes"; "guest ok" = "yes"; }; - emu = { path = "/media/crypt1/emu"; "read only" = "yes"; @@ -61,6 +69,20 @@ in { browseable = "yes"; "guest ok" = "yes"; }; + crypt0-rw = { + path = "/media/crypt0/"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "no"; + "valid users" = "makefu"; + }; + crypt1-rw = { + path = "/media/crypt1/"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "no"; + "valid users" = "makefu"; + }; }; extraConfig = '' guest account = smbguest diff --git a/makefu/2configs/temp-share-samba.nix b/makefu/2configs/temp-share-samba.nix new file mode 100644 index 000000000..5f21e3bf7 --- /dev/null +++ b/makefu/2configs/temp-share-samba.nix @@ -0,0 +1,28 @@ +{config, ... }:{ + users.users.smbguest = { + name = "smbguest"; + uid = config.ids.uids.smbguest; + description = "smb guest user"; + home = "/var/empty"; + }; + services.samba = { + enable = true; + shares = { + share-home = { + path = "/home/share/"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "yes"; + }; + }; + extraConfig = '' + guest account = smbguest + map to guest = bad user + # disable printing + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + ''; + }; +} diff --git a/makefu/3modules/awesome-extra.nix b/makefu/3modules/awesome-extra.nix new file mode 100644 index 000000000..b12556486 --- /dev/null +++ b/makefu/3modules/awesome-extra.nix @@ -0,0 +1,40 @@ +{config, lib, pkgs, ... }: + +with config.krebs.lib; +let + cfg = config.makefu.awesome; + out = { + options.makefu.awesome = api; + config = lib.mkIf cfg.enable imp; + }; + api = { + enable = mkEnableOption "awesome custom config"; + modkey = mkOption { + type = types.str; + description = "Modkey to be used"; + default = "Mod4"; + }; + baseConfig = mkOption { + type = types.path; + description = '' + rc.lua file to be used as default + This module will use substituteAll to replace strings before writing to + /etc/xdg/awesome/rc.lua + ''; + default = pkgs.awesomecfg.full; + }; + }; + imp = { + # TODO: configure display manager as well + nixpkgs.config.packageOverrides = pkgs: rec { + awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : { + postFixup = let + rclua = pkgs.substituteAll { + src = cfg.baseConfig; + inherit (cfg) modkey; + }; + in "cp ${rclua} $out/etc/xdg/awesome/rc.lua"; + }); + }; + }; +in out diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index f007a8418..853bdca04 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -4,6 +4,8 @@ _: imports = [ ./snapraid.nix ./umts.nix + ./taskserver.nix + ./awesome-extra.nix ]; } diff --git a/makefu/3modules/taskserver.nix b/makefu/3modules/taskserver.nix new file mode 100644 index 000000000..41247fff3 --- /dev/null +++ b/makefu/3modules/taskserver.nix @@ -0,0 +1,60 @@ +{ config, lib, pkgs, ... }: + +with config.krebs.lib; +let + cfg = config.makefu.taskserver; + + out = { + options.makefu.taskserver = api; + config = lib.mkIf cfg.enable imp; + }; + + api = { + enable = mkEnableOption "taskserver"; + + workingDir = mkOption { + type = types.str; + default = "/var/lib/taskserver"; + }; + + package = mkOption { + type = types.package; + default = pkgs.taskserver; + }; + + + }; + + imp = { + environment.systemPackages = [ cfg.package ]; + systemd.services.taskserver = { + description = "taskd server"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + restartIfChanged = true; + unitConfig = { + Documentation = "http://taskwarrior.org/docs/#taskd" ; + # https://taskwarrior.org/docs/taskserver/configure.html + ConditionPathExists = "${cfg.workingDir}/config"; + }; + serviceConfig = { + Type = "simple"; + ExecStart = "${cfg.package}/bin/taskd server --data ${cfg.workingDir}"; + WorkingDirectory = cfg.workingDir; + PrivateTmp = true; + InaccessibleDirectories = "/home /boot /opt /mnt /media"; + User = "taskd"; + }; + }; + + users.users.taskd = { + uid = genid "taskd"; + home = cfg.workingDir; + createHome = true; + }; + users.groups.taskd.gid = genid "taskd"; + }; + +in +out + diff --git a/makefu/5pkgs/awesomecfg/full.cfg b/makefu/5pkgs/awesomecfg/full.cfg index c1b58aa90..f42aea003 100644 --- a/makefu/5pkgs/awesomecfg/full.cfg +++ b/makefu/5pkgs/awesomecfg/full.cfg @@ -83,13 +83,11 @@ vicious.register(batwidget, vicious.widgets.bat, "$2%", 61, "BAT0") -- {{{ Variable definitions -- Themes define colours, icons, and wallpapers -- beautiful.init("/usr/share/awesome/themes/default/theme.lua") --- ./qbx8r72yzaxpz41zq00902zwajl31b5h-awesome-3.5.6/share/awesome/lib/beautiful.lua --- --- Find the default theme --- --- beautiful.init("/nix/store/qbx8r72yzaxpz41zq00902zwajl31b5h-awesome-3.5.6/share/awesome/themes/default/theme.lua") +-- @awesome@/share/awesome/lib/beautiful.lua +-- beautiful.init("@awesome@/share/awesome/themes/default/theme.lua") +-- Find the default theme function find_default_theme() -- find the default lua theme in the package path for path in package.path:gmatch('([^;]+);') do @@ -115,7 +113,7 @@ browser = "firefox" -- If you do not like this or do not have such a key, -- I suggest you to remap Mod4 to another key using xmodmap or other tools. -- However, you can use another modifier like Mod1, but it may interact with others. -modkey = "Mod4" +modkey = "@modkey@" -- Table of layouts to cover with awful.layout.inc, order matters. local layouts = diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 8caab433e..6d227fa6d 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -9,8 +9,11 @@ in alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";}; alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";}; awesomecfg = callPackage ./awesomecfg {}; - nodemcu-uploader = callPackage ./nodemcu-uploader {}; mycube-flask = callPackage ./mycube-flask {}; + nodemcu-uploader = callPackage ./nodemcu-uploader {}; tw-upload-plugin = callPackage ./tw-upload-plugin {}; + inherit (callPackage ./devpi {}) devpi-web devpi-server; + skytraq-logger = callPackage ./skytraq-logger/ {}; + taskserver = callPackage ./taskserver {}; }; } diff --git a/makefu/5pkgs/devpi/default.nix b/makefu/5pkgs/devpi/default.nix new file mode 100644 index 000000000..0df8ecd2c --- /dev/null +++ b/makefu/5pkgs/devpi/default.nix @@ -0,0 +1,70 @@ +{ pkgs ? import <nixpkgs> {} }: +with pkgs.stdenv.lib; +let + execnet14 = pkgs.python3Packages.buildPythonPackage rec { + name = "execnet-1.4.1"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/e/execnet/${name}.tar.gz"; + sha256 = "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"; + }; + + propagatedBuildInputs = with pkgs.python3Packages; + [ setuptools_scm apipkg ]; + meta = { + description = "rapid multi-Python deployment"; + license = licenses.gpl2; + }; + }; + + devpi-web = pkgs.python3Packages.buildPythonPackage rec { + name = "devpi-web"; + version = "3.0.0"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/d/devpi-web/devpi-web-${version}.tar.gz"; + sha256 = "156abxyhj17a8cg38hpyr31qkjb61mb2kggsxij4p4xvy9jwkbwi"; + }; + + propagatedBuildInputs = with pkgs.python3Packages; + [ devpi-server pyramid_chameleon beautifulsoup4 Whoosh defusedxml ]; + + meta = { + homepage = https://bitbucket.org/hpk42/devpi; + description = "a web view for devpi-server"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + }; + devpi-server = pkgs.python3Packages.buildPythonPackage rec { + name = "devpi-server"; + version = "3.0.2"; + + # original postFixup adds "import sys; sys.argv[0] = 'devpi-server'" to + # `.devpi-server-wrapped` which + # results in "not existing devpi-server: 'devpi-server'" + postFixup = ""; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/d/devpi-server/devpi-server-${version}.tar.gz"; + sha256 = "14r1024i3x2pb72khyzvi56sh9smpdswmrbc88xvjxnalmzfn99d"; + }; + + propagatedBuildInputs = with pkgs.python3Packages; + [ devpi-common execnet14 itsdangerous pluggy waitress pyramid ]; + buildInputs = with pkgs.python3Packages; [ pytest beautifulsoup4 webtest ]; + + meta = { + homepage = https://bitbucket.org/hpk42/devpi; + description = "Devpi Server"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + }; + +in { + inherit devpi-server; + devpi-web = pkgs.python3.buildEnv.override { + extraLibs = [ devpi-web devpi-server ]; + }; +} diff --git a/makefu/5pkgs/skytraq-logger/default.nix b/makefu/5pkgs/skytraq-logger/default.nix new file mode 100644 index 000000000..1ad81594a --- /dev/null +++ b/makefu/5pkgs/skytraq-logger/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, pkgs, fetchFromGitHub, ... }: +stdenv.mkDerivation rec { + name = "skytraq-datalogger-${version}"; + version = "4966a8"; + src = fetchFromGitHub { + owner = "makefu"; + repo = "skytraq-datalogger"; + rev = version ; + sha256 = "1qaszrs7638kc9x4qq4m1yxqmk8jw7wajywvdk4wc2i007p89v3y"; + }; + buildFlags = "CC=gcc"; + makeFlags = "PREFIX=bin/ DESTDIR=$(out)"; + + preInstall = '' + mkdir -p $out/bin + ''; + #patchPhase = '' + # sed -i -e 's#/usr/bin/gcc#gcc#' -e Makefile + #''; + + buildInputs = with pkgs;[ + curl + gnugrep + ]; + + meta = { + homepage = http://github.com/makefu/skytraq-datalogger; + description = "datalogger for skytraq"; + license = lib.licenses.gpl2; + }; +} diff --git a/makefu/5pkgs/skytraq-logger/result b/makefu/5pkgs/skytraq-logger/result new file mode 120000 index 000000000..b132d6257 --- /dev/null +++ b/makefu/5pkgs/skytraq-logger/result @@ -0,0 +1 @@ +/nix/store/xpwdwpw2nkgi16yhpxin2kivaz7z588h-skytraq-datalogger-4966a8
\ No newline at end of file diff --git a/makefu/5pkgs/taskserver/default.nix b/makefu/5pkgs/taskserver/default.nix new file mode 100644 index 000000000..a1502b4d6 --- /dev/null +++ b/makefu/5pkgs/taskserver/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, cmake, libuuid, gnutls, makeWrapper }: + +stdenv.mkDerivation rec { + name = "taskserver-${version}"; + version = "1.1.0"; + + enableParallelBuilding = true; + + src = fetchurl { + url = "http://www.taskwarrior.org/download/taskd-${version}.tar.gz"; + sha256 = "1d110q9vw8g5syzihxymik7hd27z1592wkpz55kya6lphzk8i13v"; + }; + + patchPhase = '' + pkipath=$out/share/taskd/pki + mkdir -p $pkipath + cp -r pki/* $pkipath + echo "patching paths in pki/generate" + sed -i "s#^\.#$pkipath#" $pkipath/generate + for f in $pkipath/generate* ;do + i=$(basename $f) + echo patching $i + sed -i \ + -e 's/which/type -p/g' \ + -e 's#^\. ./vars#if test -e ./vars;then . ./vars; else echo "cannot find ./vars - copy the template from '$pkipath'/vars into the working directory";exit 1; fi#' $f + + echo wrapping $i + makeWrapper $pkipath/$i $out/bin/taskd-pki-$i \ + --prefix PATH : ${gnutls}/bin/ + done + ''; + + buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ cmake libuuid gnutls ]; + + meta = { + description = "Server for synchronising Taskwarrior clients"; + homepage = http://taskwarrior.org; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ matthiasbeyer makefu ]; + }; +} |