From 6dc6b9037886ca56b4216672766e8ee4fd31a197 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 16 Oct 2016 20:14:44 +0200 Subject: tv URxvt.saveLines: 4096 --- tv/2configs/xserver/Xresources.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/2configs/xserver/Xresources.nix b/tv/2configs/xserver/Xresources.nix index f9af89c7e..ad41f3a94 100644 --- a/tv/2configs/xserver/Xresources.nix +++ b/tv/2configs/xserver/Xresources.nix @@ -207,6 +207,7 @@ pkgs.writeText "Xresources" /* xdefaults */ '' URxvt*url-select.underline: true URxvt*colorUL: #4682B4 URxvt.perl-lib: ${pkgs.urxvt_perls}/lib/urxvt/perl + URxvt.saveLines: 4096 root-urxvt*background: #230000 root-urxvt*foreground: #e0c0c0 -- cgit v1.2.3 From 91d6bd66f4d50d47692f55c16bfb14bdf4837520 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 20 Oct 2016 19:42:30 +0200 Subject: tv nixpkgs: 354fd37 -> b8ede35 --- tv/2configs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 442d7370a..abc657ec0 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -14,7 +14,7 @@ with config.krebs.lib; stockholm.file = "/home/tv/stockholm"; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "354fd3728952c229fee4f2924737c601d7ab4725"; + ref = "b8ede35d2efa96490857c22c751e75d600bea44f"; }; } // optionalAttrs host.secure { secrets-master.file = "/home/tv/secrets/master"; -- cgit v1.2.3 From f47bab7f710b7c8a282c3a3c38affc8a0bc30cc9 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 20 Oct 2016 20:54:38 +0200 Subject: drop config.krebs.lib --- tv/1systems/alnus.nix | 2 +- tv/1systems/caxi.nix | 2 +- tv/1systems/cd.nix | 2 +- tv/1systems/mu.nix | 2 +- tv/1systems/nomic.nix | 2 +- tv/1systems/wu.nix | 2 +- tv/1systems/xu.nix | 2 +- tv/1systems/zu.nix | 2 +- tv/2configs/backup.nix | 2 +- tv/2configs/bash.nix | 2 +- tv/2configs/default.nix | 2 +- tv/2configs/exim-retiolum.nix | 2 +- tv/2configs/exim-smarthost.nix | 2 +- tv/2configs/git.nix | 2 +- tv/2configs/hw/AO753.nix | 2 +- tv/2configs/im.nix | 2 +- tv/2configs/nginx/default.nix | 2 +- tv/2configs/nginx/public_html.nix | 2 +- tv/2configs/pulse.nix | 2 +- tv/2configs/retiolum.nix | 2 +- tv/2configs/ssh.nix | 2 +- tv/2configs/sshd.nix | 2 +- tv/2configs/urlwatch.nix | 2 +- tv/2configs/vim.nix | 2 +- tv/2configs/wu-binary-cache/default.nix | 2 +- tv/2configs/xdg.nix | 2 +- tv/2configs/xserver/Xmodmap.nix | 2 +- tv/2configs/xserver/Xresources.nix | 2 +- tv/2configs/xserver/default.nix | 2 +- tv/2configs/xserver/xserver.conf.nix | 2 +- tv/2configs/xu-qemu0.nix | 2 +- tv/3modules/charybdis/config.nix | 2 +- tv/3modules/charybdis/default.nix | 2 +- tv/3modules/ejabberd/config.nix | 2 +- tv/3modules/ejabberd/default.nix | 2 +- tv/3modules/hosts.nix | 2 +- tv/3modules/iptables.nix | 2 +- tv/5pkgs/default.nix | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) (limited to 'tv') diff --git a/tv/1systems/alnus.nix b/tv/1systems/alnus.nix index d3de8bdfa..bc6e3a6d8 100644 --- a/tv/1systems/alnus.nix +++ b/tv/1systems/alnus.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with config.krebs.lib; +with import ; { imports = [ diff --git a/tv/1systems/caxi.nix b/tv/1systems/caxi.nix index 5bfacd992..59f3cd63a 100644 --- a/tv/1systems/caxi.nix +++ b/tv/1systems/caxi.nix @@ -1,6 +1,6 @@ { config, ... }: -with config.krebs.lib; +with import ; { krebs.build.host = config.krebs.hosts.caxi; diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 2ad4a1505..043e91510 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.build.host = config.krebs.hosts.cd; diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index 55f18326d..e9a8a131a 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with config.krebs.lib; +with import ; { imports = [ diff --git a/tv/1systems/nomic.nix b/tv/1systems/nomic.nix index 5415e50b1..793e1f80b 100644 --- a/tv/1systems/nomic.nix +++ b/tv/1systems/nomic.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.build.host = config.krebs.hosts.nomic; diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index c2a624a91..19db559f1 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.build.host = config.krebs.hosts.wu; diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix index 85ac23e9d..a84da38db 100644 --- a/tv/1systems/xu.nix +++ b/tv/1systems/xu.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.build.host = config.krebs.hosts.xu; diff --git a/tv/1systems/zu.nix b/tv/1systems/zu.nix index 0503021d4..056652e4b 100644 --- a/tv/1systems/zu.nix +++ b/tv/1systems/zu.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.build.host = config.krebs.hosts.zu; diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index e74ed79d8..6dd24b32f 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -1,5 +1,5 @@ { config, lib, ... }: -with config.krebs.lib; +with import ; { krebs.backup.plans = { } // mapAttrs (_: recursiveUpdate { diff --git a/tv/2configs/bash.nix b/tv/2configs/bash.nix index fe87aa8d7..40c0725ed 100644 --- a/tv/2configs/bash.nix +++ b/tv/2configs/bash.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { programs.bash = { diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index abc657ec0..32e4b4503 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.enable = true; diff --git a/tv/2configs/exim-retiolum.nix b/tv/2configs/exim-retiolum.nix index ad355f8b4..bf13a388a 100644 --- a/tv/2configs/exim-retiolum.nix +++ b/tv/2configs/exim-retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.exim-retiolum.enable = true; diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix index 591edafb6..cc3bdf95d 100644 --- a/tv/2configs/exim-smarthost.nix +++ b/tv/2configs/exim-smarthost.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.exim-smarthost = { diff --git a/tv/2configs/git.nix b/tv/2configs/git.nix index fd3875410..21d365381 100644 --- a/tv/2configs/git.nix +++ b/tv/2configs/git.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; let diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index b81b773be..8625078da 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { imports = [ diff --git a/tv/2configs/im.nix b/tv/2configs/im.nix index db1be7f0b..82f1be042 100644 --- a/tv/2configs/im.nix +++ b/tv/2configs/im.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { environment.systemPackages = with pkgs; [ (pkgs.writeDashBin "im" '' diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix index d0d07d5ca..39995c052 100644 --- a/tv/2configs/nginx/default.nix +++ b/tv/2configs/nginx/default.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -with config.krebs.lib; +with import ; { krebs.nginx = { diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix index 858f16563..e0bbb8d57 100644 --- a/tv/2configs/nginx/public_html.nix +++ b/tv/2configs/nginx/public_html.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -with config.krebs.lib; +with import ; { krebs.nginx = { diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index 512919759..9c40e9b66 100644 --- a/tv/2configs/pulse.nix +++ b/tv/2configs/pulse.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; let pkg = pkgs.pulseaudioLight; runDir = "/run/pulse"; diff --git a/tv/2configs/retiolum.nix b/tv/2configs/retiolum.nix index 7179be570..0abc96822 100644 --- a/tv/2configs/retiolum.nix +++ b/tv/2configs/retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.tinc.retiolum = { diff --git a/tv/2configs/ssh.nix b/tv/2configs/ssh.nix index 7bf583426..84d247362 100644 --- a/tv/2configs/ssh.nix +++ b/tv/2configs/ssh.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with config.krebs.lib; +with import ; { # Override NixOS's "Allow DSA keys for now." diff --git a/tv/2configs/sshd.nix b/tv/2configs/sshd.nix index 943f32fe9..1749b552d 100644 --- a/tv/2configs/sshd.nix +++ b/tv/2configs/sshd.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { services.openssh = { diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 89937d702..b34590908 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: -with config.krebs.lib; +with import ; { krebs.urlwatch = { enable = true; diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 16f540488..cc59a95a5 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; let out = { environment.systemPackages = [ diff --git a/tv/2configs/wu-binary-cache/default.nix b/tv/2configs/wu-binary-cache/default.nix index 6fcac21af..f039a552b 100644 --- a/tv/2configs/wu-binary-cache/default.nix +++ b/tv/2configs/wu-binary-cache/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: with config.krebs.lib; +{ config, lib, pkgs, ... }: with import ; { services.nix-serve = assert config.krebs.build.host.name == "wu"; { enable = true; diff --git a/tv/2configs/xdg.nix b/tv/2configs/xdg.nix index f05ec5431..18bac9b38 100644 --- a/tv/2configs/xdg.nix +++ b/tv/2configs/xdg.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; { environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME"; diff --git a/tv/2configs/xserver/Xmodmap.nix b/tv/2configs/xserver/Xmodmap.nix index 02b6c730e..d2b1b2604 100644 --- a/tv/2configs/xserver/Xmodmap.nix +++ b/tv/2configs/xserver/Xmodmap.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -with config.krebs.lib; +with import ; pkgs.writeText "Xmodmap" '' !keycode 66 = Caps_Lock diff --git a/tv/2configs/xserver/Xresources.nix b/tv/2configs/xserver/Xresources.nix index ad41f3a94..398247d27 100644 --- a/tv/2configs/xserver/Xresources.nix +++ b/tv/2configs/xserver/Xresources.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; pkgs.writeText "Xresources" /* xdefaults */ '' !URxvt*background: #050505 diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 7a76530be..7dcfecce6 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }@args: -with config.krebs.lib; +with import ; let user = config.krebs.build.user; in { diff --git a/tv/2configs/xserver/xserver.conf.nix b/tv/2configs/xserver/xserver.conf.nix index c452b4226..6f34e0150 100644 --- a/tv/2configs/xserver/xserver.conf.nix +++ b/tv/2configs/xserver/xserver.conf.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; let cfg = config.services.xserver; diff --git a/tv/2configs/xu-qemu0.nix b/tv/2configs/xu-qemu0.nix index 0e4a91c90..355a36650 100644 --- a/tv/2configs/xu-qemu0.nix +++ b/tv/2configs/xu-qemu0.nix @@ -15,7 +15,7 @@ in # # make [install] system=xu-qemu0 target_host=10.56.0.101 -with config.krebs.lib; +with import ; { networking.dhcpcd.denyInterfaces = [ "qemubr0" ]; diff --git a/tv/3modules/charybdis/config.nix b/tv/3modules/charybdis/config.nix index 1b160926c..5812516f1 100644 --- a/tv/3modules/charybdis/config.nix +++ b/tv/3modules/charybdis/config.nix @@ -1,4 +1,4 @@ -{ config, ... }: with config.krebs.lib; let +{ config, ... }: with import ; let cfg = config.tv.charybdis; in toFile "charybdis.conf" '' /* doc/example.conf - brief example configuration file diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index 3af971cd4..859dc122c 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }@args: with config.krebs.lib; let +{ config, lib, pkgs, ... }@args: with import ; let cfg = config.tv.charybdis; in { options.tv.charybdis = { diff --git a/tv/3modules/ejabberd/config.nix b/tv/3modules/ejabberd/config.nix index 49bded855..29c38fbe4 100644 --- a/tv/3modules/ejabberd/config.nix +++ b/tv/3modules/ejabberd/config.nix @@ -1,4 +1,4 @@ -{ config, ... }: with config.krebs.lib; let +{ config, ... }: with import ; let cfg = config.tv.ejabberd; # XXX this is a placeholder that happens to work the default strings. diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix index 95ea24be1..4d3493d78 100644 --- a/tv/3modules/ejabberd/default.nix +++ b/tv/3modules/ejabberd/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }@args: with config.krebs.lib; let +{ config, lib, pkgs, ... }@args: with import ; let cfg = config.tv.ejabberd; in { options.tv.ejabberd = { diff --git a/tv/3modules/hosts.nix b/tv/3modules/hosts.nix index 7bf3267c7..118740510 100644 --- a/tv/3modules/hosts.nix +++ b/tv/3modules/hosts.nix @@ -1,6 +1,6 @@ { config, ... }: -with config.krebs.lib; +with import ; { options.tv.hosts = mkOption { diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix index 4b1d1ef87..7276726ca 100644 --- a/tv/3modules/iptables.nix +++ b/tv/3modules/iptables.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with config.krebs.lib; +with import ; let cfg = config.tv.iptables; diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 3590ad572..ace3ed00f 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: -with config.krebs.lib; +with import ; { nixpkgs.config.packageOverrides = super: { # TODO use XDG_RUNTIME_DIR? -- cgit v1.2.3 From 0d4d8ccf3f1cd8ae16bb38bbb1b347742ef14980 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 21 Oct 2016 22:44:30 +0200 Subject: tv nixpkgs: b8ede35 -> 31c72ce --- tv/2configs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 32e4b4503..b80479eaa 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -14,7 +14,7 @@ with import ; stockholm.file = "/home/tv/stockholm"; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "b8ede35d2efa96490857c22c751e75d600bea44f"; + ref = "31c72ce266b0179efa877bb3acd7dfd7b746537b"; }; } // optionalAttrs host.secure { secrets-master.file = "/home/tv/secrets/master"; -- cgit v1.2.3 From b15eda79dffda9eb69c22f0d78e1d79120ca269b Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 22 Oct 2016 00:47:55 +0200 Subject: ire: RIP --- tv/2configs/retiolum.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/retiolum.nix b/tv/2configs/retiolum.nix index 0abc96822..ad1116d4f 100644 --- a/tv/2configs/retiolum.nix +++ b/tv/2configs/retiolum.nix @@ -10,7 +10,6 @@ with import ; "prism" "echelon" "cd" - "ire" ]; tincPackage = pkgs.tinc_pre; }; -- cgit v1.2.3 From 147df0c9048ec01691993f7ceef8e95d68814ddb Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 22 Oct 2016 10:06:10 +0200 Subject: tv nixpkgs: 31c72ce -> cd41bfe --- tv/2configs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index b80479eaa..475c17f2f 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -14,7 +14,7 @@ with import ; stockholm.file = "/home/tv/stockholm"; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "31c72ce266b0179efa877bb3acd7dfd7b746537b"; + ref = "cd41bfeeb1aaa10e4d412f2bd90dc2844a7c5df8"; }; } // optionalAttrs host.secure { secrets-master.file = "/home/tv/secrets/master"; -- cgit v1.2.3 From 30fe90d4c7f2aad36527accdc12a0718c02bd143 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 22 Oct 2016 14:54:19 +0200 Subject: tv pkgs: callPackage all subdirs --- tv/5pkgs/default.nix | 24 +++- tv/5pkgs/xmonad-tv.nix | 305 ----------------------------------------- tv/5pkgs/xmonad-tv/default.nix | 305 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 324 insertions(+), 310 deletions(-) delete mode 100644 tv/5pkgs/xmonad-tv.nix create mode 100644 tv/5pkgs/xmonad-tv/default.nix (limited to 'tv') diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index ace3ed00f..4eb8a10b4 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,7 +1,24 @@ { config, pkgs, ... }: with import ; { - nixpkgs.config.packageOverrides = super: { + nixpkgs.config.packageOverrides = super: let + + # This callPackage will try to detect obsolete overrides. + callPackage = path: args: let + override = super.callPackage path args; + upstream = optionalAttrs (override ? "name") + (super.${(parseDrvName override.name).name} or {}); + in if upstream ? "name" && + override ? "name" && + compareVersions upstream.name override.name != -1 + then trace "Upstream `${upstream.name}' gets overridden by `${override.name}'." override + else override; + + in {} + // mapAttrs (_: flip callPackage {}) + (filterAttrs (_: dir: pathExists (dir + "/default.nix")) + (subdirsOf ./.)) + // { # TODO use XDG_RUNTIME_DIR? cr = pkgs.writeDashBin "cr" '' set -efu @@ -12,7 +29,7 @@ with import ; --disk-cache-size=50000000 \ "$@" ''; - ejabberd = pkgs.callPackage ./ejabberd { + ejabberd = callPackage ./ejabberd { erlang = pkgs.erlangR16; }; ff = pkgs.writeDashBin "ff" '' @@ -22,8 +39,5 @@ with import ; if elem config.krebs.build.host.name ["xu" "wu"] then super.gnupg21 else super.gnupg; - q = pkgs.callPackage ./q {}; - viljetic-pages = pkgs.callPackage ./viljetic-pages {}; - xmonad-tv = import ./xmonad-tv.nix { inherit pkgs; }; }; } diff --git a/tv/5pkgs/xmonad-tv.nix b/tv/5pkgs/xmonad-tv.nix deleted file mode 100644 index c6a622bd1..000000000 --- a/tv/5pkgs/xmonad-tv.nix +++ /dev/null @@ -1,305 +0,0 @@ -{ pkgs, ... }: -pkgs.writeHaskell "xmonad-tv" { - executables.xmonad = { - extra-depends = [ - "containers" - "unix" - "X11" - "xmonad" - "xmonad-contrib" - "xmonad-stockholm" - ]; - text = /* haskell */ '' -{-# LANGUAGE DeriveDataTypeable #-} -- for XS -{-# LANGUAGE FlexibleContexts #-} -- for xmonad' -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE ScopedTypeVariables #-} - - -module Main where - -import Control.Exception -import Graphics.X11.ExtraTypes.XF86 -import Text.Read (readEither) -import XMonad -import System.IO (hPutStrLn, stderr) -import System.Environment (getArgs, withArgs, getEnv, getEnvironment) -import System.Posix.Process (executeFile) -import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace - , removeEmptyWorkspace) -import XMonad.Actions.GridSelect -import XMonad.Actions.CycleWS (toggleWS) ---import XMonad.Actions.CopyWindow ( copy ) -import XMonad.Layout.NoBorders ( smartBorders ) -import qualified XMonad.StackSet as W -import Data.Map (Map) -import qualified Data.Map as Map --- TODO import XMonad.Layout.WorkspaceDir -import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook) --- import XMonad.Layout.Tabbed ---import XMonad.Layout.MouseResizableTile -import XMonad.Layout.Reflect (reflectVert) -import XMonad.Layout.FixedColumn (FixedColumn(..)) -import XMonad.Hooks.Place (placeHook, smart) -import XMonad.Hooks.FloatNext (floatNextHook) -import XMonad.Actions.PerWorkspaceKeys (chooseAction) -import XMonad.Layout.PerWorkspace (onWorkspace) ---import XMonad.Layout.BinarySpacePartition - ---import XMonad.Actions.Submap -import XMonad.Stockholm.Pager -import XMonad.Stockholm.Rhombus -import XMonad.Stockholm.Shutdown - - -amixerPath :: FilePath -amixerPath = "${pkgs.alsaUtils}/bin/amixer" - -urxvtcPath :: FilePath -urxvtcPath = "${pkgs.rxvt_unicode}/bin/urxvtc" - -myFont :: String -myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" - -main :: IO () -main = getArgs >>= \case - ["--shutdown"] -> sendShutdownEvent - _ -> mainNoArgs - -mainNoArgs :: IO () -mainNoArgs = do - workspaces0 <- getWorkspaces0 - xmonad' - -- $ withUrgencyHookC dzenUrgencyHook { args = ["-bg", "magenta", "-fg", "magenta", "-h", "2"], duration = 500000 } - -- urgencyConfig { remindWhen = Every 1 } - -- $ withUrgencyHook borderUrgencyHook "magenta" - -- $ withUrgencyHookC BorderUrgencyHook { urgencyBorderColor = "magenta" } urgencyConfig { suppressWhen = Never } - $ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") - $ def - { terminal = urxvtcPath - , modMask = mod4Mask - , keys = myKeys - , workspaces = workspaces0 - , layoutHook = smartBorders $ myLayout - -- , handleEventHook = myHandleEventHooks <+> handleTimerEvent - --, handleEventHook = handleTimerEvent - , manageHook = placeHook (smart (1,0)) <+> floatNextHook - , startupHook = do - path <- liftIO (getEnv "XMONAD_STARTUP_HOOK") - forkFile path [] Nothing - , normalBorderColor = "#1c1c1c" - , focusedBorderColor = "#f000b0" - , handleEventHook = handleShutdownEvent - } - where - myLayout = - (onWorkspace "im" $ reflectVert $ Mirror $ Tall 1 (3/100) (12/13)) - (FixedColumn 1 20 80 10 ||| Full) - - -xmonad' :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO () -xmonad' conf = do - path <- getEnv "XMONAD_STATE" - try (readFile path) >>= \case - Right content -> do - hPutStrLn stderr ("resuming from " ++ path) - withArgs ("--resume" : lines content) (xmonad conf) - Left e -> do - hPutStrLn stderr (displaySomeException e) - xmonad conf - -getWorkspaces0 :: IO [String] -getWorkspaces0 = - try (getEnv "XMONAD_WORKSPACES0_FILE") >>= \case - Left e -> warn (displaySomeException e) - Right p -> try (readFile p) >>= \case - Left e -> warn (displaySomeException e) - Right x -> case readEither x of - Left e -> warn e - Right y -> return y - where - warn msg = hPutStrLn stderr ("getWorkspaces0: " ++ msg) >> return [] - -displaySomeException :: SomeException -> String -displaySomeException = displayException - - -forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X () -forkFile path args env = - xfork (executeFile path False args env) >> return () - -spawnRootTerm :: X () -spawnRootTerm = - forkFile - urxvtcPath - ["-name", "root-urxvt", "-e", "/var/setuid-wrappers/su", "-"] - Nothing - -spawnTermAt :: String -> X () -spawnTermAt ws = do - env <- liftIO getEnvironment - let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env - forkFile urxvtcPath [] (Just env') - -myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) -myKeys conf = Map.fromList $ - [ ((_4 , xK_Escape ), forkFile "/var/setuid-wrappers/slock" [] Nothing) - , ((_4S , xK_c ), kill) - - , ((_4 , xK_x ), chooseAction spawnTermAt) - , ((_4C , xK_x ), spawnRootTerm) - - --, ((_4 , xK_F1 ), withFocused jojo) - --, ((_4 , xK_F1 ), printAllGeometries) - - , ((0 , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.view) ) - , ((_S , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) ) - , ((_C , xK_Menu ), toggleWS) - , ((_4 , xK_Menu ), rhombus horseConfig (liftIO . hPutStrLn stderr) ["Correct", "Horse", "Battery", "Staple", "Stuhl", "Tisch"] ) - - -- %! Rotate through the available layout algorithms - , ((_4 , xK_space ), sendMessage NextLayout) - , ((_4S , xK_space ), setLayout $ XMonad.layoutHook conf) -- reset layout - - ---- BinarySpacePartition - --, ((_4 , xK_l), sendMessage $ ExpandTowards R) - --, ((_4 , xK_h), sendMessage $ ExpandTowards L) - --, ((_4 , xK_j), sendMessage $ ExpandTowards D) - --, ((_4 , xK_k), sendMessage $ ExpandTowards U) - --, ((_4S , xK_l), sendMessage $ ShrinkFrom R) - --, ((_4S , xK_h), sendMessage $ ShrinkFrom L) - --, ((_4S , xK_j), sendMessage $ ShrinkFrom D) - --, ((_4S , xK_k), sendMessage $ ShrinkFrom U) - --, ((_4 , xK_n), sendMessage Rotate) - --, ((_4S , xK_n), sendMessage Swap) - - ---- mouseResizableTile - --, ((_4 , xK_u), sendMessage ShrinkSlave) - --, ((_4 , xK_i), sendMessage ExpandSlave) - - -- move focus up or down the window stack - --, ((_4 , xK_m ), windows W.focusMaster) - , ((_4 , xK_j ), windows W.focusDown) - , ((_4 , xK_k ), windows W.focusUp) - - -- modifying the window order - , ((_4S , xK_m ), windows W.swapMaster) - , ((_4S , xK_j ), windows W.swapDown) - , ((_4S , xK_k ), windows W.swapUp) - - -- resizing the master/slave ratio - , ((_4 , xK_h ), sendMessage Shrink) -- %! Shrink the master area - , ((_4 , xK_l ), sendMessage Expand) -- %! Expand the master area - - -- floating layer support - , ((_4 , xK_t ), withFocused $ windows . W.sink) -- make tiling - - -- increase or decrease number of windows in the master area - , ((_4 , xK_comma ), sendMessage $ IncMasterN 1) - , ((_4 , xK_period ), sendMessage $ IncMasterN (-1)) - - , ((_4 , xK_a ), addWorkspacePrompt def) - , ((_4 , xK_r ), renameWorkspace def) - , ((_4 , xK_Delete ), removeEmptyWorkspace) - - , ((_4 , xK_Return ), toggleWS) - --, (0 , xK_Menu ) & \k -> (k, gridselectWorkspace wsGSConfig { gs_navigate = makeGSNav k } W.view) - --, (_4 , xK_v ) & \k -> (k, gridselectWorkspace wsGSConfig { gs_navigate = makeGSNav k } W.view) - --, (_4S , xK_v ) & \k -> (k, gridselectWorkspace wsGSConfig { gs_navigate = makeGSNav k } W.shift) - --, (_4 , xK_b ) & \k -> (k, goToSelected wGSConfig { gs_navigate = makeGSNav k }) - , ((noModMask, xF86XK_AudioLowerVolume), amixer ["sset", "Master", "5%-"]) - , ((noModMask, xF86XK_AudioRaiseVolume), amixer ["sset", "Master", "5%+"]) - , ((noModMask, xF86XK_AudioMute), amixer ["sset", "Master", "toggle"]) - ] - where - _4 = mod4Mask - _C = controlMask - _S = shiftMask - _M = mod1Mask - _4C = _4 .|. _C - _4S = _4 .|. _S - _4M = _4 .|. _M - _4CM = _4 .|. _C .|. _M - _4SM = _4 .|. _S .|. _M - - amixer args = forkFile amixerPath args Nothing - - -pagerConfig :: PagerConfig -pagerConfig = def - { pc_font = myFont - , pc_cellwidth = 64 - --, pc_cellheight = 36 -- TODO automatically keep screen aspect - --, pc_borderwidth = 1 - --, pc_matchcolor = "#f0b000" - , pc_matchmethod = MatchPrefix - --, pc_colors = pagerWorkspaceColors - , pc_windowColors = windowColors - } - where - windowColors _ _ _ True _ = ("#ef4242","#ff2323") - windowColors wsf m c u wf = do - let y = defaultWindowColors wsf m c u wf - if m == False && wf == True - then ("#402020", snd y) - else y - -horseConfig :: RhombusConfig -horseConfig = def - { rc_font = myFont - , rc_cellwidth = 64 - --, rc_cellheight = 36 -- TODO automatically keep screen aspect - --, rc_borderwidth = 1 - --, rc_matchcolor = "#f0b000" - , rc_matchmethod = MatchPrefix - --, rc_colors = pagerWorkspaceColors - --, rc_paint = myPaint - } - -wGSConfig :: GSConfig Window -wGSConfig = def - { gs_cellheight = 20 - , gs_cellwidth = 192 - , gs_cellpadding = 5 - , gs_font = myFont - , gs_navigate = navNSearch - } - --- wsGSConfig = def --- { gs_cellheight = 20 --- , gs_cellwidth = 64 --- , gs_cellpadding = 5 --- , gs_font = myFont --- , gs_navigate = navNSearch --- } - --- custom navNSearch ---makeGSNav :: (KeyMask, KeySym) -> TwoD a (Maybe a) ---makeGSNav esc = nav --- where --- nav = makeXEventhandler $ shadowWithKeymap keyMap navNSearchDefaultHandler --- keyMap = Map.fromList --- [ (esc , cancel) --- , ((0,xK_Escape) , cancel) --- , ((0,xK_Return) , select) --- , ((0,xK_Left) , move (-1, 0) >> nav) --- , ((0,xK_Right) , move ( 1, 0) >> nav) --- , ((0,xK_Down) , move ( 0, 1) >> nav) --- , ((0,xK_Up) , move ( 0,-1) >> nav) --- , ((0,xK_BackSpace) , transformSearchString (\s -> if (s == "") then "" else init s) >> nav) --- ] --- -- The navigation handler ignores unknown key symbols, therefore we const --- navNSearchDefaultHandler (_,s,_) = do --- transformSearchString (++ s) --- nav - - -(&) :: a -> (a -> c) -> c -(&) = flip ($) - -allWorkspaceNames :: W.StackSet i l a sid sd -> X [i] -allWorkspaceNames ws = - return $ map W.tag (W.hidden ws) ++ [W.tag $ W.workspace $ W.current ws] - ''; - }; -} diff --git a/tv/5pkgs/xmonad-tv/default.nix b/tv/5pkgs/xmonad-tv/default.nix new file mode 100644 index 000000000..c6a622bd1 --- /dev/null +++ b/tv/5pkgs/xmonad-tv/default.nix @@ -0,0 +1,305 @@ +{ pkgs, ... }: +pkgs.writeHaskell "xmonad-tv" { + executables.xmonad = { + extra-depends = [ + "containers" + "unix" + "X11" + "xmonad" + "xmonad-contrib" + "xmonad-stockholm" + ]; + text = /* haskell */ '' +{-# LANGUAGE DeriveDataTypeable #-} -- for XS +{-# LANGUAGE FlexibleContexts #-} -- for xmonad' +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE ScopedTypeVariables #-} + + +module Main where + +import Control.Exception +import Graphics.X11.ExtraTypes.XF86 +import Text.Read (readEither) +import XMonad +import System.IO (hPutStrLn, stderr) +import System.Environment (getArgs, withArgs, getEnv, getEnvironment) +import System.Posix.Process (executeFile) +import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace + , removeEmptyWorkspace) +import XMonad.Actions.GridSelect +import XMonad.Actions.CycleWS (toggleWS) +--import XMonad.Actions.CopyWindow ( copy ) +import XMonad.Layout.NoBorders ( smartBorders ) +import qualified XMonad.StackSet as W +import Data.Map (Map) +import qualified Data.Map as Map +-- TODO import XMonad.Layout.WorkspaceDir +import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook) +-- import XMonad.Layout.Tabbed +--import XMonad.Layout.MouseResizableTile +import XMonad.Layout.Reflect (reflectVert) +import XMonad.Layout.FixedColumn (FixedColumn(..)) +import XMonad.Hooks.Place (placeHook, smart) +import XMonad.Hooks.FloatNext (floatNextHook) +import XMonad.Actions.PerWorkspaceKeys (chooseAction) +import XMonad.Layout.PerWorkspace (onWorkspace) +--import XMonad.Layout.BinarySpacePartition + +--import XMonad.Actions.Submap +import XMonad.Stockholm.Pager +import XMonad.Stockholm.Rhombus +import XMonad.Stockholm.Shutdown + + +amixerPath :: FilePath +amixerPath = "${pkgs.alsaUtils}/bin/amixer" + +urxvtcPath :: FilePath +urxvtcPath = "${pkgs.rxvt_unicode}/bin/urxvtc" + +myFont :: String +myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" + +main :: IO () +main = getArgs >>= \case + ["--shutdown"] -> sendShutdownEvent + _ -> mainNoArgs + +mainNoArgs :: IO () +mainNoArgs = do + workspaces0 <- getWorkspaces0 + xmonad' + -- $ withUrgencyHookC dzenUrgencyHook { args = ["-bg", "magenta", "-fg", "magenta", "-h", "2"], duration = 500000 } + -- urgencyConfig { remindWhen = Every 1 } + -- $ withUrgencyHook borderUrgencyHook "magenta" + -- $ withUrgencyHookC BorderUrgencyHook { urgencyBorderColor = "magenta" } urgencyConfig { suppressWhen = Never } + $ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") + $ def + { terminal = urxvtcPath + , modMask = mod4Mask + , keys = myKeys + , workspaces = workspaces0 + , layoutHook = smartBorders $ myLayout + -- , handleEventHook = myHandleEventHooks <+> handleTimerEvent + --, handleEventHook = handleTimerEvent + , manageHook = placeHook (smart (1,0)) <+> floatNextHook + , startupHook = do + path <- liftIO (getEnv "XMONAD_STARTUP_HOOK") + forkFile path [] Nothing + , normalBorderColor = "#1c1c1c" + , focusedBorderColor = "#f000b0" + , handleEventHook = handleShutdownEvent + } + where + myLayout = + (onWorkspace "im" $ reflectVert $ Mirror $ Tall 1 (3/100) (12/13)) + (FixedColumn 1 20 80 10 ||| Full) + + +xmonad' :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO () +xmonad' conf = do + path <- getEnv "XMONAD_STATE" + try (readFile path) >>= \case + Right content -> do + hPutStrLn stderr ("resuming from " ++ path) + withArgs ("--resume" : lines content) (xmonad conf) + Left e -> do + hPutStrLn stderr (displaySomeException e) + xmonad conf + +getWorkspaces0 :: IO [String] +getWorkspaces0 = + try (getEnv "XMONAD_WORKSPACES0_FILE") >>= \case + Left e -> warn (displaySomeException e) + Right p -> try (readFile p) >>= \case + Left e -> warn (displaySomeException e) + Right x -> case readEither x of + Left e -> warn e + Right y -> return y + where + warn msg = hPutStrLn stderr ("getWorkspaces0: " ++ msg) >> return [] + +displaySomeException :: SomeException -> String +displaySomeException = displayException + + +forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X () +forkFile path args env = + xfork (executeFile path False args env) >> return () + +spawnRootTerm :: X () +spawnRootTerm = + forkFile + urxvtcPath + ["-name", "root-urxvt", "-e", "/var/setuid-wrappers/su", "-"] + Nothing + +spawnTermAt :: String -> X () +spawnTermAt ws = do + env <- liftIO getEnvironment + let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env + forkFile urxvtcPath [] (Just env') + +myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) +myKeys conf = Map.fromList $ + [ ((_4 , xK_Escape ), forkFile "/var/setuid-wrappers/slock" [] Nothing) + , ((_4S , xK_c ), kill) + + , ((_4 , xK_x ), chooseAction spawnTermAt) + , ((_4C , xK_x ), spawnRootTerm) + + --, ((_4 , xK_F1 ), withFocused jojo) + --, ((_4 , xK_F1 ), printAllGeometries) + + , ((0 , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.view) ) + , ((_S , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) ) + , ((_C , xK_Menu ), toggleWS) + , ((_4 , xK_Menu ), rhombus horseConfig (liftIO . hPutStrLn stderr) ["Correct", "Horse", "Battery", "Staple", "Stuhl", "Tisch"] ) + + -- %! Rotate through the available layout algorithms + , ((_4 , xK_space ), sendMessage NextLayout) + , ((_4S , xK_space ), setLayout $ XMonad.layoutHook conf) -- reset layout + + ---- BinarySpacePartition + --, ((_4 , xK_l), sendMessage $ ExpandTowards R) + --, ((_4 , xK_h), sendMessage $ ExpandTowards L) + --, ((_4 , xK_j), sendMessage $ ExpandTowards D) + --, ((_4 , xK_k), sendMessage $ ExpandTowards U) + --, ((_4S , xK_l), sendMessage $ ShrinkFrom R) + --, ((_4S , xK_h), sendMessage $ ShrinkFrom L) + --, ((_4S , xK_j), sendMessage $ ShrinkFrom D) + --, ((_4S , xK_k), sendMessage $ ShrinkFrom U) + --, ((_4 , xK_n), sendMessage Rotate) + --, ((_4S , xK_n), sendMessage Swap) + + ---- mouseResizableTile + --, ((_4 , xK_u), sendMessage ShrinkSlave) + --, ((_4 , xK_i), sendMessage ExpandSlave) + + -- move focus up or down the window stack + --, ((_4 , xK_m ), windows W.focusMaster) + , ((_4 , xK_j ), windows W.focusDown) + , ((_4 , xK_k ), windows W.focusUp) + + -- modifying the window order + , ((_4S , xK_m ), windows W.swapMaster) + , ((_4S , xK_j ), windows W.swapDown) + , ((_4S , xK_k ), windows W.swapUp) + + -- resizing the master/slave ratio + , ((_4 , xK_h ), sendMessage Shrink) -- %! Shrink the master area + , ((_4 , xK_l ), sendMessage Expand) -- %! Expand the master area + + -- floating layer support + , ((_4 , xK_t ), withFocused $ windows . W.sink) -- make tiling + + -- increase or decrease number of windows in the master area + , ((_4 , xK_comma ), sendMessage $ IncMasterN 1) + , ((_4 , xK_period ), sendMessage $ IncMasterN (-1)) + + , ((_4 , xK_a ), addWorkspacePrompt def) + , ((_4 , xK_r ), renameWorkspace def) + , ((_4 , xK_Delete ), removeEmptyWorkspace) + + , ((_4 , xK_Return ), toggleWS) + --, (0 , xK_Menu ) & \k -> (k, gridselectWorkspace wsGSConfig { gs_navigate = makeGSNav k } W.view) + --, (_4 , xK_v ) & \k -> (k, gridselectWorkspace wsGSConfig { gs_navigate = makeGSNav k } W.view) + --, (_4S , xK_v ) & \k -> (k, gridselectWorkspace wsGSConfig { gs_navigate = makeGSNav k } W.shift) + --, (_4 , xK_b ) & \k -> (k, goToSelected wGSConfig { gs_navigate = makeGSNav k }) + , ((noModMask, xF86XK_AudioLowerVolume), amixer ["sset", "Master", "5%-"]) + , ((noModMask, xF86XK_AudioRaiseVolume), amixer ["sset", "Master", "5%+"]) + , ((noModMask, xF86XK_AudioMute), amixer ["sset", "Master", "toggle"]) + ] + where + _4 = mod4Mask + _C = controlMask + _S = shiftMask + _M = mod1Mask + _4C = _4 .|. _C + _4S = _4 .|. _S + _4M = _4 .|. _M + _4CM = _4 .|. _C .|. _M + _4SM = _4 .|. _S .|. _M + + amixer args = forkFile amixerPath args Nothing + + +pagerConfig :: PagerConfig +pagerConfig = def + { pc_font = myFont + , pc_cellwidth = 64 + --, pc_cellheight = 36 -- TODO automatically keep screen aspect + --, pc_borderwidth = 1 + --, pc_matchcolor = "#f0b000" + , pc_matchmethod = MatchPrefix + --, pc_colors = pagerWorkspaceColors + , pc_windowColors = windowColors + } + where + windowColors _ _ _ True _ = ("#ef4242","#ff2323") + windowColors wsf m c u wf = do + let y = defaultWindowColors wsf m c u wf + if m == False && wf == True + then ("#402020", snd y) + else y + +horseConfig :: RhombusConfig +horseConfig = def + { rc_font = myFont + , rc_cellwidth = 64 + --, rc_cellheight = 36 -- TODO automatically keep screen aspect + --, rc_borderwidth = 1 + --, rc_matchcolor = "#f0b000" + , rc_matchmethod = MatchPrefix + --, rc_colors = pagerWorkspaceColors + --, rc_paint = myPaint + } + +wGSConfig :: GSConfig Window +wGSConfig = def + { gs_cellheight = 20 + , gs_cellwidth = 192 + , gs_cellpadding = 5 + , gs_font = myFont + , gs_navigate = navNSearch + } + +-- wsGSConfig = def +-- { gs_cellheight = 20 +-- , gs_cellwidth = 64 +-- , gs_cellpadding = 5 +-- , gs_font = myFont +-- , gs_navigate = navNSearch +-- } + +-- custom navNSearch +--makeGSNav :: (KeyMask, KeySym) -> TwoD a (Maybe a) +--makeGSNav esc = nav +-- where +-- nav = makeXEventhandler $ shadowWithKeymap keyMap navNSearchDefaultHandler +-- keyMap = Map.fromList +-- [ (esc , cancel) +-- , ((0,xK_Escape) , cancel) +-- , ((0,xK_Return) , select) +-- , ((0,xK_Left) , move (-1, 0) >> nav) +-- , ((0,xK_Right) , move ( 1, 0) >> nav) +-- , ((0,xK_Down) , move ( 0, 1) >> nav) +-- , ((0,xK_Up) , move ( 0,-1) >> nav) +-- , ((0,xK_BackSpace) , transformSearchString (\s -> if (s == "") then "" else init s) >> nav) +-- ] +-- -- The navigation handler ignores unknown key symbols, therefore we const +-- navNSearchDefaultHandler (_,s,_) = do +-- transformSearchString (++ s) +-- nav + + +(&) :: a -> (a -> c) -> c +(&) = flip ($) + +allWorkspaceNames :: W.StackSet i l a sid sd -> X [i] +allWorkspaceNames ws = + return $ map W.tag (W.hidden ws) ++ [W.tag $ W.workspace $ W.current ws] + ''; + }; +} -- cgit v1.2.3 From 183b9d64bf0406d4ea722e2157483e0d47217aae Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 22 Oct 2016 14:55:09 +0200 Subject: tv djbdns: init at 1.05 --- tv/5pkgs/djbdns/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tv/5pkgs/djbdns/default.nix (limited to 'tv') diff --git a/tv/5pkgs/djbdns/default.nix b/tv/5pkgs/djbdns/default.nix new file mode 100644 index 000000000..ad5a530bd --- /dev/null +++ b/tv/5pkgs/djbdns/default.nix @@ -0,0 +1,20 @@ +{ coreutils, gawk, fetchurl, stdenv, ... }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "djbdns-1.05"; + src = fetchurl { + url = "http://cr.yp.to/djbdns/djbdns-1.05.tar.gz"; + sha256 = "0j3baf92vkczr5fxww7rp1b7gmczxmmgrqc8w2dy7kgk09m85k9w"; + }; + configurePhase = '' + echo $out > conf-home + echo gcc -O2 -include errno.h > conf-cc + ''; + patchPhase = '' + sed -i 's:c("/","etc","dnsroots.global",-1,-1,0644);:// &:' hier.c + sed -i '1s@^@PATH=${makeBinPath [ coreutils gawk ]}\n@' dnstracesort.sh + ''; + installTargets = "setup check"; +} -- cgit v1.2.3 From 2c74f5a654fa357a4eec8eef9c40ebdbd4456f70 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 23 Oct 2016 18:10:00 +0200 Subject: tv: globally set CURL_CA_BUNDLE, GIT_SSL_CAINFO, SSL_CERT_FILE --- tv/2configs/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 475c17f2f..4b89252f9 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -112,6 +112,14 @@ with import ; }; } + (let ca-bundle = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; in { + environment.variables = { + CURL_CA_BUNDLE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + }; + }) + { services.cron.enable = false; services.nscd.enable = false; -- cgit v1.2.3 From e66a4afdc11db6864ac96815feac4eb797e2c038 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 23 Oct 2016 18:10:31 +0200 Subject: tv git: add netcup --- tv/2configs/git.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/2configs/git.nix b/tv/2configs/git.nix index 21d365381..7d641dceb 100644 --- a/tv/2configs/git.nix +++ b/tv/2configs/git.nix @@ -34,6 +34,7 @@ let load-env = {}; make-snapshot = {}; much = {}; + netcup.desc = "netcup command line interface"; newsbot-js = {}; nixpkgs = {}; populate.desc = "source code installer"; -- cgit v1.2.3 From 9e6c8a91b23326abd7c26c70e96c9069e79a7938 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 23 Oct 2016 18:15:20 +0200 Subject: tv git: replace misplaced desc attrs --- tv/2configs/git.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/2configs/git.nix b/tv/2configs/git.nix index 7d641dceb..d937be2c4 100644 --- a/tv/2configs/git.nix +++ b/tv/2configs/git.nix @@ -34,10 +34,14 @@ let load-env = {}; make-snapshot = {}; much = {}; - netcup.desc = "netcup command line interface"; + netcup = { + cgit.desc = "netcup command line interface"; + }; newsbot-js = {}; nixpkgs = {}; - populate.desc = "source code installer"; + populate = { + cgit.desc = "source code installer"; + }; push = {}; regfish = {}; soundcloud = { -- cgit v1.2.3 From 6c02b9125dc7025ebad0a15cf4916f812f8f8e49 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 23 Oct 2016 21:33:45 +0200 Subject: tv nixpkgs: cd41bfe -> e4fb65a --- tv/2configs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 4b89252f9..39d0c4f6b 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -14,7 +14,7 @@ with import ; stockholm.file = "/home/tv/stockholm"; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; - ref = "cd41bfeeb1aaa10e4d412f2bd90dc2844a7c5df8"; + ref = "e4fb65a3627f8c17a2f92c08bf302dc30f0a8db9"; }; } // optionalAttrs host.secure { secrets-master.file = "/home/tv/secrets/master"; -- cgit v1.2.3